feat: 二级导航、豆瓣适配页、可关闭署名与全站统计
- 一级菜单子项渲染为下拉二级导航(移动端嵌套展开) - 新增 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>
This commit is contained in:
@@ -23,17 +23,21 @@
|
||||
>1 views</span
|
||||
>
|
||||
</th:block>
|
||||
<th:block th:if="${pluginFinder.available('extra-api')}">
|
||||
<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}">
|
||||
<span class="post-meta-sep">·</span>
|
||||
<span class="post-words" th:text="#{post.words(${wc})}">字数</span>
|
||||
<span class="post-meta-sep">·</span>
|
||||
<span
|
||||
class="post-reading"
|
||||
th:text="#{post.reading_time(${#numbers.formatInteger((wc + 399).divide(java.math.BigInteger.valueOf(400)), 0)})}"
|
||||
>阅读时长</span
|
||||
>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user