From 03e741c56143f7ab8725c0ea9dbdeb5a7e51f60e Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 6 Jun 2026 16:53:16 +0200 Subject: [PATCH] refactor: use browseURL helper and simplify filter bar templates --- templates/components/filter_bar.gohtml | 61 ++++++++++++++++---------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/templates/components/filter_bar.gohtml b/templates/components/filter_bar.gohtml index 71a8004..d14b485 100644 --- a/templates/components/filter_bar.gohtml +++ b/templates/components/filter_bar.gohtml @@ -1,6 +1,28 @@ {{define "filter_bar"}} {{$selectedGenreIDs := .Genres}} {{$selectedCount := len $selectedGenreIDs}} +{{$statusOptions := list + (dict "Value" "" "Label" "Any Status") + (dict "Value" "airing" "Label" "Airing") + (dict "Value" "complete" "Label" "Complete") + (dict "Value" "upcoming" "Label" "Upcoming") +}} +{{$typeOptions := list + (dict "Value" "" "Label" "Any Type") + (dict "Value" "tv" "Label" "TV") + (dict "Value" "movie" "Label" "Movie") + (dict "Value" "ova" "Label" "OVA") + (dict "Value" "special" "Label" "Special") + (dict "Value" "ona" "Label" "ONA") +}} +{{$sortOptions := list + (dict "Value" "" "Label" "Default") + (dict "Value" "popularity" "Label" "Popularity") + (dict "Value" "score" "Label" "Score") + (dict "Value" "title" "Label" "Title") + (dict "Value" "start_date" "Label" "Start Date") + (dict "Value" "episodes" "Label" "Episodes") +}}
@@ -60,9 +82,9 @@ {{range $g := .Genres}}{{end}}
- + {{if eq .Sort "asc"}} {{else}}