diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-04-21 22:56:56 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-04-21 22:56:56 +0200 |
| commit | 2f975c41933731d81e570029fb59457399ec6d0d (patch) | |
| tree | 9c1ab1bfcf50472cf14f83fd79d6e637d99725eb /src/webapp/index.html | |
| parent | 1d482a4ec2cf24dbe7cc6cb02e192e1b9545f796 (diff) | |
| download | bookmark-thing-2f975c41933731d81e570029fb59457399ec6d0d.tar.xz bookmark-thing-2f975c41933731d81e570029fb59457399ec6d0d.zip | |
.
Diffstat (limited to 'src/webapp/index.html')
| -rw-r--r-- | src/webapp/index.html | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/webapp/index.html b/src/webapp/index.html index 490ab50..557f986 100644 --- a/src/webapp/index.html +++ b/src/webapp/index.html @@ -1,26 +1,23 @@ <!DOCTYPE html> -<html lang="en" - theme="white"> +<html lang="en" theme="dark"> + <head> - <meta charset="UTF-8"/> - <link rel="icon" - href="/favicon.ico"/> - <meta name="viewport" - content="width=device-width, initial-scale=1.0"/> - <script> - const prefs = sessionStorage.getItem("preferences"); - const prefsObj = JSON.parse(prefs ?? "{}"); - if (prefsObj?.theme === 1 || window.matchMedia("(prefers-color-scheme: dark)").matches) { - document.documentElement.setAttribute("theme", "g100"); - } else { - document.documentElement.setAttribute("theme", "white"); - } - </script> - <title>Bookmark thing</title> + <meta charset="UTF-8" /> + <link rel="icon" href="/favicon.ico" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <script> + if (JSON.parse(sessionStorage.getItem("preferences") ?? "{}")?.theme === 1 || window.matchMedia("(prefers-color-scheme: dark)").matches) { + document.documentElement.setAttribute("theme", "dark"); + } else { + document.documentElement.setAttribute("theme", "light"); + } + </script> + <title>Bookmark thing</title> </head> + <body> -<div id="app"></div> -<script type="module" - src="/src/main.ts"></script> + <div id="app"></div> + <script type="module" src="/src/main.ts"></script> </body> + </html> |
