+
diff --git a/settings.yaml b/settings.yaml index 4ebaf1bd..14c25a8e 100644 --- a/settings.yaml +++ b/settings.yaml @@ -39,9 +39,43 @@ spec: - group: nav label: 导航 formSchema: + - $formkit: group + name: menus + label: 菜单控制 + value: + pc_leftMenu: true + phone_leftMenu: true + phone_menu: true + children: + - $formkit: radio + name: pc_leftMenu + id: pc_leftMenu + label: pc端左侧菜单 + options: + - label: 显示 + value: true + - label: 隐藏 + value: false + - $formkit: radio + name: phone_leftMenu + label: 移动左侧菜单 + options: + - label: 显示 + value: true + - label: 隐藏 + value: false + - $formkit: radio + name: phone_menu + label: 移动主菜单 + options: + - label: 显示 + value: true + - label: 隐藏 + value: false - $formkit: menuRadio name: leftMenu - label: 站点名左侧 + if: $get(pc_leftMenu).value + label: 站点名左侧菜单 help: 默认只有主菜单,可前往【外观】—>【菜单】新建菜单组 value: "" - $formkit: group @@ -1168,6 +1202,15 @@ spec: - label: 关闭 value: false help: 文章主色匹配图片颜色 + - $formkit: radio + name: opacity + label: 目录模糊效果 + value: true + options: + - label: 打开 + value: true + - label: 关闭 + value: false - $formkit: group name: aiDescription label: 文章 AI 摘要 @@ -1249,6 +1292,34 @@ spec: label: 你的博客地址 help: 注意保留最后的斜杠 value: https://xx.xx/ + - $formkit: group + name: passage_tips + label: 温馨提示 + value: + enable: false + content: 文章内容可能已经过时。 + day: 7 + children: + - $formkit: radio + name: enable + id: enable + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: number + if: "$get(enable).value" + name: day + label: 更新时间大于天数显示 + validation: required + - $formkit: code + if: "$get(enable).value" + name: content + height: 100px + label: 温馨提示文案 + help: "自定义温馨提示的文案,支持html语法" + language: html - $formkit: select name: copyrightsStyle id: copyrightsStyle @@ -1322,24 +1393,24 @@ spec: value: true - label: 禁用 value: false -# - $formkit: radio -# name: qq_edit -# help: 启用分享到QQ -# value: true -# options: -# - label: 启用 -# value: true -# - label: 禁用 -# value: false -# - $formkit: radio -# name: wechat_edit -# help: 启用分享到微信朋友圈 -# value: true -# options: -# - label: 启用 -# value: true -# - label: 禁用 -# value: false + - $formkit: radio + name: qq_edit + help: 启用分享到QQ + value: true + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: radio + name: wechat_edit + help: 启用分享到微信朋友圈 + value: true + options: + - label: 启用 + value: true + - label: 禁用 + value: false - $formkit: group name: copyrights label: 版权声明 diff --git a/templates/assets/zhheo/rightmenu.js b/templates/assets/zhheo/rightmenu.js index f4f16ad8..f1c31d53 100644 --- a/templates/assets/zhheo/rightmenu.js +++ b/templates/assets/zhheo/rightmenu.js @@ -262,6 +262,54 @@ rm.sharePage = function () { rm.hideRightMenu(); } +function isMobileDevice() { + return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); +} + +rm.shareToQQ = function () { + var url = /*[[${post.status.permalink}]]*/ window.location.href; + var title = $('#post-info .post-title')[0].innerText; + if (isMobileDevice()) { + // 使用手机分享方式 + window.location.href = "mqqapi://share/to_fri?src_type=web&version=1&file_type=news&url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&callback_type=scheme&generalpastboard=1"; + } else { + // 使用Web分享方式 + window.open("https://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title)); + } + btf.snackbarShow('分享链接地址成功', false, 2000); + rm.hideRightMenu(); +} + +rm.shareToWechat = function () { + + // 手机分享逻辑 + if (isMobileDevice) { + + wx.config({ + // 配置微信的appID、timestamp、nonceStr、signature等参数 + // ... + debug: false, + jsApiList: ['onMenuShareTimeline'] // 需要使用的微信接口 + }); + + wx.ready(function () { + wx.onMenuShareTimeline({ + title: $('#post-info .post-title')[0].innerText, + link: window.location.href, + imgUrl: $('#coverdiv img')[0].src, + success: function () { + btf.snackbarShow('分享链接地址成功', false, 2000); + rm.hideRightMenu(); + }, + cancel: function () { + btf.snackbarShow('分享链接地址失败', false, 2000); + rm.hideRightMenu(); + } + }); + }); + } +} + // 复制当前选中文本 var selectTextNow = ''; document.onmouseup = document.ondbclick = selceText; diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 0ea2ee3a..8f45ad5f 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -7679,20 +7679,22 @@ div#power-star-title { width: 100%; } -/* 侧边栏在左侧时,显示 100% */ -.layout.left-aside > div:first-child { - -webkit-box-ordinal-group: 2; - -moz-box-ordinal-group: 2; - -o-box-ordinal-group: 2; - -ms-flex-order: 2; - -webkit-order: 2; - order: 2; -} +@media screen and (min-width: 1200px) { + /* 侧边栏在左侧时,显示 100% */ + .layout.left-aside > div:first-child { + -webkit-box-ordinal-group: 2; + -moz-box-ordinal-group: 2; + -o-box-ordinal-group: 2; + -ms-flex-order: 2; + -webkit-order: 2; + order: 2; + } -/* 侧栏在左侧时,关闭左边距,打开右边距 */ -.layout.left-aside .aside-content { - padding-right: 15px; - padding-left: 0px !important; + /* 侧栏在左侧时,关闭左边距,打开右边距 */ + .layout.left-aside .aside-content { + padding-right: 15px; + padding-left: 0px !important; + } } /* 主页分类 */ diff --git a/templates/modules/head.html b/templates/modules/head.html index 8a1c5909..f03a0a80 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -163,6 +163,8 @@ + + diff --git a/templates/modules/post/copyright/copyright-default.html b/templates/modules/post/copyright/copyright-default.html index de1f7441..274ca90b 100644 --- a/templates/modules/post/copyright/copyright-default.html +++ b/templates/modules/post/copyright/copyright-default.html @@ -61,6 +61,16 @@
+ +