app.html 973 Bytes
Newer Older
Timothy J. Baek's avatar
Timothy J. Baek committed
1
2
3
4
5
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<link rel="icon" href="%sveltekit.assets%/favicon.png" />
ntimo's avatar
ntimo committed
6
		<link rel="manifest" href="%sveltekit.assets%/manifest.json" />
Timothy J. Baek's avatar
Timothy J. Baek committed
7
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
Timothy J. Baek's avatar
Timothy J. Baek committed
8
9
10
11
12
13
14
		<script>
			// On page load or when changing themes, best to add inline in `head` to avoid FOUC
			if (
				localStorage.theme === 'light' ||
				(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches)
			) {
				document.documentElement.classList.add('light');
15
			} else if (localStorage.theme === 'dark') {
Timothy J. Baek's avatar
Timothy J. Baek committed
16
				document.documentElement.classList.add('dark');
Timothy J. Baek's avatar
Timothy J. Baek committed
17
18
			} else {
				document.documentElement.classList.add('dark');
19
				document.documentElement.classList.add(localStorage.theme);
Timothy J. Baek's avatar
Timothy J. Baek committed
20
21
22
			}
		</script>

Timothy J. Baek's avatar
Timothy J. Baek committed
23
24
25
26
27
28
		%sveltekit.head%
	</head>
	<body data-sveltekit-preload-data="hover">
		<div style="display: contents">%sveltekit.body%</div>
	</body>
</html>