Site updated: 2024-06-05 00:10:01

This commit is contained in:
SharwOrange橙夜 2024-06-05 00:10:01 +08:00
parent f3f731e8c1
commit d10b6ebf96
Signed by: SharwOrange
GPG Key ID: 5507630E4F33F4B1
13 changed files with 315 additions and 68 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@
toc: true, toc: true,
rightside: true, rightside: true,
}, },
autoDarkmode: false autoDarkmode: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { }</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'Blog终于弄好了', title: 'Blog终于弄好了',
isPost: true, isPost: true,
@ -134,8 +134,27 @@
} }
const t = saveToLocal.get('theme') const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode() const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
else if (t === 'light') activateLightMode() const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
if (t === undefined) {
if (isLightMode) activateLightMode()
else if (isDarkMode) activateDarkMode()
else if (isNotSpecified || hasNoSupport) {
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
if (saveToLocal.get('theme') === undefined) {
e.matches ? activateDarkMode() : activateLightMode()
}
})
} else if (t === 'light') activateLightMode()
else activateDarkMode()
const detectApple = () => { const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){ if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){

View File

@ -48,7 +48,7 @@
toc: true, toc: true,
rightside: true, rightside: true,
}, },
autoDarkmode: false autoDarkmode: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { }</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '让Geyser用上外置登录使用Authlib-Injector', title: '让Geyser用上外置登录使用Authlib-Injector',
isPost: true, isPost: true,
@ -134,8 +134,27 @@
} }
const t = saveToLocal.get('theme') const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode() const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
else if (t === 'light') activateLightMode() const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
if (t === undefined) {
if (isLightMode) activateLightMode()
else if (isDarkMode) activateDarkMode()
else if (isNotSpecified || hasNoSupport) {
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
if (saveToLocal.get('theme') === undefined) {
e.matches ? activateDarkMode() : activateLightMode()
}
})
} else if (t === 'light') activateLightMode()
else activateDarkMode()
const detectApple = () => { const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){ if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){

View File

@ -48,7 +48,7 @@
toc: true, toc: true,
rightside: true, rightside: true,
}, },
autoDarkmode: false autoDarkmode: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { }</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '御三家启动器外置使用教程PCL2、HMCL、BakaXL', title: '御三家启动器外置使用教程PCL2、HMCL、BakaXL',
isPost: true, isPost: true,
@ -134,8 +134,27 @@
} }
const t = saveToLocal.get('theme') const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode() const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
else if (t === 'light') activateLightMode() const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
if (t === undefined) {
if (isLightMode) activateLightMode()
else if (isDarkMode) activateDarkMode()
else if (isNotSpecified || hasNoSupport) {
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
if (saveToLocal.get('theme') === undefined) {
e.matches ? activateDarkMode() : activateLightMode()
}
})
} else if (t === 'light') activateLightMode()
else activateDarkMode()
const detectApple = () => { const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){ if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){

File diff suppressed because one or more lines are too long