package seasonsview import "git.haelnorr.com/h/oslstats/internal/db" // StatusBadge renders a season status badge // Parameters: // - season: pointer to db.Season // - compact: bool - true for list view (text only, small), false for detail view (icon + text, large) // - useShortLabels: bool - true for "Active/Finals", false for "In Progress/Finals in Progress" templ StatusBadge(season *db.Season, compact bool, useShortLabels bool) { {{ seasonStatus := season.GetStatus() status := "" statusBg := "" switch seasonStatus { case db.StatusUpcoming: status = "Upcoming" statusBg = "bg-blue" case db.StatusInProgress: if useShortLabels { status = "Active" } else { status = "In Progress" } statusBg = "bg-green" case db.StatusFinalsSoon: status = "Finals Soon" statusBg = "bg-peach" case db.StatusFinals: if useShortLabels { status = "Finals" } else { status = "Finals in Progress" } statusBg = "bg-yellow" case db.StatusCompleted: status = "Completed" statusBg = "bg-teal" } }} { status } }