package templates import ( "fmt" "mal/internal/database" ) templ Watchlist(entries []database.GetUserWatchListRow, layout string, currentStatus string, sortBy string, sortOrder string) { @Layout("My Watchlist") {

watchlist

export
all watching continuing on hold plan to watch dropped completed
@SortFilter(SortFilterOptions{Sort: sortBy, Order: sortOrder, View: layout, Status: currentStatus}) if len(entries) == 0 {
nothing here yet
if currentStatus == "all" { your watchlist is empty. search for anime to get started. } else if currentStatus == "continuing" { no airing anime with watching or plan to watch status. } else { no anime in this category. }
} else { if layout == "grid" {
for _, entry := range entries {
if entry.ImageUrl != "" { { } else {
no image
}
{ entry.DisplayTitle() }
}
} else { for _, entry := range entries { }
title
{ { entry.DisplayTitle() }
} } } } func viewClass(active bool) string { if active { return "active" } return "" } func tabClass(active bool) string { if active { return "active" } return "" }