- 一级菜单子项渲染为下拉二级导航(移动端嵌套展开) - 新增 douban.html 豆瓣收藏适配页(plugin-douban,分栏展示书影音) - 页脚署名改为可配置名称且可关闭(默认「暖心向阳335」) - 页脚全站数据统计可配置(文章/分类/标签/评论/访问/字数) - 文章卡片字数+阅读时长增加 show_word_count 开关 - 修复 SinglePage 描述取用错误(spec.description -> status.excerpt)导致的 /weread、/subscriptions 白屏 - 修复 post-meta 静态类调用被禁(BigInteger.valueOf)导致的首页 500 - 文章分类链接增加间距 Co-Authored-By: WorkBuddy <noreply@workbuddy.ai>
45 lines
1.6 KiB
HTML
45 lines
1.6 KiB
HTML
<!-- 文章元信息(时间 / 分类 / 浏览量),供列表卡片与详情页复用 -->
|
|
<div class="post-meta" th:fragment="post-meta(post, dateClass)">
|
|
<time
|
|
th:if="${post.spec.publishTime != null}"
|
|
th:class="${dateClass}"
|
|
th:datetime="${post.spec.publishTime}"
|
|
th:text="${#temporals.format(post.spec.publishTime, 'yyyy-MM-dd')}"
|
|
data-relative-time
|
|
></time>
|
|
<th:block th:if="${not #lists.isEmpty(post.categories)}">
|
|
<span class="post-meta-sep">·</span>
|
|
<span class="post-category">
|
|
<a
|
|
th:each="cat : ${post.categories}"
|
|
th:href="@{${cat.status.permalink}}"
|
|
th:text="${cat.spec.displayName}"
|
|
></a>
|
|
</span>
|
|
</th:block>
|
|
<th:block th:if="${post.stats != null and post.stats.visit != null and post.stats.visit > 0}">
|
|
<span class="post-meta-sep">·</span>
|
|
<span class="post-views" th:text="#{post.views(${post.stats.visit})}"
|
|
>1 views</span
|
|
>
|
|
</th:block>
|
|
<th:block
|
|
th:if="${pluginFinder.available('extra-api') and theme.config?.basic?.show_word_count != false}"
|
|
>
|
|
<th:block th:with="wc=${extraApiStatsFinder.getPostWordCount({name: post.metadata.name})}">
|
|
<th:block th:if="${wc != null and wc > 0}">
|
|
<th:block th:with="rt=${(wc.longValue() + 399) / 400}">
|
|
<span class="post-meta-sep">·</span>
|
|
<span class="post-words" th:text="#{post.words(${wc.longValue()})}">字数</span>
|
|
<span class="post-meta-sep">·</span>
|
|
<span
|
|
class="post-reading"
|
|
th:text="#{post.reading_time(${rt})}"
|
|
>阅读时长</span
|
|
>
|
|
</th:block>
|
|
</th:block>
|
|
</th:block>
|
|
</th:block>
|
|
</div>
|