WIP: My personal website
1<!doctype html>
2<html lang="en" class="scroll-p-32 scroll-smooth">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <meta name="text-scale" content="scale" />
7 <script>
8 // Apply the saved (or system) theme before paint to avoid a flash of the wrong theme.
9 (() => {
10 try {
11 const saved = localStorage.getItem('theme');
12 const theme =
13 saved ?? (matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
14 document.documentElement.setAttribute('data-theme', theme);
15 } catch {
16 /* localStorage may be unavailable */
17 }
18 })();
19 </script>
20 %sveltekit.head%
21 </head>
22 <body data-sveltekit-preload-data="hover">
23 <div style="display: contents">%sveltekit.body%</div>
24 </body>
25</html>