新增:侧边栏最近文章-显示”更多”按钮,更多按钮跳转到归档页面

This commit is contained in:
j m 2024-04-02 10:25:22 +08:00
parent 2289013ac2
commit 9ec2c6eeac
3 changed files with 12 additions and 1 deletions

View File

@ -912,6 +912,16 @@ spec:
label: 侧边栏最近文章-展示文章数量 label: 侧边栏最近文章-展示文章数量
placeholder: 请输入数量数值 placeholder: 请输入数量数值
value: 5 value: 5
- $formkit: radio
name: recent_posts_more
label: 侧边栏最近文章-显示”更多”按钮
value: true
help: '侧边栏最近文章是否显示更多按钮。更多按钮跳转至文章归档页面。'
options:
- value: true
label: 显示
- value: false
label: 不显示
- $formkit: number - $formkit: number
name: recent_comments_num name: recent_comments_num
label: 侧边栏最近评论-展示评论数量 label: 侧边栏最近评论-展示评论数量

View File

@ -4,6 +4,7 @@
th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : T(java.lang.Integer).parseInt(theme.config.sidebar.recent_posts_num)}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}"> th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : T(java.lang.Integer).parseInt(theme.config.sidebar.recent_posts_num)}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}">
<div class="card-title"> <div class="card-title">
<i class="ri-history-line card-title-label"></i><span>最新文章</span> <i class="ri-history-line card-title-label"></i><span>最新文章</span>
<a th:if="${theme.config.sidebar.recent_posts_more}" class="card-more" th:href="@{/archives}">更多<i class="ri-arrow-right-double-line"></i></a>
</div> </div>
<div th:if="${isEmpty}" class="card-empty">暂无文章</div> <div th:if="${isEmpty}" class="card-empty">暂无文章</div>
<div th:unless="${isEmpty}" class="card-content"> <div th:unless="${isEmpty}" class="card-content">

View File

@ -22,6 +22,6 @@ spec:
settingName: theme-dream-setting settingName: theme-dream-setting
configMapName: theme-dream-configMap configMapName: theme-dream-configMap
# 版本号 # 版本号
version: 1.0.3.22 version: 1.0.3.23
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.6.0" require: ">=2.6.0"