chore: dark mode should be the default
This commit is contained in:
parent
848e6102a1
commit
92e99e3fb4
@ -6,7 +6,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="preconnect" href="https://api.fonts.coollabs.io" crossorigin>
|
<link rel="preconnect" href="https://api.fonts.coollabs.io" crossorigin>
|
||||||
<link rel="dns-prefetch" href="https://api.fonts.coollabs.io" />
|
<link rel="dns-prefetch" href="https://api.fonts.coollabs.io" />
|
||||||
<link rel="preload" href="https://api.fonts.coollabs.io/css2?family=Inter:wght@400;500;600;700;800&display=swap" as="style" />
|
<link rel="preload" href="https://api.fonts.coollabs.io/css2?family=Inter:wght@400;500;600;700;800&display=swap"
|
||||||
|
as="style" />
|
||||||
<link rel="preload" href="https://cdn.fonts.coollabs.io/inter/normal/400.woff2" as="style" />
|
<link rel="preload" href="https://cdn.fonts.coollabs.io/inter/normal/400.woff2" as="style" />
|
||||||
<link rel="preload" href="https://cdn.fonts.coollabs.io/inter/normal/500.woff2" as="style" />
|
<link rel="preload" href="https://cdn.fonts.coollabs.io/inter/normal/500.woff2" as="style" />
|
||||||
<link rel="preload" href="https://cdn.fonts.coollabs.io/inter/normal/600.woff2" as="style" />
|
<link rel="preload" href="https://cdn.fonts.coollabs.io/inter/normal/600.woff2" as="style" />
|
||||||
@ -49,11 +50,7 @@
|
|||||||
} else if (localStorage.theme === 'light') {
|
} else if (localStorage.theme === 'light') {
|
||||||
document.documentElement.classList.remove('dark')
|
document.documentElement.classList.remove('dark')
|
||||||
} else {
|
} else {
|
||||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
||||||
document.documentElement.classList.add('dark')
|
document.documentElement.classList.add('dark')
|
||||||
} else {
|
|
||||||
document.documentElement.classList.remove('dark')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@auth
|
@auth
|
||||||
window.Pusher = Pusher;
|
window.Pusher = Pusher;
|
||||||
|
Loading…
Reference in New Issue
Block a user