Add Lotusdocs theme
This commit is contained in:
1 parent
d051d46d1f
commit
8a4d04db58
577 files changed
+40404
No files matched your search
@@ -0,0 +1,15 @@
|
||||
const globalDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const localMode = localStorage.getItem('theme');
|
||||
|
||||
if (globalDark && (localMode === null)) {
|
||||
localStorage.setItem('theme', 'dark');
|
||||
document.documentElement.setAttribute('data-dark-mode', '');
|
||||
}
|
||||
|
||||
if (globalDark && (localMode === 'dark')) {
|
||||
document.documentElement.setAttribute('data-dark-mode', '');
|
||||
}
|
||||
|
||||
if (localMode === 'dark') {
|
||||
document.documentElement.setAttribute('data-dark-mode', '');
|
||||
}
|
||||
Reference in new issue
Block a user