diff --git a/internal/templates/schedule.templ b/internal/templates/schedule.templ index 5c7d35e..7c4447f 100644 --- a/internal/templates/schedule.templ +++ b/internal/templates/schedule.templ @@ -3,7 +3,6 @@ package templates import "mal/internal/jikan" import "mal/internal/shared/ui" import "fmt" -import "strings" templ Schedule() { @Layout("mal - schedule") { @@ -30,7 +29,7 @@ templ Schedule() { templ ScheduleDay(day string, animes []jikan.Anime) {
-

{ strings.Title(day) }

+

{ dayTitle(day) }

if len(animes) == 0 {

No anime scheduled.

} else { @@ -70,3 +69,24 @@ templ ScheduleAnimeCard(anime jikan.Anime) {
} } + +func dayTitle(day string) string { + switch day { + case "monday": + return "Monday" + case "tuesday": + return "Tuesday" + case "wednesday": + return "Wednesday" + case "thursday": + return "Thursday" + case "friday": + return "Friday" + case "saturday": + return "Saturday" + case "sunday": + return "Sunday" + default: + return day + } +}