From 7412c9ed68191584f447194c67cd62a9c46a0875 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Thu, 7 May 2026 12:21:03 +0200 Subject: [PATCH] feat: add light mode support across all templates --- static/style.css | 18 ++-- templates/anime.gohtml | 118 ++++++++++++------------- templates/base.gohtml | 17 ++-- templates/browse.gohtml | 8 +- templates/components/anime_card.gohtml | 4 +- templates/components/filter_bar.gohtml | 66 +++++++------- templates/components/footer.gohtml | 6 +- templates/components/header.gohtml | 39 ++++---- templates/components/navigation.gohtml | 34 +++---- templates/discover.gohtml | 21 +++-- templates/index.gohtml | 13 +-- templates/watchlist.gohtml | 52 +++++------ 12 files changed, 200 insertions(+), 196 deletions(-) diff --git a/static/style.css b/static/style.css index 4a8ed97..6e1808a 100644 --- a/static/style.css +++ b/static/style.css @@ -6,17 +6,19 @@ @source "../web/**/*.templ"; @theme { - --color-background: #080808; - --color-background-sidebar: #0f0f0f; - --color-background-header: #141414; - --color-background-surface: #202020; - --color-background-button: #1a1a1a; - --color-background-button-hover: #252525; + --color-background: light-dark(#ffffff, #080808); + --color-background-sidebar: light-dark(#fafaf9, #0f0f0f); + --color-background-header: light-dark(#ffffff, #141414); + --color-background-surface: light-dark(#f5f5f4, #202020); + --color-background-button: light-dark(#ffffff, #1a1a1a); + --color-background-button-hover: light-dark(#f5f5f4, #252525); - --color-foreground-muted: #6a6b70; - --color-foreground: #f8f9fa; + --color-foreground-muted: light-dark(#6b7280, #6a6b70); + --color-foreground: light-dark(#1f2937, #f8f9fa); --color-accent: #0466c8; + --color-border: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.08)); + --color-surface-hover: light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.04)); } :root { diff --git a/templates/anime.gohtml b/templates/anime.gohtml index 56e24b5..0236b7f 100644 --- a/templates/anime.gohtml +++ b/templates/anime.gohtml @@ -1,17 +1,17 @@ {{define "anime_characters"}}
-

Characters & Cast

+

Characters & Cast

{{range (slice . 0 (min (len .) 10))}} -
-
+
+
{{.Character.Name}}
- {{.Character.Name}} - {{.Role}} + {{.Character.Name}} + {{.Role}} {{if .VoiceActors}} - {{(index .VoiceActors 0).Person.Name}} + {{(index .VoiceActors 0).Person.Name}} {{end}}
@@ -23,14 +23,14 @@ {{define "anime_recommendations"}} {{if .}}
-

Recommendations

+

Recommendations

{{range (slice . 0 (min (len .) 8))}} - @@ -46,7 +46,7 @@
-
+
{{$imageUrl := "https://placehold.co/400x600?text=No+Image"}} {{if $anime.Images.Webp.LargeImageURL}} {{$imageUrl = $anime.Images.Webp.LargeImageURL}} @@ -59,17 +59,17 @@
-

+

{{$anime.DisplayTitle}}

{{if and $anime.TitleEnglish (ne $anime.Title $anime.TitleEnglish)}} -

{{$anime.Title}}

+

{{$anime.Title}}

{{end}}
-
+
{{if $anime.Score}} -
+
{{$anime.Score}}
@@ -90,10 +90,10 @@
-

Synopsis

-

{{if $anime.Synopsis}}{{$anime.Synopsis}}{{else}}No synopsis available.{{end}}

+

Synopsis

+

{{if $anime.Synopsis}}{{$anime.Synopsis}}{{else}}No synopsis available.{{end}}

{{if and $anime.Synopsis (gt (len $anime.Synopsis) 400)}} -