mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 13:09:40 +08:00
parent
f5c5481955
commit
7c7b5e98bf
@ -69,6 +69,18 @@ spec:
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
- $formkit: radio
|
||||
name: enable_donate
|
||||
label: 开启文章打赏
|
||||
value: ""
|
||||
help: '当前配置将覆盖主题中的默认配置。'
|
||||
options:
|
||||
- value: "true"
|
||||
label: 开启
|
||||
- value: "false"
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
|
||||
---
|
||||
|
||||
@ -122,4 +134,16 @@ spec:
|
||||
- value: "false"
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
label: 跟随默认配置
|
||||
- $formkit: radio
|
||||
name: enable_donate
|
||||
label: 开启文章打赏
|
||||
value: ""
|
||||
help: '当前配置将覆盖主题中的默认配置。'
|
||||
options:
|
||||
- value: "true"
|
||||
label: 开启
|
||||
- value: "false"
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
|
@ -502,6 +502,16 @@ spec:
|
||||
label: 默认开启
|
||||
- value: false
|
||||
label: 默认关闭
|
||||
- $formkit: radio
|
||||
name: enable_post_donate
|
||||
label: 开启文章打赏
|
||||
value: true
|
||||
help: '如果文章或页面元数据配置了enable_donate项,则当前配置将被覆盖。'
|
||||
options:
|
||||
- value: true
|
||||
label: 默认开启
|
||||
- value: false
|
||||
label: 默认关闭
|
||||
- $formkit: attachment
|
||||
name: donate_alipay
|
||||
label: 支付宝捐赠二维码
|
||||
|
@ -1,5 +1,5 @@
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:with="donate=${!#strings.isEmpty(theme.config.post.donate_alipay) || !#strings.isEmpty(theme.config.post.donate_wechat)}">
|
||||
th:with="donate=${enableDonate && (!#strings.isEmpty(theme.config.post.donate_alipay) || !#strings.isEmpty(theme.config.post.donate_wechat))}">
|
||||
<div th:if="${donate || type == 'Post'}" class="admire">
|
||||
<div class="admire-content">
|
||||
<button th:if="${donate}" class="donate">
|
||||
@ -22,4 +22,4 @@
|
||||
</div>
|
||||
<span>如果觉得文章对你有用,请随意赞赏</span>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
@ -3,5 +3,6 @@
|
||||
th:insert="~{common/layout :: layout (title = ${singlePage.spec.title + ' - ' + site.title}, canonical = ${singlePage.status.permalink}, content = ~{main/article :: article (${singlePage}, 'SinglePage')}, isPost = true)}"
|
||||
th:with="enableKatex = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_katex'))? singlePage.metadata.annotations.get('enable_katex') : theme.config.post.enable_katex},
|
||||
enableShare = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_share'))? singlePage.metadata.annotations.get('enable_share') : theme.config.post.enable_post_share},
|
||||
enableCopyright = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_copyright'))? singlePage.metadata.annotations.get('enable_copyright') : theme.config.post.enable_copyright}">
|
||||
</th:block>
|
||||
enableCopyright = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_copyright'))? singlePage.metadata.annotations.get('enable_copyright') : theme.config.post.enable_copyright},
|
||||
enableDonate = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_donate'))? singlePage.metadata.annotations.get('enable_donate') : theme.config.post.enable_post_donate}">
|
||||
</th:block>
|
||||
|
@ -3,5 +3,6 @@
|
||||
th:insert="~{common/layout :: layout (title = ${post.spec.title + ' - ' + site.title}, canonical = ${post.status.permalink}, content = ~{main/article :: article (${post}, 'Post')}, isPost = true)}"
|
||||
th:with="enableKatex = ${!#strings.isEmpty(post.metadata.annotations.get('enable_katex'))? post.metadata.annotations.get('enable_katex') : theme.config.post.enable_katex},
|
||||
enableShare = ${!#strings.isEmpty(post.metadata.annotations.get('enable_share'))? post.metadata.annotations.get('enable_share') : theme.config.post.enable_post_share},
|
||||
enableCopyright = ${!#strings.isEmpty(post.metadata.annotations.get('enable_copyright'))? post.metadata.annotations.get('enable_copyright') : theme.config.post.enable_copyright}">
|
||||
</th:block>
|
||||
enableCopyright = ${!#strings.isEmpty(post.metadata.annotations.get('enable_copyright'))? post.metadata.annotations.get('enable_copyright') : theme.config.post.enable_copyright},
|
||||
enableDonate = ${!#strings.isEmpty(post.metadata.annotations.get('enable_donate'))? post.metadata.annotations.get('enable_donate') : theme.config.post.enable_post_donate}">
|
||||
</th:block>
|
||||
|
Loading…
x
Reference in New Issue
Block a user