From 9ec2c6eeac43664cd41cf8e9a9f7b2e85cf9d7d4 Mon Sep 17 00:00:00 2001 From: j m <1406993111@qq.com> Date: Tue, 2 Apr 2024 10:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E6=9C=80=E8=BF=91=E6=96=87=E7=AB=A0-=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E2=80=9D=E6=9B=B4=E5=A4=9A=E2=80=9D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E5=A4=9A=E6=8C=89=E9=92=AE=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E5=BD=92=E6=A1=A3=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 10 ++++++++++ templates/widget/recent_posts.html | 1 + theme.yaml | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/settings.yaml b/settings.yaml index 338b378..c2524e1 100644 --- a/settings.yaml +++ b/settings.yaml @@ -912,6 +912,16 @@ spec: label: 侧边栏最近文章-展示文章数量 placeholder: 请输入数量数值 value: 5 + - $formkit: radio + name: recent_posts_more + label: 侧边栏最近文章-显示”更多”按钮 + value: true + help: '侧边栏最近文章是否显示更多按钮。更多按钮跳转至文章归档页面。' + options: + - value: true + label: 显示 + - value: false + label: 不显示 - $formkit: number name: recent_comments_num label: 侧边栏最近评论-展示评论数量 diff --git a/templates/widget/recent_posts.html b/templates/widget/recent_posts.html index dad3234..f3445b6 100644 --- a/templates/widget/recent_posts.html +++ b/templates/widget/recent_posts.html @@ -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)}">
最新文章 + 更多
暂无文章
diff --git a/theme.yaml b/theme.yaml index c67eee7..a97ae85 100644 --- a/theme.yaml +++ b/theme.yaml @@ -22,6 +22,6 @@ spec: settingName: theme-dream-setting configMapName: theme-dream-configMap # 版本号 - version: 1.0.3.22 + version: 1.0.3.23 # 最低支持的 Halo 版本 require: ">=2.6.0" \ No newline at end of file