feat: add warm sand theme colors and light / dark mode toggle (#302)
This commit was merged in pull request #302.
This commit is contained in:
+17
-1
@@ -1,8 +1,24 @@
|
||||
<!doctype html>
|
||||
<html class="dark">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>llink</title>
|
||||
<script>
|
||||
// Apply the stored theme before first paint to avoid a flash. Mirrors
|
||||
// the logic in stores/theme-store.ts; defaults to dark.
|
||||
try {
|
||||
var m = localStorage.getItem('llink:theme');
|
||||
var dark =
|
||||
m === 'light'
|
||||
? false
|
||||
: m === 'system'
|
||||
? matchMedia('(prefers-color-scheme: dark)').matches
|
||||
: true;
|
||||
if (dark) document.documentElement.classList.add('dark');
|
||||
} catch (e) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in New Issue
Block a user