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 - group: about
label: 关于 label: 关于
formSchema: formSchema:
- $formkit: repeater - $formkit: select
name: widgetList name: widget_list
multiple: true
sortable: true
label: 小部件 label: 小部件
help: 我的介绍&我的想法, 我的问候, 技能&职业生涯, 性格&图片, 座右铭, 爱好, 关注偏好&音乐偏好, 数据统计&作者相关信息。 help: 我的介绍&我的想法, 我的问候, 技能&职业生涯, 性格&图片, 座右铭, 爱好, 关注偏好&音乐偏好, 数据统计&作者相关信息。
value: value:
- widgetId: content-idea - content-idea
- widgetId: hello-about - hello-about
- widgetId: authorCareers - authorCareers
- widgetId: personalities-photo - personalities-photo
- widgetId: textarea - textarea
- widgetId: game - game
- widgetId: like-music - like-music
- widgetId: statistics-map - statistics-map
children: options:
- $formkit: select - value: content-idea
name: widgetId label: 我的介绍&我的想法
id: widgetId - value: hello-about
label: 模块 label: 我的问候
options: - value: authorCareers
- value: content-idea label: 技能&职业生涯
label: 我的介绍&我的想法 - value: personalities-photo
- value: hello-about label: 性格&图片
label: 我的问候 - value: textarea
- value: authorCareers label: 座右铭
label: 技能&职业生涯 - value: game
- value: personalities-photo label: 爱好
label: 性格&图片 - value: like-music
- value: textarea label: 关注偏好&音乐偏好
label: 座右铭 - value: statistics-map
- value: game label: 数据统计&作者相关信息
label: 爱好 - $formkit: list
- value: like-music name: author_info_left_tags
label: 关注偏好&音乐偏好
- value: statistics-map
label: 数据统计&作者相关信息
- $formkit: repeater
name: authorInfoLeftTags
label: 个人标签-左 label: 个人标签-左
addLabel: 添加标签
help: 头像左侧个人标签 help: 头像左侧个人标签
value: [ ] itemType: string
children: children:
- $formkit: text - $formkit: text
name: tag index: "$index"
label: 标签 validation: required
placeholder: 请输入内容 - $formkit: list
- $formkit: repeater name: author_info_right_tags
name: authorInfoRightTags
label: 个人标签-右 label: 个人标签-右
addLabel: 添加标签
help: 头像右侧个人标签 help: 头像右侧个人标签
value: [ ] itemType: string
children: children:
- $formkit: text - $formkit: text
name: tag index: "$index"
label: 标签 validation: required
placeholder: 请输入内容
- $formkit: code - $formkit: code
name: content name: content
label: 我的介绍 label: 我的介绍
@ -3284,40 +3281,3 @@ spec:
label: 结束时间 label: 结束时间
placeholder: 请输入结束时间(小时) placeholder: 请输入结束时间(小时)
help: 可以与开始时间相同,表示一个小时内的问候 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-info">
<div class="author-tag-left" <div class="author-tag-left"
th:if="${not #lists.isEmpty(theme.config.about.authorInfoLeftTags)}" th:if="${not #lists.isEmpty(theme.config.about.author_info_left_tags)}"
th:with="authorTags = ${theme.config.about.authorInfoLeftTags}"> th:with="authorTags = ${theme.config.about.author_info_left_tags}">
<span class="author-tag" th:each="authorTag : ${authorTags}" <span class="author-tag" th:each="authorTag : ${authorTags}"
th:text="${authorTag.tag}"></span> th:text="${authorTag}"></span>
</div> </div>
<div class="author-img"> <div class="author-img">
<img <img
th:src="@{${#strings.isEmpty(site.logo) ? assets_link + '/images/hao-logo.jpg' : site.logo}}"> th:src="@{${#strings.isEmpty(site.logo) ? assets_link + '/images/hao-logo.jpg' : site.logo}}">
</div> </div>
<div class="author-tag-right" <div class="author-tag-right"
th:if="${not #lists.isEmpty(theme.config.about.authorInfoRightTags)}" th:if="${not #lists.isEmpty(theme.config.about.author_info_right_tags)}"
th:with="authorTags = ${theme.config.about.authorInfoRightTags}"> th:with="authorTags = ${theme.config.about.author_info_right_tags}">
<span class="author-tag" th:each="authorTag : ${authorTags}" <span class="author-tag" th:each="authorTag : ${authorTags}"
th:text="${authorTag.tag}"></span> th:text="${authorTag}"></span>
</div> </div>
</div> </div>
<div class="author-title" th:text="${singlePage.spec.title}"></div> <div class="author-title" th:text="${singlePage.spec.title}"></div>
<th:block <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="author-content">
<div class="create-site-post author-content-item single" th:utext="${theme.config.about.xjlc}"> <div class="create-site-post author-content-item single" th:utext="${theme.config.about.xjlc}">
</div> </div>

View File

@ -12,18 +12,6 @@
<div class="page" id="body-wrap"> <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"> <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> <nav th:replace="~{modules/nav :: nav(title = ${siteTitle})}"></nav>
@ -53,21 +41,6 @@
<footer th:replace="~{modules/footer}"/> <footer th:replace="~{modules/footer}"/>
</div> </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> </th:block>

View File

@ -2,6 +2,6 @@
<th:block th:fragment="about-widgets(widgets)" <th:block th:fragment="about-widgets(widgets)"
th:if="${not #lists.isEmpty(widgets)}"> th:if="${not #lists.isEmpty(widgets)}">
<th:block th:each="widget : ${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>
</th:block> </th:block>

View File

@ -164,7 +164,7 @@
<script th:src="${assets_link + '/libs/clipboard/clipboard.min.js'}"></script> <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)}"> <th:block th:if="${not #strings.isEmpty(theme.config.sidebar.welcome.key)}">