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 @@ Powered by Halo & Dream

+ th:text="${theme.config.basic_info.record_number}">Powered by Halo & Dream

建站00000