Revert partial changes from 9db855f, keeping changes to preview_middleware and teams_new

This commit is contained in:
2026-02-19 19:01:07 +11:00
parent 52a168f1aa
commit 4b81ac12cf
13 changed files with 73 additions and 311 deletions

View File

@@ -125,26 +125,3 @@ templ leagueNavItem(section string, label string, activeSection string, season *
</a>
</li>
}
templ draftNavItem(section string, label string, activeSection string, season *db.Season, league *db.League) {
{{
isActive := section == activeSection
baseClasses := "inline-block px-6 py-3 transition-colors cursor-pointer border-b-2"
activeClasses := "border-blue text-blue font-semibold"
inactiveClasses := "border-transparent text-subtext0 hover:text-text hover:border-surface2"
displayURL := fmt.Sprintf("/seasons/%s/%s", season.ShortName, section)
postURL := fmt.Sprintf("/seasons/%s/leagues/%s/%s", season.ShortName, league.ShortName, section)
}}
<li class="inline-block">
<a
href={ templ.SafeURL(displayURL) }
hx-post={ postURL }
hx-target="#season-league-content"
hx-swap="innerHTML"
hx-push-url={ displayURL }
class={ baseClasses, templ.KV(activeClasses, isActive), templ.KV(inactiveClasses, !isActive) }
>
{ label }
</a>
</li>
}