playoff visual fixes
This commit is contained in:
@@ -115,29 +115,28 @@ templ SeasonsList(seasons *db.List[db.Season]) {
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<!-- Date Info -->
|
||||
{{
|
||||
now := time.Now()
|
||||
}}
|
||||
<div class="text-xs text-subtext1 mt-auto">
|
||||
if now.Before(s.StartDate) {
|
||||
<!-- Date Info -->
|
||||
{{
|
||||
listStatus := s.GetStatus()
|
||||
}}
|
||||
<div class="text-xs text-subtext1 mt-auto">
|
||||
switch listStatus {
|
||||
case db.StatusUpcoming:
|
||||
Starts: { formatDate(s.StartDate) }
|
||||
} else if !s.FinalsStartDate.IsZero() {
|
||||
// Finals are scheduled
|
||||
if !s.FinalsEndDate.IsZero() && now.After(s.FinalsEndDate.Time) {
|
||||
case db.StatusCompleted:
|
||||
if !s.FinalsEndDate.IsZero() {
|
||||
Completed: { formatDate(s.FinalsEndDate.Time) }
|
||||
} else if now.After(s.FinalsStartDate.Time) {
|
||||
Finals Started: { formatDate(s.FinalsStartDate.Time) }
|
||||
} else {
|
||||
Finals Start: { formatDate(s.FinalsStartDate.Time) }
|
||||
} else if !s.EndDate.IsZero() {
|
||||
Completed: { formatDate(s.EndDate.Time) }
|
||||
}
|
||||
} else if !s.EndDate.IsZero() && now.After(s.EndDate.Time) {
|
||||
// No finals scheduled and regular season ended
|
||||
Completed: { formatDate(s.EndDate.Time) }
|
||||
} else {
|
||||
case db.StatusFinals:
|
||||
Finals Started: { formatDate(s.FinalsStartDate.Time) }
|
||||
case db.StatusFinalsSoon:
|
||||
Finals Start: { formatDate(s.FinalsStartDate.Time) }
|
||||
default:
|
||||
Started: { formatDate(s.StartDate) }
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user