From 832c653187318199b88c71e2a9a411d0d804c994 Mon Sep 17 00:00:00 2001 From: j m <1406993111@qq.com> Date: Wed, 8 May 2024 14:44:33 +0800 Subject: [PATCH] 1.2.1 --- settings.yaml | 12 ++++++------ templates/widget/recent_comments.html | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/settings.yaml b/settings.yaml index 989ebb8..797b041 100644 --- a/settings.yaml +++ b/settings.yaml @@ -88,12 +88,6 @@ spec: value: true - label: 隐藏 value: false - - $formkit: text - label: 头像服务镜像地址 - help: '用于替换头像服务镜像地址,无须输入结尾的"/"。' - name: providerMirror - value: "https://cravatar.cn" - validation: required - group: basic_style label: '基础样式' formSchema: @@ -922,6 +916,12 @@ spec: label: 侧边栏最近评论-展示评论数量 placeholder: 请输入数量数值 value: 5 + - $formkit: text + label: 侧边栏最近评论-邮箱头像服务地址 + help: '邮箱头像服务地址,支持参考文档自定义部分参数,其中“{hash}”表示邮箱Hash值。' + name: providerMirror + value: "https://cravatar.cn/avatar/{hash}" + validation: required - $formkit: radio name: categories_more label: 侧边栏分类-显示”更多”按钮 diff --git a/templates/widget/recent_comments.html b/templates/widget/recent_comments.html index 15d8294..92f476c 100644 --- a/templates/widget/recent_comments.html +++ b/templates/widget/recent_comments.html @@ -13,7 +13,7 @@ th:with=" emailHash = ${comment.spec.owner.annotations != null ? comment.spec.owner.annotations['email-hash'] : ''}, userA = ${comment.owner.avatar}, - img = ${#strings.isEmpty(userA) && !#strings.isEmpty(emailHash) ? theme.config.basic_info.providerMirror+'/avatar/'+emailHash : userA}"> + img = ${#strings.isEmpty(userA) && !#strings.isEmpty(emailHash) ? #strings.replace(theme.config.sidebar.providerMirror, '{hash}', emailHash) : userA}">