36 lines
1.8 KiB
HTML
Raw Normal View History

2023-03-25 16:28:00 +08:00
<!DOCTYPE html>
<th:block xmlns:th="https://www.thymeleaf.org"
th:insert="~{common/layout :: layout (title = ${'归档 - ' + site.title},
canonical = @{/archives}, content = ~{::content}, isPost = false)}">
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(archives)}">
<div th:if="${isEmpty}" class="card card-empty">
<i class="fa fa-inbox"></i>
还没有发表过文章,回<a th:href="${site.url}">主页</a>看看吧
</div>
<th:block th:unless="${isEmpty}">
<div th:each="archive : ${archives.items}" class="card card-content">
<div class="timeline-title" th:text="${archive.year}"></div>
<div class="timeline">
<th:block th:each="months : ${archive.months}">
<article th:each="post : ${months.posts}" class="media">
<a th:if="${!#strings.isEmpty(post.spec.cover)}" th:href="${post.status.permalink}" class="media-left">
<img class="not-gallery" th:src="${post.spec.cover}" th:alt="${post.spec.title}">
</a>
<div class="media-content">
<time th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></time>
<a th:href="${post.status.permalink}" class="title has-link-grey" th:text="${post.spec.title}"></a>
<p th:if="${!#lists.isEmpty(post.categories)}">
<a class="has-link-grey"
th:each="cy : ${post.categories}"
th:href="${cy.status.permalink}"
th:text="${cy.spec.displayName}"></a>&nbsp;
</p>
</div>
</article>
</th:block>
2023-03-21 10:49:35 +08:00
</div>
2023-03-25 16:28:00 +08:00
</div>
<th:block th:replace="~{main/pagination :: pagination (${archives}, '/archives')}"/>
</th:block>
</th:block>
</th:block>