second commit
This commit is contained in:
1 parent
b903eb32cf
commit
d56f087f8c
39 files changed
+656
-17131
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -1,19 +0,0 @@
|
||||
// The section must not be in the banner.js (body) file because it can create a quick flash.
|
||||
|
||||
//
|
||||
|
||||
;
|
||||
// The section must not be in the theme.js (body) file because it can create a quick flash (switch between light and dark).
|
||||
|
||||
function setTheme(theme) {
|
||||
document.documentElement.classList.remove("light", "dark");
|
||||
|
||||
if (theme !== "light" && theme !== "dark") {
|
||||
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
}
|
||||
|
||||
document.documentElement.classList.add(theme);
|
||||
document.documentElement.style.colorScheme = theme;
|
||||
}
|
||||
|
||||
setTheme("color-theme" in localStorage ? localStorage.getItem("color-theme") : 'dark')
|
||||
-1108
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user