From fd727dc6c096702ed826637b904107d7847c9e8c Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 23 Sep 2023 04:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9D=83=E5=A3=B0=E6=98=8E=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annotation-setting.yaml | 8 +++--- settings.yaml | 25 +++++++++++++------ .../post/copyright/copyright-default.html | 3 ++- .../modules/post/copyright/copyright-one.html | 3 ++- templates/post.html | 3 ++- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/annotation-setting.yaml b/annotation-setting.yaml index cb5ce013..93e4f281 100644 --- a/annotation-setting.yaml +++ b/annotation-setting.yaml @@ -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: "请输入链接" --- diff --git a/settings.yaml b/settings.yaml index 95413fd5..f51e9ccd 100644 --- a/settings.yaml +++ b/settings.yaml @@ -1422,14 +1422,23 @@ spec: content: '本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 程序员小航' 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: 原创声明内容 diff --git a/templates/modules/post/copyright/copyright-default.html b/templates/modules/post/copyright/copyright-default.html index a1971f0d..c05e55fa 100644 --- a/templates/modules/post/copyright/copyright-default.html +++ b/templates/modules/post/copyright/copyright-default.html @@ -79,7 +79,8 @@