文件
halo-theme/templates/archives.html
T
rohow 56af43d293
Theme CD / Package Theme (release) Successful in 35s
Theme CD / Release (release) Successful in 15s
style(post): enhance post separator and adjust tag display for improved layout
2026-02-02 11:28:59 +08:00

67 行
2.5 KiB
HTML

<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layout :: html(title = |#{page.archives.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
>
<th:block th:fragment="content">
<div class="content">
<div class="post">
<h1 class="post-title" th:text="文章归档">文章归档</h1>
<th:block th:each="archive : ${archives.items}">
<ul>
<th:block th:each="month : ${archive.months}">
<li class="post-list" th:each="post : ${month.posts}">
<a th:href="${post.status.permalink}">
<span class="post-date" th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
>发布时间</span
>
<span class="post-separator">
<span></span>
<span></span>
<span></span>
<span></span>
</span>
<span class="post-list-title" th:text="${post.spec.title}">文章标题</span></a>
<span class="post-tags-inline">
<span class="post-separator">
<span></span>
<span></span>
<span></span>
<span></span>
</span>
<span th:each="tag : ${post.tags}">
<a
th:href="${tag.status.permalink}"
th:title="${tag.spec.displayName}"
th:text="'#'+${tag.spec.displayName}"
class="post-tag"
>#Tag
</a>
</span>
</span>
</a>
</li>
</th:block>
</ul>
</th:block>
</div>
<div class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
<div class="pagination__buttons">
<span class="button previous" th:if="${archives.hasPrevious()}">
<a th:href="@{${archives.prevUrl}}">
<span class="button__icon"><&nbsp;</span>
<span class="button__text">上一页</span>
</a>
</span>
<span class="button next" th:if="${archives.hasNext()}">
<a th:href="@{${archives.nextUrl}}">
<span class="button__text">下一页</span>
<span class="button__icon">&nbsp;></span>
</a>
</span>
</div>
</div>
</div>
</th:block>
</html>