commit
fe5d45ee8d
|
@ -12,7 +12,7 @@ spec:
|
|||
id: "copyrightEnable"
|
||||
key: "copyrightEnable"
|
||||
label: "显示版权声明"
|
||||
value: "true"
|
||||
help: "默认后台设置"
|
||||
options:
|
||||
- label: "显示"
|
||||
value: "true"
|
||||
|
@ -20,9 +20,9 @@ spec:
|
|||
value: "false"
|
||||
- $formkit: "radio"
|
||||
name: "copyrightType"
|
||||
if: "$get(copyrightEnable).value == 'true'"
|
||||
label: "版权声明类型"
|
||||
value: "original"
|
||||
if: "$get(copyrightEnable).value != 'false'"
|
||||
options:
|
||||
- label: "原创"
|
||||
value: "original"
|
||||
|
@ -30,9 +30,9 @@ spec:
|
|||
value: "reprint"
|
||||
- $formkit: "text"
|
||||
name: "copyrightUrl"
|
||||
if: "$get(copyrightEnable).value == 'true'"
|
||||
label: "版权声明链接"
|
||||
help: "默认后台设置链接"
|
||||
help: "默认后台设置"
|
||||
if: "$get(copyrightEnable).value != 'false'"
|
||||
placeholder: "请输入链接"
|
||||
|
||||
---
|
||||
|
|
|
@ -1422,14 +1422,23 @@ spec:
|
|||
content: '本文是原创文章,采用 <a target="_blank" href="/cc">CC BY-NC-ND 4.0</a> 协议,完整转载请注明来自 <a href="/" target="_blank" >程序员小航</a>'
|
||||
reprintContent: '本文是转载文章,版权归原作者所有。建议访问原文,转载本文请联系原作者。'
|
||||
children:
|
||||
- $formkit: "text"
|
||||
name: "originalUrl"
|
||||
label: "原创链接"
|
||||
placeholder: "请输入链接"
|
||||
- $formkit: "text"
|
||||
name: "reprintUrl"
|
||||
label: "转载链接"
|
||||
placeholder: "请输入链接"
|
||||
- $formkit: radio
|
||||
name: enable
|
||||
value: false
|
||||
options:
|
||||
- label: 显示
|
||||
value: true
|
||||
- label: 隐藏
|
||||
value: false
|
||||
help: 文章底部显示版权声明模块
|
||||
- $formkit: text
|
||||
name: originalUrl
|
||||
label: 原创链接
|
||||
placeholder: 请输入链接
|
||||
- $formkit: text
|
||||
name: reprintUrl
|
||||
label: 转载链接
|
||||
placeholder: 请输入链接
|
||||
- $formkit: textarea
|
||||
name: content
|
||||
label: 原创声明内容
|
||||
|
|
|
@ -79,7 +79,8 @@
|
|||
|
||||
<!-- 版权声明 -->
|
||||
<div class="post-copyright" th:with="copyrightUrl =${#annotations.get(post, 'copyrightUrl')},
|
||||
copyrightEnable = ${#strings.equals(#annotations.getOrDefault(post, 'copyrightEnable','true'),'true')}">
|
||||
copyrightEnable = ${not #strings.isEmpty(#annotations.get(post, 'copyrightEnable')) ?
|
||||
#annotations.get(post, 'copyrightEnable') == 'true' : theme.config.post.copyrights.enable}">
|
||||
<div class="post-copyright__author" >
|
||||
<!-- 版权页 以及版权描述文字 -->
|
||||
<a th:if="${#strings.equals(#annotations.getOrDefault(post, 'copyrightType','original'),'original') && copyrightEnable}"
|
||||
|
|
|
@ -72,7 +72,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${#strings.equals(#annotations.getOrDefault(post, 'copyrightEnable','true'),'true')}"
|
||||
<div th:if="${not #strings.isEmpty(#annotations.get(post, 'copyrightEnable')) ?
|
||||
#annotations.get(post, 'copyrightEnable') == 'true' : theme.config.post.copyrights.enable}"
|
||||
class="post-copyright__notice">
|
||||
<span class="post-copyright-info"
|
||||
th:utext="${#strings.equals(#annotations.getOrDefault(post, 'copyrightType','original'),'reprint') ?
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
<div class="meta-firstline">
|
||||
<!-- 这里要跳转到版权页 -->
|
||||
<th:block th:with="copyrightUrl =${#annotations.get(post, 'copyrightUrl')}"
|
||||
th:if="${#strings.equals(#annotations.getOrDefault(post, 'copyrightEnable','true'),'true')}">
|
||||
th:if="${not #strings.isEmpty(#annotations.get(post, 'copyrightEnable')) ?
|
||||
#annotations.get(post, 'copyrightEnable') == 'true' : theme.config.post.copyrights.enable}">
|
||||
<a class="post-meta-original"
|
||||
title="该文章为原创文章,注意版权协议"
|
||||
th:if="${#strings.equals(#annotations.getOrDefault(post, 'copyrightType','original'),'original')}"
|
||||
|
|
Loading…
Reference in New Issue