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}">