Merge pull request #14 from zsjy/dev

Dev
This commit is contained in:
mjking 2024-05-08 14:51:01 +08:00 committed by GitHub
commit 9e50fbdffe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -162,7 +162,7 @@ spec:
- $formkit: "text"
name: "icon"
label: "图标"
placeholder: '请输入菜单图标支持RemixIcon'
placeholder: '请输入图标 class 内容'
- $formkit: "text"
name: "desc"
label: "描述"

View File

@ -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: 侧边栏分类-显示”更多”按钮

View File

@ -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}">
<img width="35" height="35" th:unless="${#strings.isEmpty(img)}" class="avatar" th:src="${img}"
th:alt="${comment.owner.displayName}">
<div th:if="${#strings.isEmpty(img)}" class="no-avatar">