- extra-api: 文章卡片/详情页展示字数+阅读时长、归档页展示全站总字数、瞬间页展示单条字数(pluginFinder.available 守卫,未安装自动隐藏) - 页脚新增 ICP 备案号与公网安备号配置(settings.yaml footer 分组,partials/layout.html 渲染并加安全导航守卫) - 友链申请表单由独立单页改为内嵌 /links 页底部(点击「申请友链」展开),移除独立 links-apply.html 及其自定义模板注册 - 重新打包 dist/whitespace-0.1.0.zip(移除陈旧 1.0.0)
96 lines
3.4 KiB
HTML
96 lines
3.4 KiB
HTML
<include src="partials/layout.html">
|
|
<template name="head">
|
|
<title th:text="|#{archive.title} - ${site.title}|">Archives</title>
|
|
<th:block
|
|
th:with="seoTitle=#{archive.title}, seoUrl=${site.url + site.routes.archivesUri}, seoDesc=null, seoImage=${site.logo}, seoType='website'"
|
|
>
|
|
<include src="seo.html"></include>
|
|
</th:block>
|
|
</template>
|
|
|
|
<div class="container">
|
|
<!-- 归档标题 -->
|
|
<div class="category-header">
|
|
<h1 class="category-title" th:text="#{archive.title}">Archives</h1>
|
|
</div>
|
|
|
|
<!-- 归档统计 -->
|
|
<div
|
|
class="archive-stats"
|
|
th:with="stats = ${siteStatsFinder.getStats()}, tags = ${tagFinder.listAll()}"
|
|
th:if="${stats != null}"
|
|
>
|
|
<div class="archive-stat">
|
|
<div class="archive-stat-number" th:text="${stats.post}">0</div>
|
|
<div class="archive-stat-label" th:text="#{archive.stats.posts}">
|
|
Posts
|
|
</div>
|
|
</div>
|
|
<div class="archive-stat">
|
|
<div class="archive-stat-number" th:text="${stats.category}">0</div>
|
|
<div class="archive-stat-label" th:text="#{archive.stats.categories}">
|
|
Categories
|
|
</div>
|
|
</div>
|
|
<div class="archive-stat" th:if="${tags != null}">
|
|
<div class="archive-stat-number" th:text="${#lists.size(tags)}">0</div>
|
|
<div class="archive-stat-label" th:text="#{archive.stats.tags}">
|
|
Tags
|
|
</div>
|
|
</div>
|
|
<th:block th:if="${pluginFinder.available('extra-api')}">
|
|
<div class="archive-stat">
|
|
<div
|
|
class="archive-stat-number"
|
|
th:text="${extraApiStatsFinder.getPostWordCount()}"
|
|
>0</div>
|
|
<div class="archive-stat-label" th:text="#{archive.stats.words}">
|
|
Words
|
|
</div>
|
|
</div>
|
|
</th:block>
|
|
</div>
|
|
|
|
<!-- 按年归档 -->
|
|
<th:block th:each="archive : ${archives.items}">
|
|
<div class="archive-year">
|
|
<h2 class="archive-year-title" th:text="${archive.year}">2024</h2>
|
|
<ul class="archive-list">
|
|
<th:block th:each="month : ${archive.months}">
|
|
<li
|
|
class="archive-item"
|
|
th:each="post : ${month.posts}"
|
|
th:with="postCategories = ${post.categories}"
|
|
>
|
|
<span
|
|
class="archive-date"
|
|
th:if="${post.spec.publishTime != null}"
|
|
th:text="${#temporals.format(post.spec.publishTime, 'MM-dd')}"
|
|
>01-01</span
|
|
>
|
|
<span class="archive-title">
|
|
<a th:href="@{${post.status.permalink}}"
|
|
th:text="${post.spec.title}">Post title</a>
|
|
</span>
|
|
<span
|
|
class="archive-category"
|
|
th:if="${not #lists.isEmpty(postCategories)}"
|
|
>
|
|
<a
|
|
th:href="@{${postCategories[0].status.permalink}}"
|
|
th:text="${postCategories[0].spec.displayName}"
|
|
></a>
|
|
</span>
|
|
</li>
|
|
</th:block>
|
|
</ul>
|
|
</div>
|
|
</th:block>
|
|
|
|
<!-- 分页 -->
|
|
<th:block
|
|
th:replace="~{modules/pagination :: pagination(context = |${site.routes.archivesUri}/|, prevUrl = ${archives.prevUrl}, nextUrl = ${archives.nextUrl}, totalPages = ${archives.totalPages}, page = ${archives.page}, hasPrevious = ${archives.hasPrevious()}, hasNext = ${archives.hasNext()})}"
|
|
></th:block>
|
|
</div>
|
|
</include>
|