halo-theme-hao/templates/tag.html

63 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="en" th:replace="modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'tag')" xmlns:th="http://www.thymeleaf.org">
<th:block th:fragment="content">
<div class="page" id="body-wrap">
<header class="not-top-img" id="page-header">
<nav th:replace="modules/nav :: nav"></nav>
</header>
<main class="layout" id="content-inner">
<div id="tag">
<div id="tag-page-tags" th:with="tags = ${tagFinder.listAll()}">
<a style="font-size:1em;color:#3c228c"
th:classappend="${tag.metadata.name == tagItem.metadata.name} ? 'select'"
th:each="tagItem : ${tags}"
th:href="@{${tagItem.status.permalink}}"
th:id="${tagItem.spec.displayName}">
<span class="tags-punctuation">#</span> [[${tagItem.spec.displayName}]]
<span class="tagsPageCount" th:text="${tagItem.status.postCount}"></span>
</a>
</div>
<div class="article-sort-title" th:text="${tag.spec.displayName}"></div>
<div class="article-sort" th:with="postItems=${posts.items}">
<!--<div class="article-sort-item year">2022</div>-->
<div class="article-sort-item" th:each="post : ${postItems}">
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}">
<img loading="lazy" th:alt="${post.status.excerpt}" th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</a>
<div class="article-sort-item-info">
<div class="article-sort-item-time"><i class="far fa-calendar-alt"></i>
<time th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">
</time>
</div>
<a class="article-sort-item-title" onclick="window.event.cancelBubble=!0"
th:href="@{${post.status.permalink}}"
th:text="${post.spec.title}" th:title="${post.spec.title}">
</a>
<div class="article-sort-item-tags">
<a class="article-meta__tags" event.cancelbubble onclick="window.event.cancelBubble=!0"
th:each="tag : ${post.tags}" th:href="@{${tag.status.permalink}}">
<span class="tags-punctuation">#[[${tag.spec.displayName}]]</span>
</a>
<span class="article-meta__link"></span>
</div>
</div>
</div>
</div>
<nav id="pagination">
<div class="pagination"><span class="page-number current">1</span></div>
</nav>
</div>
<div th:replace="modules/aside :: aside(${theme.config.sidebar.tagWidgets})"></div>
</main>
<!-- 底部 -->
<footer th:replace="modules/footer :: footer"></footer>
</div>
</th:block>
</html>