refactor(web): default theme to light onlyUnverified
9010e40 parent: d310c84 modified
web/src/app.css +1 -1 | @@ -30,7 +30,7 @@ | ||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | :root { |
| 33 | - color-scheme: light dark; | |
| 33 | + color-scheme: light; | |
| 34 | 34 | --bg: #fafaf7; |
| 35 | 35 | --fg: #0a0a0a; |
| 36 | 36 | --surface: #f0efe9; |
| @@ -30,7 +30,7 @@ | |||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | :root { | 32 | :root { |
| 33 | - color-scheme: light dark; | 33 | + color-scheme: light; |
| 34 | --bg: #fafaf7; | 34 | --bg: #fafaf7; |
| 35 | --fg: #0a0a0a; | 35 | --fg: #0a0a0a; |
| 36 | --surface: #f0efe9; | 36 | --surface: #f0efe9; |
modified
web/src/app.html +1 -5 | @@ -8,11 +8,7 @@ | ||
| 8 | 8 | /> |
| 9 | 9 | <script> |
| 10 | 10 | (function () { |
| 11 | - var p = | |
| 12 | - localStorage.getItem("theme") || | |
| 13 | - (window.matchMedia("(prefers-color-scheme:dark)").matches | |
| 14 | - ? "dark" | |
| 15 | - : "light"); | |
| 11 | + var p = localStorage.getItem("theme") || "light"; | |
| 16 | 12 | document.documentElement.setAttribute("data-theme", p); |
| 17 | 13 | })(); |
| 18 | 14 | </script> |
| @@ -8,11 +8,7 @@ | |||
| 8 | /> | 8 | /> |
| 9 | <script> | 9 | <script> |
| 10 | (function () { | 10 | (function () { |
| 11 | - var p = | 11 | + var p = localStorage.getItem("theme") || "light"; |
| 12 | - localStorage.getItem("theme") || | ||
| 13 | - (window.matchMedia("(prefers-color-scheme:dark)").matches | ||
| 14 | - ? "dark" | ||
| 15 | - : "light"); | ||
| 16 | document.documentElement.setAttribute("data-theme", p); | 12 | document.documentElement.setAttribute("data-theme", p); |
| 17 | })(); | 13 | })(); |
| 18 | </script> | 14 | </script> |