mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 15:29:41 +08:00
1.2.2.2移除广告模式“图片+链接”相关配置,广告改为由侧边栏代码配置,适配加载多广告的情况
This commit is contained in:
parent
472c60467e
commit
624f76643c
@ -886,26 +886,6 @@ spec:
|
||||
label: 是
|
||||
- value: false
|
||||
label: 否
|
||||
- $formkit: radio
|
||||
name: ad_mode
|
||||
label: 侧边栏广告-广告展示方法
|
||||
help: '选择“自定义广告代码”时,必须在“侧边栏内容”中填写广告代码。'
|
||||
value: true
|
||||
options:
|
||||
- value: true
|
||||
label: 图片+链接
|
||||
- value: false
|
||||
label: 自定义广告代码
|
||||
- $formkit: text
|
||||
name: ad_target_url
|
||||
label: 侧边栏广告-广告目标地址
|
||||
placeholder: '请输入链接地址'
|
||||
help: '填写广告跳转的目标路径。'
|
||||
- $formkit: attachment
|
||||
name: ad_image
|
||||
label: 侧边栏广告-广告图片链接
|
||||
placeholder: '请输入/选择图片路径'
|
||||
help: '图片+链接模式时不能为空。'
|
||||
- $formkit: number
|
||||
name: recent_posts_num
|
||||
label: 侧边栏最近文章-展示文章数量
|
||||
|
@ -1,10 +1,7 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (sidebar)"
|
||||
th:class="'card widget ' + ${sidebar.hide}">
|
||||
<a th:if="${theme.config.sidebar.ad_mode}" target="_blank" th:href="${theme.config.sidebar.ad_target_url}">
|
||||
<img width="100%" th:src="${theme.config.sidebar.ad_image}" alt="广告"/>
|
||||
</a>
|
||||
<th:block th:unless="${theme.config.sidebar.ad_mode}" th:utext="${sidebar.content}"/>
|
||||
<th:block th:utext="${sidebar.content}"/>
|
||||
<span th:if="${theme.config.sidebar.show_ad_tag}" class="ad-tag">广告
|
||||
<svg th:if="${theme.config.sidebar.ad_tag_close}" class="click-close" data-close=".widget"
|
||||
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"><path
|
||||
|
Loading…
x
Reference in New Issue
Block a user