From b607b091d5a0e00e8215af6ec531a41e6a619ba2 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Fri, 12 Jun 2026 11:01:53 +0200 Subject: [PATCH] feat: add section_action component --- templates/components/section_action.gohtml | 20 ++++++++++++++++++++ templates/discover.gohtml | 12 ++++++------ templates/index.gohtml | 19 +++++-------------- 3 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 templates/components/section_action.gohtml diff --git a/templates/components/section_action.gohtml b/templates/components/section_action.gohtml new file mode 100644 index 0000000..44b24f6 --- /dev/null +++ b/templates/components/section_action.gohtml @@ -0,0 +1,20 @@ +{{define "section_action"}} + + {{.Label}} + + +{{end}} diff --git a/templates/discover.gohtml b/templates/discover.gohtml index 1bd7eae..158c6ab 100644 --- a/templates/discover.gohtml +++ b/templates/discover.gohtml @@ -54,9 +54,9 @@ {{/* Trending Section */}}
-
+

Trending This Season

- View all + {{template "section_action" dict "Href" "/browse?order_by=popularity&sort=asc" "Label" "View all"}}
{{template "discover_skeleton"}} @@ -65,9 +65,9 @@ {{/* Upcoming Section */}}
-
+

Highly Anticipated

- View all + {{template "section_action" dict "Href" "/browse?status=upcoming&order_by=members&sort=desc" "Label" "View all"}}
{{template "discover_skeleton"}} @@ -76,9 +76,9 @@ {{/* Top Section */}}
-
+

All-Time Greats

- View all + {{template "section_action" dict "Href" "/browse?order_by=score&sort=desc" "Label" "View all"}}
{{template "discover_skeleton"}} diff --git a/templates/index.gohtml b/templates/index.gohtml index 1824f26..f4b722d 100644 --- a/templates/index.gohtml +++ b/templates/index.gohtml @@ -12,12 +12,9 @@ {{end}}
-
+

Currently Airing

- - See more - - + {{template "section_action" dict "Href" "/browse?status=airing&order_by=popularity&sort=asc" "Label" "View all"}}
{{template "catalog_skeleton"}} @@ -25,12 +22,9 @@
-
+

Most Popular

- - See more - - + {{template "section_action" dict "Href" "/browse?order_by=popularity&sort=asc" "Label" "View all"}}
{{template "catalog_skeleton"}} @@ -45,10 +39,7 @@

Top Pick for You

- - Explore more - - + {{template "section_action" dict "Href" "/discover/top-picks" "Label" "View all"}}