From 440ed26527a9ebfe53a8b491dc2ed339e923a61a Mon Sep 17 00:00:00 2001 From: j m <1406993111@qq.com> Date: Sun, 28 Apr 2024 21:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=A8=A1=E5=9D=97=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=8E=9F=E6=9C=89=E5=85=AC=E5=91=8A=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=EF=BC=8C=E6=94=B9=E4=B8=BA=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E7=BB=84=E4=B8=AD=E8=BE=93=E5=85=A5=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 39 +++++++++++++++++++++------ templates/common/widget.html | 2 +- templates/widget/ad_piece.html | 4 +-- templates/widget/categories.html | 6 ++--- templates/widget/custom.html | 8 ++++++ templates/widget/love.html | 6 ++--- templates/widget/music.html | 6 ++--- templates/widget/notice.html | 10 +++---- templates/widget/profile.html | 4 +-- templates/widget/recent_comments.html | 6 ++--- templates/widget/recent_posts.html | 6 ++--- templates/widget/tagcloud.html | 9 +++---- templates/widget/tags.html | 6 ++--- templates/widget/timelife.html | 7 +++-- templates/widget/toc.html | 6 ++--- templates/widget/wechat.html | 4 +-- 16 files changed, 79 insertions(+), 50 deletions(-) create mode 100644 templates/widget/custom.html diff --git a/settings.yaml b/settings.yaml index 2a32b8b..c5e0904 100644 --- a/settings.yaml +++ b/settings.yaml @@ -646,6 +646,8 @@ spec: label: 人生倒计时 - value: 'wechat' label: 微信公众号 + - value: 'custom' + label: 自定义模块 - $formkit: select name: position label: 模块位置 @@ -670,6 +672,23 @@ spec: label: 桌面设备隐藏 - value: 'is-not-hidden' label: 不隐藏 + - $formkit: text + name: title + label: 侧边栏标题 + placeholder: '请输入标题内容' + help: '非必填,可覆盖默认侧边栏标题。' + - $formkit: text + name: icon + label: 侧边栏图标 + placeholder: '请输入图标 class 内容' + help: '非必填,可覆盖默认侧边栏图标。' + - $formkit: code + name: content + language: html + height: 100px + label: 侧边栏内容 + placeholder: 请输入 HTML 内容 + help: '非必填,仅在侧边栏类型为公告、自定义时生效。' - $formkit: radio name: enable_color_character label: 侧边栏信息-开启彩字切换 @@ -746,13 +765,6 @@ spec: name: url label: 地址 value: "" - - $formkit: code - name: notice_content - label: 侧边栏公告-博客公告 - placeholder: 请输入公告内容 - language: html - height: 240px - help: 公告内容支持 HTML 标签。 - $formkit: radio name: notice_show_mode label: 侧边栏公告-显示模式 @@ -1423,8 +1435,8 @@ spec: if: $get(enable_security_link).value validation: required label: 安全链接页面-跳转提示区域文本描述 - height: 240px language: html + height: 240px value: '您即将离开{title},去往:{url}' placeholder: '请输入安全链接页面跳转提示区域的文本描述' help: '""包裹时字体颜色为主题色,“ {title} ”表示站点主标题,“ {url} ”表示跳转URL,区分大小写。默认值:“您即将离开{title},去往:{url}”' @@ -1434,29 +1446,40 @@ spec: - $formkit: text name: external_css label: "外部 CSS 链接" + language: css placeholder: 请输入 CSS 文件链接 help: "填入外部CSS链接,无需link标签,将插入head标签尾部。" - $formkit: code name: inline_css + language: css + height: 240px label: "内嵌 CSS" placeholder: 请输入 CSS 样式内容 help: '填入CSS代码,无需style标签,将插入head标签尾部。' - $formkit: code name: external_js_head + language: javascript + height: 240px label: "外部 JS 链接(head)" placeholder: 请输入 script 标签 help: '填入外部JS链接,需要script标签,可按情况指定async和defer属性,将插入head标签尾部。' - $formkit: code name: inline_js_head + language: javascript + height: 240px label: "内嵌 JS(head)" placeholder: 请输入 JS 代码内容 help: '填入JS代码,无需script标签,将插入head标签尾部。' - $formkit: code name: external_js_body + language: javascript + height: 240px label: "外部 JS 链接(body)" placeholder: 请输入 script 标签 help: '填入外部JS链接,需要script标签,可按情况指定async和defer属性,将插入body标签尾部。' - $formkit: code + language: javascript + height: 240px name: inline_js_body label: "内嵌JS(body)" placeholder: 请输入 JS 代码内容 diff --git a/templates/common/widget.html b/templates/common/widget.html index bfcca55..653675a 100644 --- a/templates/common/widget.html +++ b/templates/common/widget.html @@ -3,7 +3,7 @@ th:class="'column column-side column-' + ${position} + ' ' + ${position == 'left'?theme.config.basic_style.left_sidebar_sticky:theme.config.basic_style.right_sidebar_sticky} + '-sticky'"> - +
diff --git a/templates/widget/ad_piece.html b/templates/widget/ad_piece.html index a145438..6bbe0ed 100644 --- a/templates/widget/ad_piece.html +++ b/templates/widget/ad_piece.html @@ -1,6 +1,6 @@
+ th:fragment="widget (sidebar)" + th:class="'card widget ' + ${sidebar.hide}"> 广告 diff --git a/templates/widget/categories.html b/templates/widget/categories.html index 0d7a95e..e714e29 100644 --- a/templates/widget/categories.html +++ b/templates/widget/categories.html @@ -1,11 +1,11 @@
- 分类 + 更多
diff --git a/templates/widget/custom.html b/templates/widget/custom.html new file mode 100644 index 0000000..d3cbc00 --- /dev/null +++ b/templates/widget/custom.html @@ -0,0 +1,8 @@ +
+
+ +
+ [(${sidebar.content})] +
\ No newline at end of file diff --git a/templates/widget/love.html b/templates/widget/love.html index b90532e..b8dc05e 100644 --- a/templates/widget/love.html +++ b/templates/widget/love.html @@ -1,8 +1,8 @@
+ th:fragment="widget (sidebar)" + th:class="'card widget love brightness ' + ${sidebar.hide}">
- 恋爱墙 +
diff --git a/templates/widget/music.html b/templates/widget/music.html index 1ce4408..a6b3ba2 100644 --- a/templates/widget/music.html +++ b/templates/widget/music.html @@ -1,8 +1,8 @@
+ th:fragment="widget (sidebar)" + th:class="'card widget music ' + ${sidebar.hide}">
- 音乐 +
+ th:fragment="widget (sidebar)" + th:class="'card widget notice ' + ${sidebar.hide} + ' is-hidden-all'">
- 公告 +
-
-
+
+
\ No newline at end of file diff --git a/templates/widget/profile.html b/templates/widget/profile.html index acd50fe..265013e 100644 --- a/templates/widget/profile.html +++ b/templates/widget/profile.html @@ -1,6 +1,6 @@
+ th:fragment="widget (sidebar)" + th:class="'card widget profile ' + ${sidebar.hide}">