feat;最近发布文章数量限制
This commit is contained in:
parent
c83add6edf
commit
2359f4a843
|
@ -1,12 +1,15 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
<div class="card-widget card-recent-post" th:fragment="recent-posts" th:with="posts = ${postFinder.list(1,6)}">
|
<div class="card-widget card-recent-post" th:fragment="recent-posts" th:with='posts = ${postFinder.list(1,6)},
|
||||||
|
postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg : theme.config.layout.postRandomImg+"?"}'
|
||||||
|
>
|
||||||
|
|
||||||
<div class="item-headline"><i class="iconfont icon-listol"></i><span>最近发布</span></div>
|
<div class="item-headline"><i class="iconfont icon-listol"></i><span>最近发布</span></div>
|
||||||
<div class="aside-list">
|
<div class="aside-list">
|
||||||
<!-- 最新文章,用户可以自定义展示数量 -->
|
<!-- 最新文章,用户可以自定义展示数量 -->
|
||||||
<div class="aside-list-item" th:each="post : ${posts}">
|
<div class="aside-list-item" th:each="post : ${posts}">
|
||||||
<a class="thumbnail" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}">
|
<a class="thumbnail" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}">
|
||||||
<img loading="lazy" th:alt="${post.spec.title}" th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
|
<img loading="lazy" th:alt="${post.spec.title}" th:src='${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg+","+post.spec.title : post.spec.cover}'>
|
||||||
</a>
|
</a>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a class="title" th:href="@{${post.status.permalink}}" th:text="${post.spec.title}" th:title="${post.spec.title}"></a>
|
<a class="title" th:href="@{${post.status.permalink}}" th:text="${post.spec.title}" th:title="${post.spec.title}"></a>
|
||||||
|
|
Loading…
Reference in New Issue