✨ 主页布局构建完成
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 3.9 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
@@ -0,0 +1,14 @@
|
||||
// darkVerify.js
|
||||
if (
|
||||
localStorage.getItem('system-theme-mode') === "dark" ||
|
||||
(!localStorage.getItem('system-theme-mode') &&
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches)
|
||||
) {
|
||||
document.querySelector('html').classList.add('dark');
|
||||
document.querySelector('html').classList.remove('light');
|
||||
localStorage.setItem('system-theme-mode', 'dark');
|
||||
} else {
|
||||
document.querySelector('html').classList.add('light');
|
||||
document.querySelector('html').classList.remove('dark');
|
||||
localStorage.setItem('system-theme-mode', 'light');
|
||||
}
|
||||
Reference in New Issue
Block a user