From cf7887b91201af10b9a65c93fb7a49d05bf9dbcc Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 8 Jul 2023 14:00:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/main.js | 154 ++++++++++++++--------------- templates/assets/js/utils.js | 177 ++++++++++++++++++++++------------ templates/modules/head.html | 11 +++ templates/modules/twikoo.html | 2 +- 4 files changed, 207 insertions(+), 137 deletions(-) diff --git a/templates/assets/js/main.js b/templates/assets/js/main.js index 31ed1db6..a28ff596 100644 --- a/templates/assets/js/main.js +++ b/templates/assets/js/main.js @@ -245,31 +245,31 @@ document.addEventListener('DOMContentLoaded', function () { * 需要 jQuery */ - // let detectJgJsLoad = false - // const runJustifiedGallery = function (ele) { - // const $justifiedGallery = $(ele) - // const $imgList = $justifiedGallery.find('img') - // $imgList.unwrap() - // if ($imgList.length) { - // $imgList.each(function (i, o) { - // if ($(o).attr('data-lazy-src')) $(o).attr('src', $(o).attr('data-lazy-src')) - // $(o).wrap('
') - // }) - // } - // - // if (detectJgJsLoad) btf.initJustifiedGallery($justifiedGallery) - // else { - // $('head').append(``) - // $.getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`, function () { - // btf.initJustifiedGallery($justifiedGallery) - // }) - // detectJgJsLoad = true - // } - // } + let detectJgJsLoad = false + const runJustifiedGallery = function (ele) { + const $justifiedGallery = $(ele) + const $imgList = $justifiedGallery.find('img') + $imgList.unwrap() + if ($imgList.length) { + $imgList.each(function (i, o) { + if ($(o).attr('data-lazy-src')) $(o).attr('src', $(o).attr('data-lazy-src')) + $(o).wrap('
') + }) + } + + if (detectJgJsLoad) btf.initJustifiedGallery($justifiedGallery) + else { + $('head').append(``) + $.getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`, function () { + btf.initJustifiedGallery($justifiedGallery) + }) + detectJgJsLoad = true + } + } /** - * fancybox和 mediumZoom - */ + * fancybox和 mediumZoom + */ const addFancybox = function (ele) { const runFancybox = (ele) => { ele.each(function (i, o) { @@ -308,26 +308,26 @@ document.addEventListener('DOMContentLoaded', function () { const addMediumZoom = () => { const zoom = mediumZoom(document.querySelectorAll('#article-container :not(a)>img')) zoom.on('open', e => { - const photoBg = document.documentElement.getAttribute('data-theme') === 'dark' ? '#121212' : '#fff' - zoom.update({ - background: photoBg - }) + const photoBg = document.documentElement.getAttribute('data-theme') === 'dark' ? '#121212' : '#fff' + zoom.update({ + background: photoBg + }) }) - } - + } + const jqLoadAndRun = () => { const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox' - ? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img,.bber-content-img > img') - : [] + ? document.querySelectorAll('#article-container :not(a):not(.gallery-group):not(.site-card-avatar) > img, #article-container > img,.bber-content-img > img') + : [] const fbLengthNoZero = $fancyboxEle.length > 0 const $jgEle = document.querySelectorAll('#article-container .justified-gallery') const jgLengthNoZero = $jgEle.length > 0 - + if (jgLengthNoZero || fbLengthNoZero) { - btf.isJqueryLoad(() => { - jgLengthNoZero && runJustifiedGallery($jgEle) - fbLengthNoZero && addFancybox($fancyboxEle) - }) + btf.isJqueryLoad(() => { + jgLengthNoZero && runJustifiedGallery($jgEle) + fbLengthNoZero && addFancybox($fancyboxEle) + }) } } @@ -338,13 +338,13 @@ document.addEventListener('DOMContentLoaded', function () { const $rightside = document.getElementById('rightside') const innerHeight = window.innerHeight + 0 // console.log("滚动处理运行"); - + // 當滾動條小于 0 的時候 if (document.body.scrollHeight <= innerHeight) { - $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' - return + $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' + return } - + let initTop = 0 let isChatShow = true const $header = document.getElementById('page-header') @@ -353,48 +353,48 @@ document.addEventListener('DOMContentLoaded', function () { const isChatBtnHide = typeof chatBtnHide === 'function' const isChatBtnShow = typeof chatBtnShow === 'function' window.addEventListener('scroll', btf.throttle(function (e) { - const currentTop = window.scrollY || document.documentElement.scrollTop - const isDown = scrollDirection(currentTop) - if (currentTop > 0) { - if (isDown) { - if ($header.classList.contains('nav-visible')) $header.classList.remove('nav-visible') - if (isChatBtnShow && isChatShow === true) { - chatBtnHide() - isChatShow = false - } + const currentTop = window.scrollY || document.documentElement.scrollTop + const isDown = scrollDirection(currentTop) + if (currentTop > 0) { + if (isDown) { + if ($header.classList.contains('nav-visible')) $header.classList.remove('nav-visible') + if (isChatBtnShow && isChatShow === true) { + chatBtnHide() + isChatShow = false + } + } else { + if (!$header.classList.contains('nav-visible')) $header.classList.add('nav-visible') + if (isChatBtnHide && isChatShow === false) { + chatBtnShow() + isChatShow = true + } + } + + + $header.classList.add('nav-fixed') + if($cookies_window!=null && $cookies_window!=''){ + $cookies_window.classList.add('cw-hide') + } + if (window.getComputedStyle($rightside).getPropertyValue('opacity') === '0') { + $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' + } } else { - if (!$header.classList.contains('nav-visible')) $header.classList.add('nav-visible') - if (isChatBtnHide && isChatShow === false) { - chatBtnShow() - isChatShow = true - } + if (currentTop === 0) { + $header.classList.remove('nav-fixed', 'nav-visible') + } + $rightside.style.cssText = "opacity: ''; transform: ''" } - - $header.classList.add('nav-fixed') - if($cookies_window!=null && $cookies_window!=''){ - $cookies_window.classList.add('cw-hide') - } - if (window.getComputedStyle($rightside).getPropertyValue('opacity') === '0') { - $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' + if (document.body.scrollHeight <= innerHeight) { + $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' } - } else { - if (currentTop === 0) { - $header.classList.remove('nav-fixed', 'nav-visible') - } - $rightside.style.cssText = "opacity: ''; transform: ''" - } - - if (document.body.scrollHeight <= innerHeight) { - $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' - } }, 200)) - + // find the scroll direction function scrollDirection (currentTop) { - const result = currentTop > initTop // true is down & false is up - initTop = currentTop - return result + const result = currentTop > initTop // true is down & false is up + initTop = currentTop + return result } } @@ -867,7 +867,7 @@ document.addEventListener('DOMContentLoaded', function () { }) clickFnOfSubMenu() - + GLOBAL_CONFIG.copyright !== undefined && addCopyright() } @@ -891,7 +891,7 @@ document.addEventListener('DOMContentLoaded', function () { sidebarFn() GLOBAL_CONFIG.isHome && scrollDownInIndex() // addHighlightTool() - // GLOBAL_CONFIG.isPhotoFigcaption && addPhotoFigcaption() + //GLOBAL_CONFIG.isPhotoFigcaption && addPhotoFigcaption() scrollFn() addTableWrap() clickFnOfTagHide() diff --git a/templates/assets/js/utils.js b/templates/assets/js/utils.js index 61c55b3a..140e5824 100644 --- a/templates/assets/js/utils.js +++ b/templates/assets/js/utils.js @@ -4,16 +4,16 @@ var btf = { // 修改时间显示"最近" diffDate: function (d, more = false) { - const dateNow = new Date(); - const datePost = new Date(d); - const dateDiff = dateNow.getTime() - datePost.getTime(); - const minute = 1000 * 60; - const hour = minute * 60; - const day = hour * 24; - const month = day * 30; + const dateNow = new Date(); + const datePost = new Date(d); + const dateDiff = dateNow.getTime() - datePost.getTime(); + const minute = 1000 * 60; + const hour = minute * 60; + const day = hour * 24; + const month = day * 30; - let result; - if (more) { + let result; + if (more) { const monthCount = dateDiff / month; const dayCount = dateDiff / day; const hourCount = dateDiff / hour; @@ -30,49 +30,108 @@ var btf = { } else { result = GLOBAL_CONFIG.date_suffix.just; } - } else { - result = parseInt(dateDiff / day); + } else { + result = parseInt(dateDiff / day); } return result; }, + // loadLightbox: ele => { + // const service = GLOBAL_CONFIG.lightbox; + + // if (service === "mediumZoom") { + // const zoom = mediumZoom(ele); + // zoom.on("open", e => { + // const photoBg = document.documentElement.getAttribute("data-theme") === "dark" ? "#121212" : "#fff"; + // zoom.update({ + // background: photoBg, + // }); + // }); + // } + + // if (service === "fancybox") { + // ele.forEach(i => { + // if (i.parentNode.tagName !== "A") { + // const dataSrc = i.dataset.lazySrc || i.src; + // const dataCaption = i.title || i.alt || ""; + // btf.wrap(i, "a", { + // href: dataSrc, + // "data-fancybox": "gallery", + // "data-caption": dataCaption, + // "data-thumb": dataSrc, + // }); + // } + // }); + + // if (!window.fancyboxRun) { + // Fancybox.bind("[data-fancybox]", { + // Hash: false, + // Thumbs: { + // autoStart: false, + // }, + // }); + // window.fancyboxRun = true; + // } + // } + // }, loadLightbox: ele => { - const service = GLOBAL_CONFIG.lightbox; - - if (service === "mediumZoom") { - const zoom = mediumZoom(ele); - zoom.on("open", e => { - const photoBg = document.documentElement.getAttribute("data-theme") === "dark" ? "#121212" : "#fff"; - zoom.update({ - background: photoBg, - }); - }); - } - - if (service === "fancybox") { - ele.forEach(i => { - if (i.parentNode.tagName !== "A") { - const dataSrc = i.dataset.lazySrc || i.src; - const dataCaption = i.title || i.alt || ""; - btf.wrap(i, "a", { - href: dataSrc, - "data-fancybox": "gallery", - "data-caption": dataCaption, - "data-thumb": dataSrc, - }); + + const jqLoadAndRun = () => { + const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox' + ? ele + : [] + const fbLengthNoZero = $fancyboxEle.length > 0 + + if (fbLengthNoZero) { + btf.isJqueryLoad(() => { + fbLengthNoZero && addFancybox($fancyboxEle) + }) } - }); - - if (!window.fancyboxRun) { - Fancybox.bind("[data-fancybox]", { - Hash: false, - Thumbs: { - autoStart: false, - }, - }); - window.fancyboxRun = true; - } } + + + + + /** + * fancybox + */ + const addFancybox = function (ele) { + const runFancybox = (ele) => { + ele.each(function (i, o) { + const $this = $(o) + const lazyloadSrc = $this.attr('data-lazy-src') || $this.attr('src') + const lazyloadSrc1600 = lazyloadSrc + '_1600w' + const dataCaption = $this.attr('alt') || '' + if (lazyloadSrc.indexOf('!blogimg') != -1) { + $this.wrap(``) + } else { + $this.wrap(``) + } + + }) + + $().fancybox({ + selector: '[data-fancybox]', + loop: true, + transitionEffect: 'slide', + protect: true, + buttons: ['slideShow', 'fullScreen', 'thumbs', 'close'], + hash: false + }) + } + + if (typeof $.fancybox === 'undefined') { + $('head').append(``) + $.getScript(`${GLOBAL_CONFIG.source.fancybox.js}`, function () { + runFancybox($(ele)) + }) + } else { + runFancybox($(ele)) + } + } + + jqLoadAndRun() + }, debounce: function (func, wait, immediate) { let timeout @@ -217,7 +276,7 @@ var btf = { } }, - + scrollToDest: (e,t)=>{ if (e < 0 || t < 0) return; @@ -230,19 +289,19 @@ var btf = { }); let o = null; t = t || 500, - window.requestAnimationFrame((function i(s) { - if (o = o || s, - n < e) { - const r = s - o; - window.scrollTo(0, (e - n) * r / t + n), - r < t ? window.requestAnimationFrame(i) : window.scrollTo(0, e) - } else { - const r = s - o; - window.scrollTo(0, n - (n - e) * r / t), - r < t ? window.requestAnimationFrame(i) : window.scrollTo(0, e) - } - } - )) + window.requestAnimationFrame((function i(s) { + if (o = o || s, + n < e) { + const r = s - o; + window.scrollTo(0, (e - n) * r / t + n), + r < t ? window.requestAnimationFrame(i) : window.scrollTo(0, e) + } else { + const r = s - o; + window.scrollTo(0, n - (n - e) * r / t), + r < t ? window.requestAnimationFrame(i) : window.scrollTo(0, e) + } + } + )) }, fadeIn: (ele, time) => { diff --git a/templates/modules/head.html b/templates/modules/head.html index b73a425e..cddc608a 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -174,6 +174,17 @@ allPlaylist: [[${theme.config.other.nav_music.all_playlist}]], navMusicEnable:[[${theme.config.other.nav_musicEnable}]], isMusic: [[${ htmlType == 'music'}]], + source: { + jQuery: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js', + justifiedGallery: { + js: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js', + css: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/justifiedGallery/3.8.1/css/justifiedGallery.min.css' + }, + fancybox: { + js: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/fancybox/3.5.7/jquery.fancybox.min.js', + css: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/fancybox/3.5.7/jquery.fancybox.min.css' + } + }, date_suffix: { just: '刚刚', min: '分钟前', diff --git a/templates/modules/twikoo.html b/templates/modules/twikoo.html index 6b9e1b21..1b2f09fe 100644 --- a/templates/modules/twikoo.html +++ b/templates/modules/twikoo.html @@ -17,7 +17,7 @@ envId: [[${theme.config.comments.twikoos.envId}]], region: '', onCommentLoaded: function () { - //- btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)')) + btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)')) $("input").focus(function () { heo_intype = true; }); From 19e2e735de2e6154d979fbb1166ea148c3c43667 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 8 Jul 2023 21:01:09 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 1815 +++++++++-------- templates/archives.html | 2 +- templates/category.html | 2 +- templates/index.html | 4 +- templates/modules/bar/custom-category.html | 2 +- templates/modules/bar/custom-tag.html | 2 +- templates/modules/bar/custom-url.html | 2 +- templates/modules/bar/more.html | 8 +- templates/modules/footer.html | 20 +- templates/modules/head.html | 14 +- templates/modules/layouts/layout.html | 540 ++--- templates/modules/loading-box.html | 138 +- templates/modules/nav-music.html | 2 +- templates/modules/post-list.html | 4 +- templates/modules/right-menu.html | 4 +- .../modules/widgets/aside/recent-posts.html | 2 +- templates/modules/widgets/banner-group.html | 18 +- templates/modules/widgets/console.html | 20 +- templates/modules/widgets/nav-left.html | 2 +- templates/modules/widgets/nav-right.html | 6 +- templates/modules/widgets/top-group.html | 16 +- templates/music.html | 2 +- templates/page.html | 2 +- templates/post.html | 66 +- templates/tag.html | 4 +- 25 files changed, 1397 insertions(+), 1300 deletions(-) diff --git a/settings.yaml b/settings.yaml index 6aad58e9..6c37df9a 100644 --- a/settings.yaml +++ b/settings.yaml @@ -7,6 +7,11 @@ spec: - group: basics label: 基础 formSchema: + - $formkit: text + name: siteTitle + label: 站点名称 + placeholder: 请输入站点名称 + help: '支持 HTML 语法,比如 ,留空为站点名称' - $formkit: date name: siteStartTime label: 建站时间 @@ -32,41 +37,45 @@ spec: - $formkit: menuRadio name: leftMenu label: 导航栏左侧相关链接 - - $formkit: text - name: siteTitle - label: 标题 - placeholder: 请输入标题 - help: '支持 HTML 语法,比如 ,留空为站点名称' - - $formkit: radio - name: article - label: 导航栏右侧(随机文章按钮开关) - value: true - options: - - label: 打开 + - $formkit: group + name: right + label: 导航栏右侧 + value: + article: + travelling: + travellingUrl: + children: + - $formkit: radio + name: travelling + label: 开往按钮 value: true - - label: 关闭 - value: false - - $formkit: radio - name: travelling - label: 导航栏右侧(开往按钮开关) - value: true - options: - - label: 打开 + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: url + name: travellingUrl + label: 开往链接 + placeholder: "请输入开往链接" + value: "https://travellings.link" + - $formkit: radio + name: article + label: 随机文章 value: true - - label: 关闭 - value: false - - $formkit: url - name: travellingUrl - label: 开往Url - placeholder: "请输入开往地址" - value: "https://travellings.link" + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - group: top label: 顶部 formSchema: - $formkit: radio name: moment - label: 说说模块 + label: 瞬间模块 value: true options: - label: 显示 @@ -77,232 +86,469 @@ spec: name: recentTop id: recentTop key: recentTop - label: 首页顶部 + label: 顶部 Banner value: true options: - label: 显示 value: true - label: 隐藏 value: false - - $formkit: textarea - if: "$get(recentTop).value" - name: bannersTitleBig - label: Banners 大标题 - placeholder: 请输入大标题 - value: Halo Theme Hao - help: 支持 HTML 语法 - - $formkit: textarea - if: "$get(recentTop).value" - name: bannersTitleSmall - label: Banners 小标题 - placeholder: 请输入小标题 - value: 更多信息请关注 GitHub - help: 支持 HTML 语法 - - $formkit: select - if: "$get(recentTop).value" - name: bannersBackground - label: 文章列表布局 - value: default - options: - - label: 默认 - value: default - - label: 技术栈 - value: techStack - - label: 图片(WIP) - value: img - help: "Banner 底部背景,默认使用主题技术栈、自定义技术栈需要在【个人】中配置技术栈" - - $formkit: url - if: "$get(recentTop).value" - name: bikan - label: 必看精选 - placeholder: 请输入地址 - value: "/" - - $formkit: url - if: "$get(recentTop).value" - name: remen - label: 热门文章 - placeholder: 请输入地址 - value: "/" - - $formkit: url - if: "$get(recentTop).value" - name: shiyong - label: 实用教程 - placeholder: 请输入地址 - value: "/" - - $formkit: radio - if: "$get(recentTop).value" - name: todayRecommend - id: todayRecommend - key: todayRecommend - label: 今日推荐 - value: false - options: - - label: 显示 - value: true - - label: 隐藏 - value: false - $formkit: group - if: "$get(todayRecommend).value" - name: todayRecommendContent - label: 今日推荐 - value: - todayRecommendUrl: - todayRecommendTitle: - todayRecommendCover: - children: - - $formkit: url - name: todayRecommendUrl - label: 今日推荐跳转地址 - placeholder: 请输入地址 - - $formkit: text - name: todayRecommendxTitle - label: 今日推荐小标题 - placeholder: 请输入小标题 - value: "今日推荐" - - $formkit: text - name: todayRecommendTitle - label: 今日推荐标题 - placeholder: 请输入标题 - value: "今日推荐" - - $formkit: attachment - name: todayRecommendCover - label: 今日推荐背景图 - placeholder: 请输入地址 - - $formkit: select + name: BannerLeft + label: Banner 左侧 if: "$get(recentTop).value" - name: recommendPost - id: recommendPost - key: recommendPost - label: 推荐文章 - value: latest - options: - - label: 最新文章 - value: latest - - label: 自定义 - value: custom - - $formkit: repeater - if: "$get(recommendPost).value === custom" - name: recommendPostCustom - label: 自定义文章 - help: "建议设置六篇文章" - value: [] + value: + bannersBackground: + bannersTitleBig: + bannersTitleSmall: + bikan: + remen: + shiyong: children: + - $formkit: select + name: bannersBackground + label: 背景 + value: default + options: + - label: 默认 + value: default + - label: 技术栈 + value: techStack + - label: 图片(WIP) + value: img + help: "Banner 底部背景,默认使用主题技术栈、自定义技术栈需要在【个人】中配置技术栈" + - $formkit: textarea + name: bannersTitleBig + label: 大标题 + placeholder: 请输入大标题 + value: Halo Theme Hao + help: 支持 HTML 语法 + - $formkit: textarea + name: bannersTitleSmall + label: 小标题 + placeholder: 请输入小标题 + value: 更多信息请关注 GitHub + help: 支持 HTML 语法 - $formkit: url - name: url - label: 链接 - validation: "url" - - $formkit: text - name: title - label: 标题 + name: bikan + label: 必看精选 + placeholder: 请输入地址 + value: "/" - $formkit: url - name: cover - label: 封面地址 - validation: "url" + name: remen + label: 热门文章 + placeholder: 请输入地址 + value: "/" + - $formkit: url + name: shiyong + label: 实用教程 + placeholder: 请输入地址 + value: "/" + - $formkit: group + name: BannerRight + label: Banner 右侧 + if: "$get(recentTop).value" + value: + todayRecommend: + todayRecommendContent: + children: + - $formkit: radio + name: todayRecommend + id: todayRecommend + key: todayRecommend + label: 今日推荐 + value: false + options: + - label: 显示 + value: true + - label: 隐藏 + value: false + - $formkit: group + name: todayRecommendContent + if: "$get(todayRecommend).value" + label: 今日推荐 + value: + todayRecommendUrl: + todayRecommendTitle: + todayRecommendCover: + todayRecommendxTitle: + recommendPost: + recommendPostCustom: + children: + - $formkit: url + name: todayRecommendUrl + label: 跳转地址 + placeholder: 请输入地址 + - $formkit: text + name: todayRecommendTitle + label: 大标题 + placeholder: 请输入标题 + value: "今日推荐" + - $formkit: text + name: todayRecommendxTitle + label: 小标题 + placeholder: 请输入小标题 + value: "今日推荐" + - $formkit: attachment + name: todayRecommendCover + label: 背景图 + placeholder: 请输入地址 + - $formkit: select + name: recommendPost + id: recommendPost + key: recommendPost + label: 推荐文章 + value: latest + options: + - label: 最新文章 + value: latest + - label: 自定义 + value: custom + - $formkit: repeater + if: "$get(recommendPost).value === custom" + name: recommendPostCustom + label: 自定义文章 + help: "建议设置六篇文章" + value: [] + children: + - $formkit: url + name: url + label: 链接 + - $formkit: text + name: title + label: 标题 + - $formkit: attachment + name: cover + label: 封面地址 + - group: footer + label: 页脚 + formSchema: + - $formkit: group + name: social_media + label: 社交媒体 + value: + socialMediaLeft: + centerImg: + socialMediaRight: + children: + - $formkit: repeater + name: socialMediaLeft + label: 社交媒体(左) + value: [] + children: + - $formkit: select + name: icon + label: 图标 + options: + - label: 电子邮箱 + value: icon-mail-line + - label: 微信 + value: icon-wechat2 + - label: 公众号 + value: icon-weixingongzhonghao + - label: 腾讯 QQ + value: icon-qq-line + - label: 新浪微博 + value: icon-weibo-line + - label: 知乎 + value: icon-zhihu-line + - label: 豆瓣 + value: icon-douban-line + - label: 哔哩哔哩 + value: icon-bilibili-line + - label: GitHub + value: icon-github-line + - label: GitLab + value: icon-gitlab-line + - label: 百度 + value: icon-baidu-line + - label: 掘金 + value: icon-juejin + - label: 语雀 + value: icon-yuque + - label: 博客园 + value: icon-CN_cnblogs + - label: CSDN + value: icon-csdn1 + - label: LeetCode + value: icon-leetcode + - label: 头条 + value: icon-jinritoutiao + - label: 抖音 / TikTok + value: icon-douyin + - label: Telegram + value: icon-telegram-line + - label: Facebook + value: icon-facebook-box-line + - label: Instagram + value: icon-instagram-line + - label: LinkedIn + value: icon-linkedin-box-line + - label: Twitter + value: icon-twitter-line + - label: Slack + value: icon-slack-line + - label: Discord + value: icon-discord-line + - label: YouTube + value: icon-youtube-line + - label: Steam + value: icon-steam-fill + - label: Dribbble + value: icon-dribbble-line + - $formkit: text + name: name + label: 名称 + - $formkit: text + name: url + label: 链接 + - $formkit: radio + name: urlType + label: 链接类型 + value: normal + help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载" + options: + - label: 跳转链接 + value: normal + - label: 图片 + value: image + - $formkit: attachment + name: centerImg + label: 社交媒体中间logo + help: logo图片链接 + placeholder: 请填写logo图片链接 + - $formkit: repeater + name: socialMediaRight + label: 社交媒体(右) + value: [] + children: + - $formkit: select + name: icon + label: 图标 + options: + - label: 电子邮箱 + value: icon-mail-line + - label: 微信 + value: icon-wechat2 + - label: 公众号 + value: icon-weixingongzhonghao + - label: 腾讯 QQ + value: icon-qq-line + - label: 新浪微博 + value: icon-weibo-line + - label: 知乎 + value: icon-zhihu-line + - label: 豆瓣 + value: icon-douban-line + - label: 哔哩哔哩 + value: icon-bilibili-line + - label: GitHub + value: icon-github-line + - label: GitLab + value: icon-gitlab-line + - label: 百度 + value: icon-baidu-line + - label: 掘金 + value: icon-juejin + - label: 语雀 + value: icon-yuque + - label: 博客园 + value: icon-CN_cnblogs + - label: CSDN + value: icon-csdn1 + - label: LeetCode + value: icon-leetcode + - label: 头条 + value: icon-jinritoutiao + - label: 抖音 / TikTok + value: icon-douyin + - label: Telegram + value: icon-telegram-line + - label: Facebook + value: icon-facebook-box-line + - label: Instagram + value: icon-instagram-line + - label: LinkedIn + value: icon-linkedin-box-line + - label: Twitter + value: icon-twitter-line + - label: Slack + value: icon-slack-line + - label: Discord + value: icon-discord-line + - label: YouTube + value: icon-youtube-line + - label: Steam + value: icon-steam-fill + - label: Dribbble + value: icon-dribbble-line + - $formkit: text + name: name + label: 名称 + - $formkit: text + name: url + label: 链接 + - $formkit: radio + name: urlType + label: 链接类型 + value: normal + help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载" + options: + - label: 跳转链接 + value: normal + - label: 图片 + value: image + - $formkit: menuRadio + name: menu + label: 相关链接 + - $formkit: group + name: footer_group + label: 页脚友链 + value: + enable_footer_group: + fetchUrl: + children: + - $formkit: radio + name: enable_footer_group + id: enable_footer_group + key: enable_footer_group + label: 启用页脚友链 + value: false + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: url + name: fetchUrl + if: "$get(enable_footer_group).value" + value: "`https://moments.0206.ink/randomfriend?num=3`" + label: 页脚友链地址 + placeholder: 请输入页脚友链地址 + help: 注意格式 (`友链地址`) + + + - group: layout label: 布局 formSchema: - - $formkit: select - name: nav - id: nav - key: nav - label: 文章导航 - value: category - options: - - label: 分类 - value: category - - label: 标签 - value: tag - - label: 自定义分类 - value: custom-category - - label: 自定义标签 - value: custom-tag - - label: 自定义路径 - value: custom-url - - $formkit: repeater - if: "$get(nav).value === 'custom-category'" - name: navCustomCategory - label: 自定义分类 - value: [ ] - children: - - $formkit: categorySelect - name: category - label: 分类 - - $formkit: repeater - if: "$get(nav).value === 'custom-tag'" - name: navCustomTag - label: 自定义标签 - value: [ ] - children: - - $formkit: tagSelect - name: tag - label: 标签 - - $formkit: repeater - if: "$get(nav).value === 'custom-url'" - name: navCustomUrl - label: 自定义路径 - value: [ ] - children: - - $formkit: text - name: title - label: 标题 - - $formkit: url - name: url - label: 链接 - - $formkit: select - name: navMore - id: navMore - key: navMore - label: 文章导航更多跳转地址 - value: hide - options: - - label: 隐藏 - value: hide - - label: 分类 - value: categories - - label: 标签 - value: tags - - label: 自定义地址 - value: customUrl - - $formkit: url - if: "$get(navMore).value === customUrl" - name: navMoreCustomUrl - label: 文章导航更多跳转路径 + - $formkit: group + name: navs value: - - - $formkit: select - name: cols - label: 文章布局 - value: col2 - options: - - label: 单列 - value: col1 - - label: 两列 + nav: + navCustomCategory: + navCustomTag: + navCustomUrl: + navMore: + navMoreCustomUrl: + children: + - $formkit: select + name: nav + id: nav + key: nav + label: 文章导航 + value: category + options: + - label: 分类 + value: category + - label: 标签 + value: tag + - label: 自定义分类 + value: custom-category + - label: 自定义标签 + value: custom-tag + - label: 自定义路径 + value: custom-url + - $formkit: repeater + if: "$get(nav).value === 'custom-category'" + name: navCustomCategory + label: 自定义分类 + value: [ ] + children: + - $formkit: categorySelect + name: category + label: 分类 + - $formkit: repeater + if: "$get(nav).value === 'custom-tag'" + name: navCustomTag + label: 自定义标签 + value: [ ] + children: + - $formkit: tagSelect + name: tag + label: 标签 + - $formkit: repeater + if: "$get(nav).value === 'custom-url'" + name: navCustomUrl + label: 自定义路径 + value: [ ] + children: + - $formkit: text + name: title + label: 标题 + - $formkit: url + name: url + label: 链接 + - $formkit: select + name: navMore + id: navMore + key: navMore + label: 文章导航更多跳转地址 + value: hide + options: + - label: 隐藏 + value: hide + - label: 分类 + value: categories + - label: 标签 + value: tags + - label: 自定义地址 + value: customUrl + - $formkit: url + if: "$get(navMore).value === customUrl" + name: navMoreCustomUrl + label: 文章导航更多跳转路径 + value: + - $formkit: group + name: post + value: + cols: + postLocation: + postRandomImg: + children: + - $formkit: select + name: cols + label: 文章布局 value: col2 - - label: 三列 - value: col3 - - label: 四列 - value: col4 - help: "建议单列时,将图片放在左右" - - $formkit: select - name: postLocation - label: 封面位置 - value: top - options: - - label: 上方 + options: + - label: 单列 + value: col1 + - label: 两列 + value: col2 + - label: 三列 + value: col3 + - label: 四列 + value: col4 + help: "建议单列时,将图片放在左右" + - $formkit: select + name: postLocation + label: 封面位置 value: top - - label: 左侧 - value: left - - label: 右侧 - value: right - - label: 交替 - value: alternate + options: + - label: 上方 + value: top + - label: 左侧 + value: left + - label: 右侧 + value: right + - label: 交替 + value: alternate - $formkit: url name: postRandomImg - label: 博客封面随机 API - validation: "url" + label: 随机封面 value: "https://source.unsplash.com/random/600x400/?blog,scenery,night,desert,sea" - help: 二次元随机图地址:https://www.dmoe.cc/random.php 默认随机封面图 url 不能保证一直可用 + help: 未设置文章封面时,将使用随机封面 (二次元随机图地址:https://www.dmoe.cc/random.php) - group: sidebar label: 侧栏 @@ -318,29 +564,57 @@ spec: label: "右侧" - value: "left-aside" label: "左侧" - - $formkit: textarea - name: widgets - label: 小部件 - value: "profile,wechat,comments,recent-posts,categories,tags-stat" + - $formkit: group + name: widgetss + label: 侧边栏内容 help: "目前提供的小部件有:profile(站点资料), wechat(微信), recent-posts(近期文章), comments(最新评论), categories(文章分类), tags(文章标签), stat(统计), tags-stat(标签&归档&统计)。你可以随意组合或排序,以逗号隔开。" - - $formkit: textarea - name: postWidgets - label: 文章页面小部件 - value: "profile,wechat,toc,comments,recent-posts,categories,tags-stat" - help: "post 可以支持设置 toc " - - $formkit: textarea - name: tagWidgets - label: 标签页面小部件 - value: "profile,wechat,comments,recent-posts,categories,tags-stat" - - $formkit: textarea - name: categoryWidgets - label: 分类页面小部件 - value: "profile,wechat,comments,recent-posts,categories,tags-stat" - - $formkit: textarea - name: pageWidgets - label: 自定义页面小部件 - value: "" - help: "自定义页面默认没有侧栏" + value: + indexWidgets: + postWidgets: + tagWidgets: + categoryWidgets: + pageWidgets: + children: + - $formkit: textarea + name: indexWidgets + label: 首页 + value: "profile,wechat,comments,recent-posts,categories,tags-stat" + - $formkit: textarea + name: postWidgets + label: 文章页 + value: "profile,wechat,toc,comments,recent-posts,categories,tags-stat" + help: "post 可以支持设置 toc " + - $formkit: textarea + name: tagWidgets + label: 标签页 + value: "profile,wechat,comments,recent-posts,categories,tags-stat" + - $formkit: textarea + name: categoryWidgets + label: 分类页 + value: "profile,wechat,comments,recent-posts,categories,tags-stat" + - $formkit: textarea + name: pageWidgets + label: 自定义页 + value: "" + help: "自定义页面默认没有侧栏" + - $formkit: radio + name: tags_switch + label: 标签&归档&统计 (标签按钮开关) + value: true + options: + - label: 显示 + value: true + - label: 隐藏 + value: false + - $formkit: radio + name: archive_switch + label: 标签&归档&统计 (归档按钮开关) + value: true + options: + - label: 显示 + value: true + - label: 隐藏 + value: false - $formkit: group name: profile value: @@ -454,232 +728,31 @@ spec: placeholder: 公众号背面图 help: 图片可以从公众号后台下载物料或者自制 - $formkit: number - name: tagQuantity - label: 标签数量 - value: -1 - help: "小于 0 则展示全部标签" + name: recentPost + label: 最近发布文章 + value: 4 + help: "文章数量" - $formkit: number - name: categoryQuantity - label: 分类数量 - value: -1 - help: "小于 0 则展示全部分类" - - $formkit: radio - name: tags_switch - label: 标签&归档&统计 (标签按钮开关) - value: true - options: - - label: 显示 - value: true - - label: 隐藏 - value: false - - $formkit: radio - name: archive_switch - label: 标签&归档&统计 (归档按钮开关) - value: true - options: - - label: 显示 - value: true - - label: 隐藏 - value: false + name: newcommentnumber + label: 评论数量 + value: 5 + help: "最新评论数量, 小于 0 则展示5条评论" - $formkit: number name: archivesQuantity label: 归档数量 value: -1 help: "小于 0 则展示全部归档(目前没用等适配)" - $formkit: number - name: newcommentnumber - label: 评论数量 - value: 5 - help: "最新评论数量, 小于 0 则展示5条评论" + name: categoryQuantity + label: 分类数量 + value: -1 + help: "小于 0 则展示全部分类" + - $formkit: number + name: tagQuantity + label: 标签数量 + value: -1 + help: "小于 0 则展示全部标签" - - group: footer - label: 页脚 - formSchema: - - $formkit: attachment - name: centerImg - label: 社交媒体中间logo - help: logo图片链接 - placeholder: 请填写logo图片链接 - - $formkit: repeater - name: socialMediaLeft - label: 社交媒体(左) - value: [] - children: - - $formkit: select - name: icon - label: 图标 - options: - - label: 电子邮箱 - value: icon-mail-line - - label: 微信 - value: icon-wechat2 - - label: 公众号 - value: icon-weixingongzhonghao - - label: 腾讯 QQ - value: icon-qq-line - - label: 新浪微博 - value: icon-weibo-line - - label: 知乎 - value: icon-zhihu-line - - label: 豆瓣 - value: icon-douban-line - - label: 哔哩哔哩 - value: icon-bilibili-line - - label: GitHub - value: icon-github-line - - label: GitLab - value: icon-gitlab-line - - label: 百度 - value: icon-baidu-line - - label: 掘金 - value: icon-juejin - - label: 语雀 - value: icon-yuque - - label: 博客园 - value: icon-CN_cnblogs - - label: CSDN - value: icon-csdn1 - - label: LeetCode - value: icon-leetcode - - label: 头条 - value: icon-jinritoutiao - - label: 抖音 / TikTok - value: icon-douyin - - label: Telegram - value: icon-telegram-line - - label: Facebook - value: icon-facebook-box-line - - label: Instagram - value: icon-instagram-line - - label: LinkedIn - value: icon-linkedin-box-line - - label: Twitter - value: icon-twitter-line - - label: Slack - value: icon-slack-line - - label: Discord - value: icon-discord-line - - label: YouTube - value: icon-youtube-line - - label: Steam - value: icon-steam-fill - - label: Dribbble - value: icon-dribbble-line - - $formkit: text - name: name - label: 名称 - - $formkit: text - name: url - label: 链接 - - $formkit: radio - name: urlType - label: 链接类型 - value: normal - help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载" - options: - - label: 跳转链接 - value: normal - - label: 图片 - value: image - - $formkit: repeater - name: socialMediaRight - label: 社交媒体(右) - value: [] - children: - - $formkit: select - name: icon - label: 图标 - options: - - label: 电子邮箱 - value: icon-mail-line - - label: 微信 - value: icon-wechat2 - - label: 公众号 - value: icon-weixingongzhonghao - - label: 腾讯 QQ - value: icon-qq-line - - label: 新浪微博 - value: icon-weibo-line - - label: 知乎 - value: icon-zhihu-line - - label: 豆瓣 - value: icon-douban-line - - label: 哔哩哔哩 - value: icon-bilibili-line - - label: GitHub - value: icon-github-line - - label: GitLab - value: icon-gitlab-line - - label: 百度 - value: icon-baidu-line - - label: 掘金 - value: icon-juejin - - label: 语雀 - value: icon-yuque - - label: 博客园 - value: icon-CN_cnblogs - - label: CSDN - value: icon-csdn1 - - label: LeetCode - value: icon-leetcode - - label: 头条 - value: icon-jinritoutiao - - label: 抖音 / TikTok - value: icon-douyin - - label: Telegram - value: icon-telegram-line - - label: Facebook - value: icon-facebook-box-line - - label: Instagram - value: icon-instagram-line - - label: LinkedIn - value: icon-linkedin-box-line - - label: Twitter - value: icon-twitter-line - - label: Slack - value: icon-slack-line - - label: Discord - value: icon-discord-line - - label: YouTube - value: icon-youtube-line - - label: Steam - value: icon-steam-fill - - label: Dribbble - value: icon-dribbble-line - - $formkit: text - name: name - label: 名称 - - $formkit: text - name: url - label: 链接 - - $formkit: radio - name: urlType - label: 链接类型 - value: normal - help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载" - options: - - label: 跳转链接 - value: normal - - label: 图片 - value: image - - $formkit: menuRadio - name: menu - label: 底部相关链接 - - $formkit: radio - name: enable_footer_group - label: 启用页脚友链 - value: false - options: - - label: 启用 - value: true - - label: 禁用 - value: false - - $formkit: url - name: fetchUrl - value: "`https://moments.0206.ink/randomfriend?num=3`" - label: 页脚友链地址 - placeholder: 请输入页脚友链地址 - help: 注意格式 (`友链地址`) - group: post label: 文章 @@ -704,16 +777,6 @@ spec: - label: 关闭 value: false help: "是否显示文章摘要" - - $formkit: number - name: recommendQuantity - label: 阅读建议 - value: 4 - help: "推荐阅读的文章数量" - - $formkit: number - name: recentPost - label: 最近发布文章 - value: 4 - help: "最近发布的文章数量" - $formkit: group name: post_edit label: 运营模式与责任 @@ -735,21 +798,36 @@ spec: label: 运营模式与责任地址 placeholder: "请输入运营模式与责任地址" value: "/rss" - - $formkit: radio - name: copyright + - $formkit: group + name: copyrights label: 版权声明 - value: true - options: - - label: 打开 - value: true - - label: 关闭 + value: + enable: + content: + children: + - $formkit: radio + name: enable + id: enable + key: enable value: false - help: "文章底部显示版权声明模块" - - $formkit: textarea - name: copyrightInfo - label: 版权声明 - placeholder: '本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 程序员小航' - help: "版权声明内容,支持填入 HTML 标签" + options: + - label: 打开 + value: true + - label: 关闭 + value: false + help: "文章底部显示版权声明模块" + - $formkit: textarea + if: "$get(enable).value" + name: content + label: 声明内容 + placeholder: '本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 程序员小航' + help: "支持 HTML 语法" + - $formkit: number + name: recommendQuantity + label: 阅读建议 + value: 4 + help: "文章数量" + - group: categories label: 分类 formSchema: @@ -834,9 +912,331 @@ spec: help: 注意保留最后的斜杠 value: https://xx.xx/ + - group: aboutReward + label: 个人(打赏名单) + formSchema: + - $formkit: text + name: title + label: 标题 + placeholder: 请输入内容 + value: 赞赏名单 + - $formkit: text + name: content + label: 内容 + placeholder: 请输入内容 + value: 感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。 + - $formkit: group + name: reward + label: 打赏按钮 + value: + enable_reward: + name: + wxPay: + alipay: + enable_reward_wz: + reward_md_url: + children: + - $formkit: radio + name: enable_reward_wz + help: 启用文章页面打赏 + value: false + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: url + name: reward_md_url + label: 赞赏者名单地址 + placeholder: "请输入赞赏者名单地址" + value: "/about" + - $formkit: radio + name: enable_reward + help: 启用关于页面打赏 + value: false + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: text + name: name + label: 按钮名称 + placeholder: 请输入内容 + value: 赞赏作者 + - $formkit: attachment + name: wxPay + label: 微信 + help: 微信二维码图片链接 + placeholder: 请填写微信二维码图片链接 + - $formkit: attachment + name: alipay + label: 支付宝 + help: 支付宝二维码图片链接 + placeholder: 请填写支付宝二维码图片链接 + - $formkit: repeater + name: reward_list + label: 打赏名单 + value: [ ] + children: + - $formkit: text + name: name + label: 名称 + placeholder: 请输入内容 + - $formkit: text + name: amount + label: 金额 + placeholder: 请输入内容 + - $formkit: date + name: datatime + label: 时间 + placeholder: 请输入内容 + - $formkit: radio + name: sign + label: 标记 + value: "N" + options: + - label: 是 + value: "Y" + - label: 否 + value: "N" + - group: style + label: 样式 + formSchema: + - $formkit: radio + name: colorScheme + label: 默认配色 + value: system + options: + - label: 跟随系统 + value: system + - label: 深色 + value: dark + - label: 浅色 + value: light + - $formkit: checkbox + name: enableChangeColorScheme + label: 允许访客切换配色 + value: true + - $formkit: radio + name: universe + label: 深色模式粒子效果 + value: true + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: textarea + name: fontFamily + label: 全局字体 + placeholder: '"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei"' + - $formkit: url + name: backgroundImg + label: 全局背景图 + placeholder: "请输入图片地址" + - group: comments + label: 评论 + formSchema: + - $formkit: select + name: use + label: 评论选择 + id: use + key: use + value: commentWidget + help: Twikoo评论需要(打开,envId填写,accessToken填写) + options: + - label: 默认 + value: commentWidget + - label: Twikoo评论 + value: Twikoo + - $formkit: radio + if: "$get(use).value == 'Twikoo'" + name: twikooEnable + id: twikooEnable + key: twikooEnable + label: Twikoo评论 + value: false + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: group + if: "$get(twikooEnable).value" + name: twikoos + label: Twikoo评论配置 + value: + maxBarrage: + barrageTime: + envId: + accessToken: + mailMd5: + children: + - $formkit: number + name: maxBarrage + value: 1 + label: 同时最多显示弹幕数 + placeholder: 请输入显示弹幕数 + - $formkit: number + name: barrageTime + value: 4000 + label: 弹幕显示间隔时间ms + placeholder: 请输入间隔时间ms + - $formkit: url + name: envId + value: "`xxxxxxx`" + label: Twikoo评论-环境id + placeholder: 请输入环境id + help: 注意格式 (`地址`) + - $formkit: text + name: accessToken + value: "`xxxxxxx`" + label: Twikoo评论-token + placeholder: 请输入token + help: 注意格式 (`token`) 在控制台中获取 + - $formkit: text + name: mailMd5 + value: "`xxxxxxx`" + label: Twikoo评论-mailMd5 + placeholder: 请输入mailMd5 + help: 注意格式 (`mailMd5`) + + - group: tool + label: 小部件 + formSchema: + - $formkit: group + name: rightMenu + label: 右键菜单 + value: + rightMenuEnable: + children: + - $formkit: radio + name: rightMenuEnable + label: 开关 + value: true + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: group + name: nav_music + label: 左下角音乐配置项 + value: + id: + server: + all_playlist: + meting_api: + children: + - $formkit: radio + name: nav_musicEnable + id: nav_musicEnable + key: nav_musicEnable + label: 启用左下角音乐 + value: false + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: text + name: id + label: 音乐的id + help: 歌单的id,可以从音乐歌单分享的链接中获取 + value: "8668419170" + - $formkit: text + name: server + label: 服务 + help: 歌单的服务商,例如netease(网易云音乐),tencent(腾讯),kugou(酷狗),xiami(小米音乐),baidu(百度音乐) + value: "tencent" + - $formkit: url + name: all_playlist + label: 播放列表地址 + help: 用于右键查看所有歌曲 + value: "https://y.qq.com/n/ryqq/playlist/8668419170" + - $formkit: url + name: meting_api + label: 音乐图片api + value: "https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r" + - $formkit: group + name: snackbar + label: 右下角弹窗 + value: + switch: + introductionTitle: + introductionTip: + introductionUrl: + introductionName: + children: + - $formkit: radio + name: switch + id: switch + key: switch + label: 开关(WIP) + value: false + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: text + if: "$get(switch).value" + name: introductionTitle + label: 介绍框标题 + value: '协议提醒助手' + - $formkit: text + if: "$get(switch).value" + name: introductionTip + label: 介绍框内容 + value: '查看本站为你的个人隐私做出的努力' + - $formkit: url + if: "$get(switch).value" + name: introductionUrl + value: "/privacy" + label: 介绍框点击跳转地址 + placeholder: 请输入跳转 url + - $formkit: text + if: "$get(switch).value" + name: introductionName + value: "本站如何保护你的隐私" + label: 按钮标题 + placeholder: 请输入按钮标题 + + - group: moment + label: 瞬间 + formSchema: + - $formkit: url + name: backgroundImg + validation: "url" + label: 图片 + value: https://p.zhheo.com/2023e02cff7c3ddef5c06b908fef079fbcfe081902.png!cover + placeholder: 请输入图片地址 + - $formkit: text + name: smallTitle + label: 小标题 + value: 即刻短文 + - $formkit: text + name: bigTitle + label: 大标题 + value: 分享生活的小确幸 + - $formkit: text + name: detail + label: 描述 + value: 使用 Halo/Moment插件 构建 + - $formkit: text + name: buttonTitle + label: 按钮标题 + value: 部署瞬间 + - $formkit: url + name: buttonUrl + validation: "url" + value: "https://github.com/halo-sigs/plugin-moments" + label: 按钮跳转连链接 + placeholder: 请输入跳转 url - group: about - label: 个人 + label: 关于 formSchema: - $formkit: repeater name: techStack @@ -1149,183 +1549,6 @@ spec: label: 心路历程 value:
心路历程
为什么建站?
创建这个站的时候,想要就是能够有一个自己能够积累知识、积累兴趣的地方。和他人分享,会让这些成为积累和沉淀。如果能够帮助到更多的人,帮助更多人解决问题,那一定是非常棒的事情。
分享这件事我从很早就开始了,起初做的微信公众号,现在做的网站。因为我比较喜欢研究数码和软件,想要探究在互联网上的事物是如何被创造和发展。网络给我带来了非常多的知识和眼界,我也想力所能及的分享一些我生活的琐碎知识。
与大多数垂直类的技术博客不同,这里的种类会非常的繁杂,有技能的教程干货、有生活上的吐槽和妙招、有话题上的思考和想法。一般我研究什么、发现了什么都会分享在这里。
这些就是创造这个小站的本意,也是我分享生活的方式。有幸能和你相遇在这里,相信我们能共同留下一段美好记忆。

help: 支持 HTML 语法 - - group: aboutReward - label: 个人(打赏名单) - formSchema: - - $formkit: text - name: title - label: 标题 - placeholder: 请输入内容 - value: 赞赏名单 - - $formkit: text - name: content - label: 内容 - placeholder: 请输入内容 - value: 感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。 - - $formkit: group - name: reward - label: 打赏按钮 - value: - enable_reward: - name: - wxPay: - alipay: - enable_reward_wz: - reward_md_url: - children: - - $formkit: radio - name: enable_reward_wz - help: 启用文章页面打赏 - value: false - options: - - label: 启用 - value: true - - label: 禁用 - value: false - - $formkit: url - name: reward_md_url - label: 赞赏者名单地址 - placeholder: "请输入赞赏者名单地址" - value: "/about" - - $formkit: radio - name: enable_reward - help: 启用关于页面打赏 - value: false - options: - - label: 启用 - value: true - - label: 禁用 - value: false - - $formkit: text - name: name - label: 按钮名称 - placeholder: 请输入内容 - value: 赞赏作者 - - $formkit: attachment - name: wxPay - label: 微信 - help: 微信二维码图片链接 - placeholder: 请填写微信二维码图片链接 - - $formkit: attachment - name: alipay - label: 支付宝 - help: 支付宝二维码图片链接 - placeholder: 请填写支付宝二维码图片链接 - - $formkit: repeater - name: reward_list - label: 打赏名单 - value: [ ] - children: - - $formkit: text - name: name - label: 名称 - placeholder: 请输入内容 - - $formkit: text - name: amount - label: 金额 - placeholder: 请输入内容 - - $formkit: date - name: datatime - label: 时间 - placeholder: 请输入内容 - - $formkit: radio - name: sign - label: 标记 - value: "N" - options: - - label: 是 - value: "Y" - - label: 否 - value: "N" - - - group: style - label: 样式(WIP) - formSchema: - - $formkit: radio - name: colorScheme - label: 默认配色 - value: system - options: - - label: 跟随系统 - value: system - - label: 深色 - value: dark - - label: 浅色 - value: light - - $formkit: checkbox - name: enableChangeColorScheme - label: 允许访客切换配色 - value: true - - $formkit: radio - name: universe - label: 深色模式粒子效果 - value: true - options: - - label: 打开 - value: true - - label: 关闭 - value: false - - $formkit: textarea - name: fontFamily - label: 全局字体 - placeholder: '"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei"' - - $formkit: url - name: backgroundImg - label: 全局背景图 - placeholder: "请输入图片地址" - - - - group: snackbar - label: 弹窗 - help: 右下角 snackbar 弹窗 - formSchema: - - $formkit: radio - name: switch - id: switch - key: switch - label: 开关(WIP) - value: false - options: - - label: 打开 - value: true - - label: 关闭 - value: false - - $formkit: text - if: "$get(switch).value" - name: introductionTitle - label: 介绍框标题 - value: '协议提醒助手' - - $formkit: text - if: "$get(switch).value" - name: introductionTip - label: 介绍框内容 - value: '查看本站为你的个人隐私做出的努力' - - $formkit: url - if: "$get(switch).value" - name: introductionUrl - value: "/privacy" - label: 介绍框点击跳转地址 - placeholder: 请输入跳转 url - - $formkit: text - if: "$get(switch).value" - name: introductionName - value: "本站如何保护你的隐私" - label: 按钮标题 - placeholder: 请输入按钮标题 - - - group: rightMenu - label: 右键菜单 - formSchema: - - $formkit: radio - name: switch - label: 开关 - value: true - options: - - label: 打开 - value: true - - label: 关闭 - value: false - - group: link label: 友链 formSchema: @@ -1337,39 +1560,6 @@ spec: name: bigTitle label: 大标题 value: 我和我的小伙伴们 - - - group: moment - label: 瞬间 - formSchema: - - $formkit: url - name: backgroundImg - validation: "url" - label: 图片 - value: https://p.zhheo.com/2023e02cff7c3ddef5c06b908fef079fbcfe081902.png!cover - placeholder: 请输入图片地址 - - $formkit: text - name: smallTitle - label: 小标题 - value: 即刻短文 - - $formkit: text - name: bigTitle - label: 大标题 - value: 分享生活的小确幸 - - $formkit: text - name: detail - label: 描述 - value: 使用 Halo/Moment插件 构建 - - $formkit: text - name: buttonTitle - label: 按钮标题 - value: 部署瞬间 - - $formkit: url - name: buttonUrl - validation: "url" - value: "https://github.com/halo-sigs/plugin-moments" - label: 按钮跳转连链接 - placeholder: 请输入跳转 url - - group: fcircle label: 友链鱼塘 formSchema: @@ -1426,193 +1616,100 @@ spec: - label: 关闭 value: false - - group: comments - label: 评论 - formSchema: - - $formkit: select - name: use - label: 评论选择 - id: use - key: use - value: commentWidget - help: Twikoo评论需要(打开,envId填写,accessToken填写) - options: - - label: 默认 - value: commentWidget - - label: Twikoo评论 - value: Twikoo - - $formkit: radio - if: "$get(use).value == 'Twikoo'" - name: twikooEnable - id: twikooEnable - key: twikooEnable - label: Twikoo评论 - value: false - options: - - label: 打开 - value: true - - label: 关闭 - value: false - - $formkit: group - if: "$get(twikooEnable).value" - name: twikoos - label: Twikoo评论配置 - value: - maxBarrage: - barrageTime: - envId: - accessToken: - mailMd5: - children: - - $formkit: number - name: maxBarrage - value: 1 - label: 同时最多显示弹幕数 - placeholder: 请输入显示弹幕数 - - $formkit: number - name: barrageTime - value: 4000 - label: 弹幕显示间隔时间ms - placeholder: 请输入间隔时间ms - - $formkit: url - name: envId - value: "`xxxxxxx`" - label: Twikoo评论-环境id - placeholder: 请输入环境id - help: 注意格式 (`地址`) - - $formkit: text - name: accessToken - value: "`xxxxxxx`" - label: Twikoo评论-token - placeholder: 请输入token - help: 注意格式 (`token`) 在控制台中获取 - - $formkit: text - name: mailMd5 - value: "`xxxxxxx`" - label: Twikoo评论-mailMd5 - placeholder: 请输入mailMd5 - help: 注意格式 (`mailMd5`) - - group: other label: 其他设置 formSchema: - - $formkit: radio - name: loadingBox + - $formkit: group + name: loadingBoxs label: 加载页 - value: true - options: - - label: 打开 + value: + loadingBoxEnable: + loadingBoxImg: + loadProgressBar: + children: + - $formkit: radio + name: loadingBoxEnable + id: loadingBoxEnable + key: loadingBoxEnable + label: 加载页 value: true - - label: 关闭 - value: false - - $formkit: url - name: loadingBoxImg - validation: "url" - label: 加载页图片 URL - value: "https://bu.dusays.com/2023/03/03/6401a7960c0fb.webp" - placeholder: 请输入图片 url - - $formkit: radio - name: loadProgressBar - label: 页面加载进度条 - value: true - help: 了解更多:https://codebyzach.github.io/pace/ - options: - - label: 开启 + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: url + name: loadingBoxImg + if: "$get(loadingBoxEnable).value" + validation: "url" + label: 加载页图片 URL + value: "https://bu.dusays.com/2023/03/03/6401a7960c0fb.webp" + placeholder: 请输入图片 url + - $formkit: radio + name: loadProgressBar + label: 页面加载进度条 value: true - - label: 关闭 - value: false - - $formkit: radio - name: diytitleEnable - id: diytitleEnable - key: diytitleEnable - help: 启用动态标题 - value: false - options: - - label: 启用 - value: true - - label: 禁用 - value: false + help: 了解更多:https://codebyzach.github.io/pace/ + options: + - label: 开启 + value: true + - label: 关闭 + value: false - $formkit: group name: diytitle label: 动态标题 - if: "$get(diytitleEnable).value" value: leaveTitle: backTitle: + diytitleEnable: children: + - $formkit: radio + name: diytitleEnable + id: diytitleEnable + key: diytitleEnable + value: false + options: + - label: 启用 + value: true + - label: 禁用 + value: false - $formkit: text name: leaveTitle + if: "$get(diytitleEnable).value" label: 离开 value: "w(゚Д゚)w 不要走!再看看嘛!" - $formkit: text name: backTitle + if: "$get(diytitleEnable).value" label: 回到 value: "♪(^∇^*)欢迎肥来!" - - $formkit: radio - name: error_404Enable - id: error_404Enable - key: error_404Enable - label: 启用404页面 - help: 启动前请发布页面(自定义模板选择`页面没用找到`,别名`404`) - value: false - options: - - label: 启用 - value: true - - label: 禁用 - value: false - $formkit: group name: error_404 label: 404页面配置 - if: "$get(error_404Enable).value" value: subtitle: background: + error_404Enable: children: + - $formkit: radio + name: error_404Enable + id: error_404Enable + key: error_404Enable + help: 启动前请发布页面(自定义模板选择`页面没用找到`,别名`404`) + value: false + options: + - label: 启用 + value: true + - label: 禁用 + value: false - $formkit: text name: subtitle + if: "$get(error_404Enable).value" label: 标题 value: "请尝试站内搜索寻找文章" - $formkit: url name: background + if: "$get(error_404Enable).value" label: 背景 value: "/themes/theme-hao/assets/images/404s.gif" - - $formkit: radio - name: nav_musicEnable - id: nav_musicEnable - key: nav_musicEnable - label: 启用左下角音乐 - value: false - options: - - label: 启用 - value: true - - label: 禁用 - value: false - - $formkit: group - name: nav_music - label: 左下角音乐配置项 - value: - id: - server: - all_playlist: - children: - - $formkit: text - name: id - label: 音乐的id - help: 歌单的id,可以从音乐歌单分享的链接中获取 - value: "8668419170" - - $formkit: text - name: server - label: 服务 - help: 歌单的服务商,例如netease(网易云音乐),tencent(腾讯),kugou(酷狗),xiami(小米音乐),baidu(百度音乐) - value: "tencent" - - $formkit: url - name: all_playlist - label: 播放列表地址 - help: 用于右键查看所有歌曲 - value: "https://y.qq.com/n/ryqq/playlist/8668419170" - - $formkit: url - name: meting_api - label: 音乐图片api - value: "https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r" - diff --git a/templates/archives.html b/templates/archives.html index 891c94b5..a28abbd8 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -50,7 +50,7 @@
-
+
diff --git a/templates/category.html b/templates/category.html index d52ea272..d268c0f4 100644 --- a/templates/category.html +++ b/templates/category.html @@ -65,7 +65,7 @@
-
+
diff --git a/templates/index.html b/templates/index.html index 9a169ed7..3bd328ee 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,12 +19,12 @@
-
+
-
+
diff --git a/templates/modules/bar/custom-category.html b/templates/modules/bar/custom-category.html index ab428ba5..22379e56 100644 --- a/templates/modules/bar/custom-category.html +++ b/templates/modules/bar/custom-category.html @@ -7,7 +7,7 @@ 首页 - +
diff --git a/templates/modules/bar/custom-tag.html b/templates/modules/bar/custom-tag.html index 3f8b0aac..35563870 100644 --- a/templates/modules/bar/custom-tag.html +++ b/templates/modules/bar/custom-tag.html @@ -7,7 +7,7 @@ 首页
- +
diff --git a/templates/modules/bar/custom-url.html b/templates/modules/bar/custom-url.html index a9d945b5..ffa381c3 100644 --- a/templates/modules/bar/custom-url.html +++ b/templates/modules/bar/custom-url.html @@ -7,7 +7,7 @@ 首页
- +
更多 + th:if="${#strings.equals(theme.config.layout.navs.navMore, 'categories') }">更多 更多 - 更多 + th:if="${#strings.equals(theme.config.layout.navs.navMore, 'tags') }">更多 + 更多 \ No newline at end of file diff --git a/templates/modules/footer.html b/templates/modules/footer.html index 1ca34a0d..487b6369 100644 --- a/templates/modules/footer.html +++ b/templates/modules/footer.html @@ -5,16 +5,16 @@
-