-
Notifications
You must be signed in to change notification settings - Fork 242
/
Copy pathapp.html
30 lines (28 loc) · 1018 Bytes
/
app.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="icon" href="%sveltekit.assets%/favicon.png">
<meta name="color-scheme" content="dark light">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#fff">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2e2e2e">
<meta
name="description"
content="Learn Svelte and SvelteKit with an interactive browser-based tutorial"
>
<link rel="manifest" href="/manifest.json">
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<script>
const themeValue = JSON.parse(localStorage.getItem('svelte:theme'))?.current;
const systemPreferredTheme = window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light';
document.body.classList.remove('light', 'dark');
document.body.classList.add(themeValue ?? systemPreferredTheme);
</script>
<div>%sveltekit.body%</div>
</body>
</html>