summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/js/theme-switcher.js12
-rw-r--r--mumi/web/view/html.scm8
2 files changed, 9 insertions, 11 deletions
diff --git a/assets/js/theme-switcher.js b/assets/js/theme-switcher.js
index 0cca832..f2e58f6 100644
--- a/assets/js/theme-switcher.js
+++ b/assets/js/theme-switcher.js
@@ -91,11 +91,9 @@ const themeSwitcher = {
},
};
-window.addEventListener('load', function () {
- themeSwitcher.addButton({
- tag: 'BUTTON',
- class: 'contrast switcher theme-switcher',
- target: 'body',
- });
- themeSwitcher.init();
+themeSwitcher.addButton({
+ tag: 'BUTTON',
+ class: 'contrast switcher theme-switcher',
+ target: 'body',
});
+themeSwitcher.init();
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm
index 4d47ef0..28cef64 100644
--- a/mumi/web/view/html.scm
+++ b/mumi/web/view/html.scm
@@ -51,7 +51,7 @@
(body '())
(title "Guix issue tracker"))
`((doctype "html")
- (html (@ (data-theme "light") (lang "en"))
+ (html (@ (lang "en"))
(head
(title ,title)
(meta (@ (http-equiv "Content-Type") (content "text/html; charset=UTF-8")))
@@ -63,10 +63,10 @@
(media "screen")
(type "text/css")
(href "/css/mumi.css?20221220000000")))
- (script
- (@ (src "/js/theme-switcher.js")))
,@head)
- (body ,@body
+ (body (script
+ (@ (src "/js/theme-switcher.js")))
+ ,@body
(footer (@ (class "text-center"))
(p "Copyright © 2016—2022 by the GNU Guix community."
(br)