aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/index.html49
1 files changed, 26 insertions, 23 deletions
diff --git a/public/index.html b/public/index.html
index 4b34f55..1781510 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1,31 +1,34 @@
<!DOCTYPE html>
-<html lang="en">
+<html lang="en" data-theme="light" class="">
+
<head>
- <meta charset='utf-8'>
- <meta name='viewport' content='width=device-width,initial-scale=1'>
-
- <title>PT Scheduler</title>
-
- <link rel='icon' type='image/png' href='./favicon.png'>
-
- <link rel='stylesheet' href='./build/bundle.css'>
- <link
- rel="stylesheet"
- href="https://cdn.jsdelivr.net/npm/svelte-material-ui@4.2.0/bare.min.css"
- />
- <link
- rel="stylesheet"
- href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"
- />
- <link
- rel="stylesheet"
- href="https://fonts.googleapis.com/icon?family=Material+Icons"
- />
+ <meta charset='utf-8'>
+ <meta name='viewport' content='width=device-width,initial-scale=1'>
+
+ <title>PT Scheduler</title>
+
+ <link rel='icon' type='image/png' href='./favicon.png'>
+
+ <link rel='stylesheet' href='./build/bundle.css'>
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/svelte-material-ui@4.2.0/bare.min.css" />
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" />
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<!-- Load the Svelte output -->
- <script defer src='./build/bundle.js'></script>
+ <script defer src='./build/bundle.js'></script>
+
+ <!-- Set initial theme the theme -->
+ <script>
+ if ("theme" in localStorage)
+ document.documentElement.setAttribute('data-theme', localStorage.theme)
+ else if (window.matchMedia('(prefers-color-scheme: dark)').matches)
+ localStorage.theme = 'dark'
+ else
+ localStorage.theme = 'light'
+ </script>
</head>
<body>
</body>
-</html>
+
+</html> \ No newline at end of file