1.简化关于模块中的小部件和个人标签设置

2.移除广告设置模块
This commit is contained in:
UPToZ 2025-06-19 11:19:12 +08:00
parent 843a20bf76
commit ba696b6867
5 changed files with 50 additions and 118 deletions

View File

@ -1909,61 +1909,58 @@ spec:
- group: about
label: 关于
formSchema:
- $formkit: repeater
name: widgetList
- $formkit: select
name: widget_list
multiple: true
sortable: true
label: 小部件
help: 我的介绍&我的想法, 我的问候, 技能&职业生涯, 性格&图片, 座右铭, 爱好, 关注偏好&音乐偏好, 数据统计&作者相关信息。
value:
- widgetId: content-idea
- widgetId: hello-about
- widgetId: authorCareers
- widgetId: personalities-photo
- widgetId: textarea
- widgetId: game
- widgetId: like-music
- widgetId: statistics-map
children:
- $formkit: select
name: widgetId
id: widgetId
label: 模块
options:
- value: content-idea
label: 我的介绍&我的想法
- value: hello-about
label: 我的问候
- value: authorCareers
label: 技能&职业生涯
- value: personalities-photo
label: 性格&图片
- value: textarea
label: 座右铭
- value: game
label: 爱好
- value: like-music
label: 关注偏好&音乐偏好
- value: statistics-map
label: 数据统计&作者相关信息
- $formkit: repeater
name: authorInfoLeftTags
- content-idea
- hello-about
- authorCareers
- personalities-photo
- textarea
- game
- like-music
- statistics-map
options:
- value: content-idea
label: 我的介绍&我的想法
- value: hello-about
label: 我的问候
- value: authorCareers
label: 技能&职业生涯
- value: personalities-photo
label: 性格&图片
- value: textarea
label: 座右铭
- value: game
label: 爱好
- value: like-music
label: 关注偏好&音乐偏好
- value: statistics-map
label: 数据统计&作者相关信息
- $formkit: list
name: author_info_left_tags
label: 个人标签-左
addLabel: 添加标签
help: 头像左侧个人标签
value: [ ]
itemType: string
children:
- $formkit: text
name: tag
label: 标签
placeholder: 请输入内容
- $formkit: repeater
name: authorInfoRightTags
index: "$index"
validation: required
- $formkit: list
name: author_info_right_tags
label: 个人标签-右
addLabel: 添加标签
help: 头像右侧个人标签
value: [ ]
itemType: string
children:
- $formkit: text
name: tag
label: 标签
placeholder: 请输入内容
index: "$index"
validation: required
- $formkit: code
name: content
label: 我的介绍
@ -3284,40 +3281,3 @@ spec:
label: 结束时间
placeholder: 请输入结束时间(小时)
help: 可以与开始时间相同,表示一个小时内的问候
- group: advertise
label: 广告设置
formSchema:
- $formkit: group
name: index_top_adv
label: 首页置顶广告
value:
enable: false
index_top_adv_url: "https://www.aliyun.com/daily-act/ecs/activity_selection?source=5176.11533457&userCode=ud0msscf"
index_top_adv_img: https://img.alicdn.com/imgextra/i3/O1CN01Tbj8qb1w835uueixH_!!6000000006262-2-tps-3840-120.png
children:
- $formkit: radio
name: enable
id: enable
key: enable
options:
- label: 启用
value: true
- label: 禁用
value: false
- $formkit: attachment
name: index_top_adv_img
id: index_top_adv_img
key: index_top_adv_img
if: $get(enable).value
label: 首页置顶广告图片
validation: required
placeholder: 请输入图片 url
- $formkit: text
name: index_top_adv_url
id: index_top_adv_url
key: index_top_adv_url
if: $get(enable).value
label: 首页置顶广告图片跳转地址
validation: required
placeholder: 请输入广告图片跳转 url

View File

@ -24,27 +24,26 @@
<div class="author-info">
<div class="author-tag-left"
th:if="${not #lists.isEmpty(theme.config.about.authorInfoLeftTags)}"
th:with="authorTags = ${theme.config.about.authorInfoLeftTags}">
th:if="${not #lists.isEmpty(theme.config.about.author_info_left_tags)}"
th:with="authorTags = ${theme.config.about.author_info_left_tags}">
<span class="author-tag" th:each="authorTag : ${authorTags}"
th:text="${authorTag.tag}"></span>
th:text="${authorTag}"></span>
</div>
<div class="author-img">
<img
th:src="@{${#strings.isEmpty(site.logo) ? assets_link + '/images/hao-logo.jpg' : site.logo}}">
</div>
<div class="author-tag-right"
th:if="${not #lists.isEmpty(theme.config.about.authorInfoRightTags)}"
th:with="authorTags = ${theme.config.about.authorInfoRightTags}">
th:if="${not #lists.isEmpty(theme.config.about.author_info_right_tags)}"
th:with="authorTags = ${theme.config.about.author_info_right_tags}">
<span class="author-tag" th:each="authorTag : ${authorTags}"
th:text="${authorTag.tag}"></span>
th:text="${authorTag}"></span>
</div>
</div>
<div class="author-title" th:text="${singlePage.spec.title}"></div>
<th:block
th:replace="~{modules/about-widgets :: about-widgets(${theme.config.about.widgetList})}"></th:block>
th:replace="~{modules/about-widgets :: about-widgets(${theme.config.about.widget_list})}"></th:block>
<div class="author-content">
<div class="create-site-post author-content-item single" th:utext="${theme.config.about.xjlc}">
</div>

View File

@ -12,18 +12,6 @@
<div class="page" id="body-wrap">
<div class="_3f01c8f5a4546beb05aa576fb01cb512_banner"
style="--bg-color: #F0F3FB;" th:if="${theme.config.advertise.index_top_adv.enable}">
<a class="_3f01c8f5a4546beb05aa576fb01cb512_link"
th:href="${theme.config.advertise.index_top_adv.index_top_adv_url}"
target="_blank"
data-tracker-scm="20140722.M_185485774.P_128.MO_1774-ID_10314565-MID_10314565-CID_31226-ST_10134-PA_m@1000390637-V_1"
data-aplus-ae="x1_6a70ef6a" data-spm-anchor-id="5176.28987142.J_4VYgf18xNlTAyFFbOuOQe.1">
<img th:src="${theme.config.advertise.index_top_adv.index_top_adv_img}" alt="">
</a>
<a class="_3f01c8f5a4546beb05aa576fb01cb512_close"></a>
</div>
<!-- 头部导航栏 -->
<header th:class="${theme.config.top.above.enable_above ? 'full_page' : 'not-top-img'}" id="page-header">
<nav th:replace="~{modules/nav :: nav(title = ${siteTitle})}"></nav>
@ -52,21 +40,6 @@
<!-- 底部 -->
<footer th:replace="~{modules/footer}"/>
</div>
<style th:if="${theme.config.advertise.index_top_adv.enable}">
@media screen and (max-width: 768px) {
#page-header.not-top-img:not(.nav-fixed) #nav {
background: var(--heo-none);
}
}
@media screen and (min-width: 770px) {
#page-header.not-top-img:not(.nav-fixed) #nav {
background: var(--heo-none);
margin-top:60px
}
}
</style>
</th:block>

View File

@ -2,6 +2,6 @@
<th:block th:fragment="about-widgets(widgets)"
th:if="${not #lists.isEmpty(widgets)}">
<th:block th:each="widget : ${widgets}">
<th:block th:replace="~{'modules/widgets/about-widgets/'+ ${widget.widgetId}}"/>
<th:block th:replace="~{'modules/widgets/about-widgets/'+ ${widget}}"/>
</th:block>
</th:block>

View File

@ -164,7 +164,7 @@
<script th:src="${assets_link + '/libs/clipboard/clipboard.min.js'}"></script>
<!-- 关于统计-->
<script th:if="${#strings.contains(theme.config.about.widgetList,'statistics-map')}" th:src="${assets_link + '/libs/countup/countup.js'}"></script>
<script th:if="${#strings.contains(theme.config.about.widget_list,'statistics-map')}" th:src="${assets_link + '/libs/countup/countup.js'}"></script>
<!-- 小板报 -->
<th:block th:if="${not #strings.isEmpty(theme.config.sidebar.welcome.key)}">