From 7550d8abc3978d083b62ba592a3ad531d31d0b82 Mon Sep 17 00:00:00 2001 From: mjsoftware <1406993111@qq.com> Date: Sun, 25 Feb 2024 11:45:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E7=A6=BB=E5=B1=8F=E4=BF=A1=E6=81=AF=E5=92=8Cpjax=E5=90=8E?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E6=A0=87=E9=A2=98=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=EF=BC=9A=E6=94=AF=E6=8C=81=E9=9A=90=E8=97=8F=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 10 ++++++++++ src/js/common.js | 6 ++++-- templates/common/footer.html | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/settings.yaml b/settings.yaml index a735535..1bb2163 100644 --- a/settings.yaml +++ b/settings.yaml @@ -69,6 +69,16 @@ spec: value: false - label: 居中 value: true + - $formkit: radio + name: footer_hide_theme_info + label: 页脚主题信息 + value: false + help: 控制页脚主题信息“Powered by Halo & Dream”的显示或隐藏。 + options: + - label: 显示 + value: false + - label: 隐藏 + value: true - group: basic_style label: '基础样式' formSchema: diff --git a/src/js/common.js b/src/js/common.js index 1e82f17..893b3d4 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -282,10 +282,12 @@ const commonContext = { /* 离屏提示 */ offscreenTip() { if (Utils.isMobile() || (!DreamConfig.document_hidden_title && !DreamConfig.document_visible_title)) return - const originTitle = document.title + // const originTitle = document.title + let originTitle = document.title let timer = null document.addEventListener('visibilitychange', function () { if (document.hidden) { + originTitle = document.title DreamConfig.document_hidden_title && (document.title = DreamConfig.document_hidden_title) clearTimeout(timer) } else { @@ -560,7 +562,7 @@ const commonContext = { window.commonContext = commonContext !(function () { - const loads = ['initCarousel', 'sparkInput', 'websiteTime', 'initComment', 'webCopyright', 'initTimeCount'] + const loads = ['initCarousel', 'sparkInput', 'websiteTime', 'initComment'] const omits = ['initEffects', 'loadMaintain', 'showThemeVersion'] Object.keys(commonContext).forEach( diff --git a/templates/common/footer.html b/templates/common/footer.html index fb66525..a0804bd 100644 --- a/templates/common/footer.html +++ b/templates/common/footer.html @@ -15,7 +15,7 @@
+ th:text="${theme.config.basic_info.record_number}">建站00天0时0分0秒