From 749a275dc0c22ab07f585e7dc9bbeca6fb9a045e Mon Sep 17 00:00:00 2001 From: mkelvers Date: Tue, 26 May 2026 20:16:14 +0200 Subject: [PATCH] feat: add schedule page --- templates/components/navigation.gohtml | 20 +++++ templates/schedule.gohtml | 113 +++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 templates/schedule.gohtml diff --git a/templates/components/navigation.gohtml b/templates/components/navigation.gohtml index de38da7..fd23fbe 100644 --- a/templates/components/navigation.gohtml +++ b/templates/components/navigation.gohtml @@ -5,6 +5,7 @@ "home" (dict "href" "/" "label" "Home") "browse" (dict "href" "/browse" "label" "Browse") "discover" (dict "href" "/discover" "label" "Discover") + "schedule" (dict "href" "/schedule" "label" "Schedule") "watchlist" (dict "href" "/watchlist" "label" "Watchlist") }} @@ -81,6 +82,25 @@ + {{/* Schedule */}} + {{$isActive := eq $currentPath "/schedule"}} + + {{if $isActive}} +
+ {{end}} + + + + + + + +
+ {{/* Watchlist */}} {{$isActive := eq $currentPath "/watchlist"}} diff --git a/templates/schedule.gohtml b/templates/schedule.gohtml new file mode 100644 index 0000000..e03e5d5 --- /dev/null +++ b/templates/schedule.gohtml @@ -0,0 +1,113 @@ +{{define "title"}}Schedule{{end}} +{{define "content"}} +
+
+
+

Airing Schedule

+

Shows from your watchlist that are currently airing.

+
+
Manage watchlist +
+ +
+ {{template "schedule_skeleton"}} +
+
+{{end}} + +{{define "schedule_section"}} +
+ {{if eq (len .Animes) 0}} +
+
+

Nothing airing yet

+

Add currently airing shows to your watchlist to see their weekly broadcast time here.

+ +
+
+ {{else}} +
+ {{range .Animes}} + {{$anime := .}} +
+
+ + {{$imageUrl := "https://placehold.co/200x300?text=No+Image"}} + {{if $anime.Images.Webp.LargeImageURL}} + {{$imageUrl = $anime.Images.Webp.LargeImageURL}} + {{else if $anime.Images.Jpg.LargeImageURL}} + {{$imageUrl = $anime.Images.Jpg.LargeImageURL}} + {{end}} + {{$anime.DisplayTitle}} + + +
+ + +
+ {{if $anime.Type}}{{$anime.Type}}{{end}} + {{if $anime.Year}}{{$anime.Year}}{{end}} + {{if $anime.Episodes}}{{$anime.Episodes}} ep{{end}} + {{if $anime.Score}}{{$anime.Score}}{{end}} +
+ +
+ {{if $anime.Broadcast.String}} +
+ Broadcast + {{$anime.Broadcast.String}} +
+
+ Next + +
+ {{else}} +
+ Broadcast + Unknown +
+ {{end}} +
+
+
+
+ {{end}} +
+ {{end}} +
+{{end}} + +{{define "schedule_skeleton"}} +
+ {{range (seq 6)}} +
+
+
+
+
+
+
+
+
+
+ {{end}} +
+{{end}}