mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 18:59:40 +08:00
友链页面评论区支持新版插件配置同时保留旧版配置
This commit is contained in:
parent
568fdd79aa
commit
fb7064ec81
@ -1027,13 +1027,24 @@ spec:
|
|||||||
help: '友链页面最低部的补充说明信息,支持 HTML 格式。'
|
help: '友链页面最低部的补充说明信息,支持 HTML 格式。'
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
name: link_enable_comment
|
name: link_enable_comment
|
||||||
|
id: link_enable_comment
|
||||||
label: 友链页面-开启评论区
|
label: 友链页面-开启评论区
|
||||||
|
help: '当链接插件版本>=1.4.0时,将内置评论区ID。为保留历史评论数据,可选择“开启并自定义评论区ID”选项。'
|
||||||
value: true
|
value: true
|
||||||
options:
|
options:
|
||||||
- value: true
|
- value: true
|
||||||
label: 开启
|
label: 开启
|
||||||
|
- value: custom
|
||||||
|
label: 开启并自定义评论区ID
|
||||||
- value: false
|
- value: false
|
||||||
label: 关闭
|
label: 关闭
|
||||||
|
- $formkit: singlePageSelect
|
||||||
|
name: link_comment_id
|
||||||
|
if: $get(link_enable_comment).value == 'custom'
|
||||||
|
label: 友链页面-评论区ID
|
||||||
|
validation: required
|
||||||
|
placeholder: '请选择一个页面作为友链页面的评论区ID'
|
||||||
|
help: '指定一个“自定义页面”用于友链页面的评论区ID,被指定的页面评论区将作为友链的评论区。'
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
name: enable_tags_tag_color
|
name: enable_tags_tag_color
|
||||||
label: 标签页面-开启标签颜色
|
label: 标签页面-开启标签颜色
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||||
th:insert="~{common/layout :: layout (title = ${#strings.defaultString(linksTitle, '友链')} + ' - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
|
th:insert="~{common/layout :: layout (title = ${#strings.defaultString(linksTitle, '友链')} + ' - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
|
||||||
th:with="baseEnableComment = ${theme.config.page_config.link_enable_comment}">
|
th:with="baseEnableComment = ${theme.config.page_config.link_enable_comment == true || (!#strings.isEmpty(theme.config.page_config.link_comment_id) && theme.config.page_config.link_enable_comment == 'custom')}">
|
||||||
<th:block th:fragment="content"
|
<th:block th:fragment="content"
|
||||||
th:with="defaultAvatar = ${#strings.defaultString(theme.config.page_config.links_default_avatar, #theme.assets('/img/avatar.svg'))}">
|
th:with="defaultAvatar = ${#strings.defaultString(theme.config.page_config.links_default_avatar, #theme.assets('/img/avatar.svg'))}">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@ -50,20 +50,40 @@
|
|||||||
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
|
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
|
||||||
<h3 class="comment-title">评论</h3>
|
<h3 class="comment-title">评论</h3>
|
||||||
<th:block th:if="${theme.config.enhance.enable_pjax}">
|
<th:block th:if="${theme.config.enhance.enable_pjax}">
|
||||||
<comment-widget
|
<th:block th:if="${theme.config.page_config.link_enable_comment == 'custom'}">
|
||||||
group="plugin.halo.run"
|
<comment-widget
|
||||||
kind="Plugin"
|
group="content.halo.run"
|
||||||
version="v1alpha1"
|
kind="SinglePage"
|
||||||
th:name="${pluginName}"
|
version="v1alpha1"
|
||||||
with-replies="false"
|
th:name="${theme.config.page_config.link_comment_id}"
|
||||||
></comment-widget>
|
with-replies="false"
|
||||||
|
></comment-widget>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${theme.config.page_config.link_enable_comment != 'custom'}">
|
||||||
|
<comment-widget
|
||||||
|
group="plugin.halo.run"
|
||||||
|
kind="Plugin"
|
||||||
|
version="v1alpha1"
|
||||||
|
th:name="${pluginName}"
|
||||||
|
with-replies="false"
|
||||||
|
></comment-widget>
|
||||||
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${theme.config.enhance.enable_pjax}">
|
<th:block th:unless="${theme.config.enhance.enable_pjax}">
|
||||||
<halo:comment
|
<th:block th:if="${theme.config.page_config.link_enable_comment == 'custom'}">
|
||||||
group="plugin.halo.run"
|
<halo:comment
|
||||||
kind="Plugin"
|
group="content.halo.run"
|
||||||
th:attr="name=${pluginName}"
|
kind="SinglePage"
|
||||||
/>
|
th:attr="name=${theme.config.page_config.link_comment_id}"
|
||||||
|
/>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${theme.config.page_config.link_enable_comment != 'custom'}">
|
||||||
|
<halo:comment
|
||||||
|
group="plugin.halo.run"
|
||||||
|
kind="Plugin"
|
||||||
|
th:attr="name=${pluginName}"
|
||||||
|
/>
|
||||||
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
@ -30,7 +30,7 @@ spec:
|
|||||||
settingName: theme-dream2-plus-setting
|
settingName: theme-dream2-plus-setting
|
||||||
configMapName: theme-dream2-plus-configMap
|
configMapName: theme-dream2-plus-configMap
|
||||||
# 版本号
|
# 版本号
|
||||||
version: 0.0.0.15
|
version: 0.0.0.17
|
||||||
# 最低支持的 Halo 版本
|
# 最低支持的 Halo 版本
|
||||||
require: ">=2.15.0"
|
require: ">=2.15.0"
|
||||||
# 许可
|
# 许可
|
||||||
|
Loading…
x
Reference in New Issue
Block a user