<!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="@{${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.status.excerpt}" th:title="${post.status.excerpt}">
                            </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">#</span>
                                    <th:block th:title="${tag.spec.displayName}"></th:block>
                                </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 class="aside-content" id="aside-content">

                <div th:replace="modules/widgets/profile :: profile"></div>


                <div class="card-widget heo-right-widget" id="card-wechat" onclick='window.open("/wechat/")'>
                    <div id="flip-wrapper">
                        <div id="flip-content">
                            <div class="face"></div>
                            <div class="back face"></div>
                        </div>
                    </div>
                </div>
                <div class="sticky_layout">
                    <div class="card-widget card-tags card-archives card-webinfo card-allinfo">
                        <th:block th:replace="modules/widgets/tags :: tags"></th:block>

                        <hr>

                        <th:block th:replace="modules/widgets/statistics :: statistics"></th:block>
                    </div>
                </div>
            </div>
        </main>

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

</th:block>

</html>