<!DOCTYPE html>
<html lang="en" th:replace="modules/layouts/layout :: layout(~{::content})" 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:each="tag : ${tags}"
                       th:href="${tag.status.permalink}"
                       th:id="${tag.spec.displayName}">
                        <span class="tags-punctuation">#</span> [[${tag.spec.displayName}]]
                        <span class="tagsPageCount" th:text="${tag.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.post_random_img : 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('profile,recent-posts,tags-stat')"></div>
        </main>

        <!-- 底部 -->
        <footer th:replace="modules/footer :: footer"></footer>
    </div>

</th:block>

</html>