Revert partial changes from 9db855f, keeping changes to preview_middleware and teams_new
This commit is contained in:
@@ -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>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user