Change:增加侧边栏最新评论数管理

This commit is contained in:
jiewenhuang 2023-08-12 19:14:33 +08:00
parent 7f2a284c6f
commit ecea9425f1
2 changed files with 17 additions and 1 deletions

View File

@ -1329,6 +1329,16 @@ spec:
label:
- value: false
label:
- $formkit: select
name: enable_sheet_aside
label: 自定义页侧边栏
value: false
help: "自定义页面右侧是否展示侧边栏,默认关闭。开启后,所有自定义页面都会展示侧边栏(若部分页面不想展示,可以配置对应页面的元数据 enable_aside 为 false "
options:
- value: true
label:
- value: false
label:
- $formkit: select
name: enable_notice
label: 展示网站公告
@ -1414,6 +1424,12 @@ spec:
label:
- value: false
label:
- $formkit: number
if: "$get(show_newreply).value"
name: show_newreply_num
label: 展示最新评论
value: 3
help: "在侧边栏展示最新评论的数量"
- $formkit: radio
name: enable_tag_cloud
id: enable_tag_cloud

View File

@ -61,7 +61,7 @@
</div>
<ul class="joe_aside__item-contain">
<th:block th:each="result : ${commentFinder.list(null,1,5)}">
<th:block th:each="result : ${commentFinder.list(null,1,theme.config.aside.show_newreply_num)}">
<li class="item">
<div class="user">
<img width="35" height="35" class="avatar lazyload" th:data-src="${result.owner.avatar}" th:src="${theme.config.blogger.lazyload_avatar}" alt="头像">