From 17bcebd7731b875e5b67383669e73a4c24864bf8 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Fri, 15 May 2026 19:36:55 +0200 Subject: [PATCH] feat: add statistics and themes inline templates for HTMX fragments --- templates/anime.gohtml | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/templates/anime.gohtml b/templates/anime.gohtml index 5761018..02d8088 100644 --- a/templates/anime.gohtml +++ b/templates/anime.gohtml @@ -38,6 +38,58 @@ {{end}} {{end}} +{{define "anime_statistics"}} +{{if .Items}} +
+
+ Watching + {{.Items.Watching}} +
+
+ Completed + {{.Items.Completed}} +
+
+ On Hold + {{.Items.OnHold}} +
+
+ Dropped + {{.Items.Dropped}} +
+
+ Plan to Watch + {{.Items.PlanToWatch}} +
+
+{{end}} +{{end}} + +{{define "anime_themes"}} +{{if or .Items.Openings .Items.Endings}} +
+
+

Openings

+
+ {{range .Items.Openings}} +
{{.}}
+ {{end}} +
+
+
+

Endings

+
+ {{range .Items.Endings}} +
{{.}}
+ {{end}} +
+
+
+{{else}} +
No theme songs available.
+{{end}} +{{end}} + {{define "title"}}{{.Anime.DisplayTitle}}{{end}} {{define "content"}} {{if .WatchlistIDs}}{{end}}