summaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/navbar.templ3
-rw-r--r--templates/root.templ2
2 files changed, 2 insertions, 3 deletions
diff --git a/templates/navbar.templ b/templates/navbar.templ
index 5007183..f0d654c 100644
--- a/templates/navbar.templ
+++ b/templates/navbar.templ
@@ -77,8 +77,7 @@ templ navbar() {
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
- <!-- TODO: if theme == dark -->
- if true {
+ if ctx.Value("theme").(string) == "dark" {
<path
d="M 7.28451 10.3333
C 7.10026 10.8546
diff --git a/templates/root.templ b/templates/root.templ
index da63caa..832846e 100644
--- a/templates/root.templ
+++ b/templates/root.templ
@@ -10,7 +10,7 @@ templ Root(head, body templ.Component) {
{{ p := ctx.Value("printer").(i18n.Printer) }}
<!DOCTYPE html>
- <html lang={ p.Locale.Code } data-theme="dark">
+ <html lang={ p.Locale.Code } data-theme={ ctx.Value("theme").(string) }>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />