mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 14:19:52 +08:00
安全链接页面跟随主题显示暗黑或高亮模式
This commit is contained in:
parent
f4d4e69fdc
commit
691b702040
@ -1462,10 +1462,12 @@ spec:
|
||||
validation: required
|
||||
placeholder: '请输入使用“安全链接页面模版”创建的页面访问路径'
|
||||
help: '输入使用”安全链接页面模版“创建的页面访问路径,不能省略’/‘。'
|
||||
- $formkit: text
|
||||
- $formkit: code
|
||||
name: security_link_tip_desc
|
||||
if: $get(enable_security_link).value
|
||||
label: 安全链接页面-提示区域文本描述
|
||||
language: html
|
||||
height: 45px
|
||||
placeholder: '请输入安全链接页面提示区域的文本描述'
|
||||
help: '输入安全链接页面提示区域的文本描述,留空使用默认文本描述。'
|
||||
- $formkit: number
|
||||
@ -1483,9 +1485,9 @@ spec:
|
||||
label: 安全链接页面-跳转提示区域文本描述
|
||||
language: html
|
||||
height: 45px
|
||||
value: '您即将离开<span>{title}</span>,去往:<span>{url}</span>'
|
||||
value: '您即将离开{title},去往:{url}'
|
||||
placeholder: '请输入安全链接页面跳转提示区域的文本描述'
|
||||
help: '"“ {title} ”表示站点主标题,“ {url} ”表示跳转URL,区分大小写。默认值:“您即将离开<span>{title}</span>,去往:<span>{url}</span>”'
|
||||
help: '"“ {title} ”表示站点主标题,“ {url} ”表示跳转URL,区分大小写。默认值:“您即将离开{title},去往:{url}”'
|
||||
- group: pwa
|
||||
label: 'PWA配置'
|
||||
formSchema:
|
||||
|
@ -28,18 +28,15 @@
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url([[${#strings.defaultString(theme.config.security_link_config.security_link_site_img_background, '')}]]);
|
||||
}
|
||||
|
||||
html.light body {
|
||||
background-color: #f6d365;
|
||||
background-image: linear-gradient(135deg, #f6d365 0%, #fda085 100%), url([[${#strings.defaultString(theme.config.security_link_config.security_link_site_img_background, '')}]]);
|
||||
background-image: linear-gradient(135deg, #ffffff 0%, #ebebeb 100%), url([[${#strings.defaultString(theme.config.security_link_config.security_link_site_img_background, '')}]]);
|
||||
background-blend-mode: overlay;
|
||||
}
|
||||
|
||||
html.dark body {
|
||||
background-color: #434343;
|
||||
background-image: linear-gradient(135deg, #434343 0%, #000000 100%), url([[${#strings.defaultString(theme.config.security_link_config.security_link_site_img_background, '')}]]);
|
||||
background-image: linear-gradient(135deg, #364f6b 0%, #222831 100%), url([[${#strings.defaultString(theme.config.security_link_config.security_link_site_img_background, '')}]]);
|
||||
background-blend-mode: overlay;
|
||||
}
|
||||
|
||||
@ -58,10 +55,6 @@
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
html.dark body {
|
||||
background: linear-gradient(135deg, #434343 0%, #000000 100%);
|
||||
}
|
||||
|
||||
html.dark .loading {
|
||||
background: rgba(57, 62, 70, 0.6);
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||||
@ -130,7 +123,7 @@
|
||||
|
||||
/* 暗黑主题 */
|
||||
html.dark body {
|
||||
background: linear-gradient(135deg, #364f6b, #222831);
|
||||
/*background: linear-gradient(135deg, #364f6b, #222831);*/
|
||||
}
|
||||
|
||||
html.dark .loading {
|
||||
@ -157,6 +150,13 @@
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.loading {
|
||||
width: 75% !important;
|
||||
max-width: 400px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 35px;
|
||||
@ -262,6 +262,8 @@
|
||||
|
||||
.content-title {
|
||||
margin-bottom: 20px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-title img {
|
||||
@ -350,8 +352,7 @@
|
||||
th:text="${t1}"></span>
|
||||
</div>
|
||||
<div class="others">
|
||||
<div class="others-tip">
|
||||
<span>[[${#strings.isEmpty(theme.config.security_link_config.security_link_tip_desc) ? '请注意您的账号和财产安全!': theme.config.security_link_config.security_link_tip_desc}]]</span>
|
||||
<div class="others-tip" th:utext="${#strings.defaultString(theme.config.security_link_config.security_link_tip_desc, '请注意您的账号和财产安全!')}">
|
||||
</div>
|
||||
<div class="others-topic" th:with="oDesc = ${theme.config.security_link_config.security_link_jump_desc},
|
||||
o1 = ${#strings.replace(oDesc, '{title}', site.title)},
|
||||
@ -386,6 +387,21 @@
|
||||
document.querySelector('.progress-bar').style.display = 'none';
|
||||
document.querySelector('.countdown-text').style.display = 'none';
|
||||
}
|
||||
|
||||
/** 配置主题模式 */
|
||||
let default_theme = '[[${theme.config.basic_style.default_theme}]]';
|
||||
const hasNightInLocal = () => localStorage.getItem('night') !== null;
|
||||
const getNightInConfig = () => {
|
||||
if (default_theme === 'night') {
|
||||
return true;
|
||||
}
|
||||
if (default_theme === 'system') {
|
||||
return matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
let isNight = hasNightInLocal() ? localStorage.getItem('night') : getNightInConfig();
|
||||
document.documentElement.classList.add(isNight.toString() === 'true' ? 'dark' : 'light');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@ -30,7 +30,7 @@ spec:
|
||||
settingName: theme-dream2-plus-setting
|
||||
configMapName: theme-dream2-plus-configMap
|
||||
# 版本号
|
||||
version: 1.4.2.beta3
|
||||
version: 1.4.2.beta4
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.20.0"
|
||||
# 许可
|
||||
|
Loading…
x
Reference in New Issue
Block a user