diff --git a/README.md b/README.md index d915096f..05e42410 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ - [x] 文章阅读模式 - [X] [文章目录](https://github.com/liuzhihang/plugin-tocbot)(插件) - [X] [代码高亮/语言/复制](https://github.com/liuzhihang/plugin-prismjs)(插件) -- [ ] 文章搜索 +- [x] [文章搜索](https://github.com/halo-sigs/plugin-search-widget) - [x] 显示字数统计 - [x] 显示相关文章 - [x] 文章过期提醒 diff --git a/settings.yaml b/settings.yaml index bb8d3d9d..401aa3aa 100644 --- a/settings.yaml +++ b/settings.yaml @@ -196,6 +196,11 @@ spec: label: ICP 备案 placeholder: 请输入 ICP 备案号 help: "京ICP备xxxxxxxx号" + - $formkit: url + name: copyrightAgreement + label: 版权协议 + placeholder: "请输入版权协议地址" + help: '文章模块声明版权,也会使用此协议' - group: post label: 文章 formSchema: @@ -209,15 +214,47 @@ spec: - label: 关闭 value: false help: "文章底部显示版权声明模块" - - $formkit: url - name: copyrightAgreement - label: 版权协议 - placeholder: "请输入版权协议地址" - $formkit: textarea name: copyrightInfo label: 版权声明 placeholder: '本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 程序员小航' help: "版权声明内容,支持填入 HTML 标签" + - group: snackbar + label: 弹窗 + help: 右下角 snackbar 弹窗 + formSchema: + - $formkit: radio + name: switch + label: 开关(WIP) + value: true + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: radio + name: introduction + label: 介绍框(WIP) + value: true + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: text + name: introductionTitle + label: 介绍框标题 + value: '欢迎使用主题 Hao' + - $formkit: text + name: introductionTip + label: 介绍框内容 + value: '⭐️ Star halo-theme-hao,提交主题建议或意见。' + - $formkit: url + name: introductionUrl + validation: "url" + value: "https://github.com/liuzhihang/halo-theme-hao" + label: 介绍框点击跳转地址 + placeholder: 请输入跳转 url - group: rightMenu label: 右键菜单 formSchema: diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index 360c0250..b1ca62d1 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -82,7 +82,7 @@ var heo = { if (scrollTop != 0) { document.getElementById("page-header").classList.add("nav-fixed"); document.getElementById("page-header").classList.add("nav-visible"); - $('#cookies-window').hide() + $('#introduction-window').hide() console.log("已添加class") } }, @@ -301,9 +301,9 @@ var heo = { //隐藏cookie窗口 hidecookie: function () { heo_cookiesTime = setTimeout(() => { - document.getElementById("cookies-window").classList.add('cw-hide'); + document.getElementById("introduction-window").classList.add('cw-hide'); setTimeout(() => { - $('#cookies-window').hide() + $('#introduction-window').hide() }, 1000) }, 3000) }, diff --git a/templates/assets/js/main.js b/templates/assets/js/main.js index b25b9b5a..a20286de 100644 --- a/templates/assets/js/main.js +++ b/templates/assets/js/main.js @@ -348,7 +348,7 @@ document.addEventListener('DOMContentLoaded', function () { let isChatShow = true const $header = document.getElementById('page-header') const $gulitop = document.getElementById('guli_top') - const $cookies_window = document.getElementById('cookies-window') + const $cookies_window = document.getElementById('introduction-window') const isChatBtnHide = typeof chatBtnHide === 'function' const isChatBtnShow = typeof chatBtnShow === 'function' window.addEventListener('scroll', btf.throttle(function (e) { diff --git a/templates/assets/libs/iconfont/iconfont.css b/templates/assets/libs/iconfont/iconfont.css index 3db87717..342684e5 100644 --- a/templates/assets/libs/iconfont/iconfont.css +++ b/templates/assets/libs/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 3736806 */ - src: url('iconfont.woff2?t=1668096101462') format('woff2'), - url('iconfont.woff?t=1668096101462') format('woff'), - url('iconfont.ttf?t=1668096101462') format('truetype'); + src: url('iconfont.woff2?t=1668315437111') format('woff2'), + url('iconfont.woff?t=1668315437111') format('woff'), + url('iconfont.ttf?t=1668315437111') format('truetype'); } .iconfont { @@ -13,6 +13,26 @@ -moz-osx-font-smoothing: grayscale; } +.icon-by:before { + content: "\e601"; +} + +.icon-cc:before { + content: "\e602"; +} + +.icon-nc:before { + content: "\e603"; +} + +.icon-nd:before { + content: "\e604"; +} + +.icon-HAO:before { + content: "\e60e"; +} + .icon-logo-hao-pro:before { content: "\f290"; } diff --git a/templates/assets/libs/iconfont/iconfont.js b/templates/assets/libs/iconfont/iconfont.js index 2d82915c..aba52728 100644 --- a/templates/assets/libs/iconfont/iconfont.js +++ b/templates/assets/libs/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_3736806='',function(o){var c=(c=document.getElementsByTagName("script"))[c.length-1],l=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var i,h,t,v,m,a=function(c,l){l.parentNode.insertBefore(c,l)};if(l&&!o.__iconfont__svg__cssinject__){o.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}i=function(){var c,l=document.createElement("div");l.innerHTML=o._iconfont_svg_string_3736806,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(c=document.body).firstChild?a(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),i()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(t=i,v=o.document,m=!1,z(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,s())})}function s(){m||(m=!0,t())}function z(){try{v.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}s()}}(window); \ No newline at end of file +window._iconfont_svg_string_3736806='',function(o){var c=(c=document.getElementsByTagName("script"))[c.length-1],l=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var h,i,t,m,v,a=function(c,l){l.parentNode.insertBefore(c,l)};if(l&&!o.__iconfont__svg__cssinject__){o.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}h=function(){var c,l=document.createElement("div");l.innerHTML=o._iconfont_svg_string_3736806,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(c=document.body).firstChild?a(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(t=h,m=o.document,v=!1,z(),m.onreadystatechange=function(){"complete"==m.readyState&&(m.onreadystatechange=null,s())})}function s(){v||(v=!0,t())}function z(){try{m.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}s()}}(window); \ No newline at end of file diff --git a/templates/assets/libs/iconfont/iconfont.json b/templates/assets/libs/iconfont/iconfont.json index c0569d52..fa9f3bb5 100644 --- a/templates/assets/libs/iconfont/iconfont.json +++ b/templates/assets/libs/iconfont/iconfont.json @@ -5,6 +5,41 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "12095053", + "name": "by", + "font_class": "by", + "unicode": "e601", + "unicode_decimal": 58881 + }, + { + "icon_id": "12095056", + "name": "cc", + "font_class": "cc", + "unicode": "e602", + "unicode_decimal": 58882 + }, + { + "icon_id": "12095063", + "name": "nc", + "font_class": "nc", + "unicode": "e603", + "unicode_decimal": 58883 + }, + { + "icon_id": "12095066", + "name": "nd", + "font_class": "nd", + "unicode": "e604", + "unicode_decimal": 58884 + }, + { + "icon_id": "32816778", + "name": "HAO", + "font_class": "HAO", + "unicode": "e60e", + "unicode_decimal": 58894 + }, { "icon_id": "32796142", "name": "logo-hao-copy", diff --git a/templates/assets/libs/iconfont/iconfont.ttf b/templates/assets/libs/iconfont/iconfont.ttf index 24656970..0bb582c9 100644 Binary files a/templates/assets/libs/iconfont/iconfont.ttf and b/templates/assets/libs/iconfont/iconfont.ttf differ diff --git a/templates/assets/libs/iconfont/iconfont.woff b/templates/assets/libs/iconfont/iconfont.woff index c3a44fb4..a8f7e6a2 100644 Binary files a/templates/assets/libs/iconfont/iconfont.woff and b/templates/assets/libs/iconfont/iconfont.woff differ diff --git a/templates/assets/libs/iconfont/iconfont.woff2 b/templates/assets/libs/iconfont/iconfont.woff2 index aa2c2867..ca484c06 100644 Binary files a/templates/assets/libs/iconfont/iconfont.woff2 and b/templates/assets/libs/iconfont/iconfont.woff2 differ diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 6456a65b..3a6a98d6 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -7955,7 +7955,7 @@ span.fund_name { } /* cookies */ -#cookies-window { +#introduction-window { min-width: 300px; background: var(--heo-maskbgdeep); color: var(--heo-fontcolor); @@ -7975,20 +7975,20 @@ span.fund_name { animation: barrageIn 0.6s cubic-bezier(0.42, 0, 0.3, 1.11); } -#cookies-window.cw-hide { +#introduction-window.cw-hide { opacity: 0; animation: barrageOut 0.6s cubic-bezier(0.42, 0, 0.3, 1.11); z-index: -1; } -#cookies-window .cookies-window-title { +#introduction-window .introduction-window-title { padding-bottom: 4px; border-bottom: var(--style-border); font-size: 12px; font-weight: bold; } -#cookies-window .cookies-window-content { +#introduction-window .introduction-window-content { font-size: 14px; display: flex; justify-content: space-around; @@ -8000,13 +8000,13 @@ span.fund_name { font-weight: bold; } -.cookies-link { +.introduction-link { margin-left: auto; font-size: 16px; } @media screen and (max-width: 1300px) { - #cookies-window { + #introduction-window { display: none; } } diff --git a/templates/modules/footer.html b/templates/modules/footer.html index a9a6889b..bcf07ff4 100644 --- a/templates/modules/footer.html +++ b/templates/modules/footer.html @@ -44,28 +44,33 @@ -
-
协议提醒助手
-
- 查看本站为你的个人隐私做出的努力 - - + diff --git a/templates/modules/widgets/nav-right.html b/templates/modules/widgets/nav-right.html index 9b435e5a..9f5623c9 100644 --- a/templates/modules/widgets/nav-right.html +++ b/templates/modules/widgets/nav-right.html @@ -7,18 +7,18 @@ - + + + + + + - + + + + + - + + + + + +