added season types and changed new season to be a modal
This commit is contained in:
@@ -25,11 +25,12 @@ templ SeasonDetails(season *db.Season, leaguesWithTeams []db.LeagueWithTeams) {
|
||||
<div class="bg-surface0 border-b border-surface1 px-6 py-8">
|
||||
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
||||
<div>
|
||||
<h1 class="text-4xl font-bold text-text mb-2">{ season.Name }</h1>
|
||||
<div class="flex items-center gap-3 mb-2">
|
||||
<h1 class="text-4xl font-bold text-text">{ season.Name }</h1>
|
||||
<span class="text-lg font-mono text-subtext0 bg-surface1 px-2 py-0.5 rounded">{ season.ShortName }</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 flex-wrap">
|
||||
<span class="inline-block bg-blue px-3 py-1 rounded-full text-sm font-semibold text-mantle">
|
||||
{ season.ShortName }
|
||||
</span>
|
||||
@SeasonTypeBadge(season.Type)
|
||||
@SlapVersionBadge(season.SlapVersion)
|
||||
@StatusBadge(season, false, false)
|
||||
</div>
|
||||
@@ -221,3 +222,16 @@ templ SlapVersionBadge(version string) {
|
||||
</span>
|
||||
}
|
||||
}
|
||||
|
||||
templ SeasonTypeBadge(type_ string) {
|
||||
switch type_ {
|
||||
case "regular":
|
||||
<span class="inline-block bg-sapphire px-3 py-1 rounded-full text-sm font-semibold text-mantle">
|
||||
Regular
|
||||
</span>
|
||||
case "draft":
|
||||
<span class="inline-block bg-mauve px-3 py-1 rounded-full text-sm font-semibold text-mantle">
|
||||
Draft
|
||||
</span>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user