From a7f01cdcff83c4de4446f3de71d26745a5e6efae Mon Sep 17 00:00:00 2001 From: j m <1406993111@qq.com> Date: Sat, 7 Sep 2024 07:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dselect=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E5=85=81=E8=AE=B8=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E9=A1=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annotation-setting.yaml | 16 ++++++++-------- templates/main/article_list.html | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotation-setting.yaml b/annotation-setting.yaml index 00605cb..49df20b 100644 --- a/annotation-setting.yaml +++ b/annotation-setting.yaml @@ -22,22 +22,22 @@ spec: - $formkit: select name: thumbnail_mode label: 文章列表缩略图模式 - value: "" + value: "none" help: '文章在列表的缩略图模式,除网格布局外,当前配置将覆盖主题中的默认配置。' options: - - value: default + - value: "default" label: 默认模式 - - value: back + - value: "back" label: 背景图模式 - - value: small + - value: "small" label: 小图模式(左侧) - - value: small-right + - value: "small-right" label: 小图模式(右侧) - - value: small-alter + - value: "small-alter" label: 小图模式(交替) - - value: fold + - value: "fold" label: 折叠模式 - - value: "" + - value: "none" label: 跟随默认配置 - $formkit: text name: tips diff --git a/templates/main/article_list.html b/templates/main/article_list.html index 310e024..fd86894 100644 --- a/templates/main/article_list.html +++ b/templates/main/article_list.html @@ -2,7 +2,7 @@ th:fragment="articleList (posts)"> + thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : (!#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode')) && post.metadata.annotations.get('thumbnail_mode') != 'none')? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}">