mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 04:19:41 +08:00
17 lines
902 B
HTML
17 lines
902 B
HTML
<div xmlns:th="https://www.thymeleaf.org"
|
|
th:fragment="widget (hide)"
|
|
th:class="'card widget recent-posts ' + ${hide}"
|
|
th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : T(java.lang.Integer).parseInt(theme.config.sidebar.recent_posts_num)}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}">
|
|
<div class="card-title">
|
|
<i class="ri-history-line card-title-label"></i><span>最新文章</span>
|
|
</div>
|
|
<div th:if="${isEmpty}" class="card-empty">暂无文章</div>
|
|
<div th:unless="${isEmpty}" class="card-content">
|
|
<ul class="list">
|
|
<li class="item" th:each="post : ${posts}">
|
|
<a class="link" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}" th:text="${post.spec.title}"></a>
|
|
<i class="ri-link"></i>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div> |