<!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-list-title" th:text="${post.spec.title}">文章标题</span></a>
                  <span class="post-tags-inline">
                    ::
                    <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>
