feat(post.html): 调整最后更新时间

针对文章页面最后更新时间显示添加开启关闭设置配置,默认关闭
This commit is contained in:
DLLCNX 2024-01-16 16:00:10 +08:00
parent 48e24fdf6f
commit 36f26ea6a5
2 changed files with 10 additions and 1 deletions

View File

@ -1416,6 +1416,15 @@ spec:
label: 温馨提示文案 label: 温馨提示文案
help: "自定义温馨提示的文案支持html语法" help: "自定义温馨提示的文案支持html语法"
language: html language: html
- $formkit: radio
name: update_time
label: 最后更新时间
value: false
options:
- label: 打开
value: true
- label: 关闭
value: false
- $formkit: select - $formkit: select
name: copyrightsStyle name: copyrightsStyle
id: copyrightsStyle id: copyrightsStyle

View File

@ -78,7 +78,7 @@
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd HH:mm:ss')}"> th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd HH:mm:ss')}">
</time> </time>
</span> </span>
<span class="post-meta-date"> <span class="post-meta-date" th:if="${theme.config.post.update_time}">
<i class="haofont hao-icon-pencil post-meta-icon" title="最后更新时间"></i> <i class="haofont hao-icon-pencil post-meta-icon" title="最后更新时间"></i>
<time th:attr="datetime=${#dates.format(post.status.lastModifyTime, 'yyyy-MM-dd')}" <time th:attr="datetime=${#dates.format(post.status.lastModifyTime, 'yyyy-MM-dd')}"
th:text="${#dates.format(post.status.lastModifyTime,'yyyy/MM/dd')}" th:text="${#dates.format(post.status.lastModifyTime,'yyyy/MM/dd')}"