diff options
| -rw-r--r-- | assets/css/style.scss | 6 | ||||
| -rw-r--r-- | content/script.js | 5 | ||||
| -rw-r--r-- | templates/base.html | 3 |
3 files changed, 3 insertions, 11 deletions
diff --git a/assets/css/style.scss b/assets/css/style.scss index 3d9dde1..cd27f35 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss | |||
| @@ -40,8 +40,8 @@ | |||
| 40 | @include assign($breakpoint); | 40 | @include assign($breakpoint); |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| 43 | } | ||
| 44 | 43 | ||
| 45 | .t-light { | 44 | @media (prefers-color-scheme: light) { |
| 46 | @include assign('light'); | 45 | @include assign('light'); |
| 46 | } | ||
| 47 | } | 47 | } |
diff --git a/content/script.js b/content/script.js deleted file mode 100644 index 649da9e..0000000 --- a/content/script.js +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | const lightTheme = localStorage.getItem("light"); | ||
| 2 | |||
| 3 | if (lightTheme === "true") { | ||
| 4 | document.documentElement.classList.add("t-light"); | ||
| 5 | } | ||
diff --git a/templates/base.html b/templates/base.html index 6006211..d9aaa8e 100644 --- a/templates/base.html +++ b/templates/base.html | |||
| @@ -28,11 +28,8 @@ | |||
| 28 | <link rel="preload" href="/GaretVariable.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> | 28 | <link rel="preload" href="/GaretVariable.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> |
| 29 | <link rel="preload" href="/iosevka-term-ss09-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> | 29 | <link rel="preload" href="/iosevka-term-ss09-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> |
| 30 | <link rel="preload" href="/iosevka-term-ss09-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> | 30 | <link rel="preload" href="/iosevka-term-ss09-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> |
| 31 | <link rel="preload" href="/script.js" as="script" /> | ||
| 32 | 31 | ||
| 33 | <link rel="stylesheet" href="/style.css" /> | 32 | <link rel="stylesheet" href="/style.css" /> |
| 34 | |||
| 35 | <script src="/script.js"></script> | ||
| 36 | </head> | 33 | </head> |
| 37 | 34 | ||
| 38 | <body> | 35 | <body> |
