added team overview

This commit is contained in:
2026-03-06 18:53:58 +11:00
parent cade057e42
commit 1634b27991
8 changed files with 535 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ import "git.haelnorr.com/h/oslstats/internal/view/sort"
import "git.haelnorr.com/h/oslstats/internal/contexts"
import "git.haelnorr.com/h/oslstats/internal/permissions"
import "github.com/uptrace/bun"
import "fmt"
templ ListPage(teams *db.List[db.Team]) {
@baseview.Layout("Teams") {
@@ -80,8 +81,10 @@ templ TeamsList(teams *db.List[db.Team]) {
<!-- Card grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
for _, t := range teams.Items {
<div
class="bg-mantle border border-surface1 rounded-lg p-6 hover:bg-surface0 transition-colors flex flex-col"
<a
href={ templ.SafeURL(fmt.Sprintf("/teams/%d", t.ID)) }
class="bg-mantle border border-surface1 rounded-lg p-6 hover:bg-surface0
transition-colors flex flex-col hover:cursor-pointer"
>
<!-- Header: Name with color indicator -->
<div class="flex justify-between items-start mb-3">
@@ -102,7 +105,7 @@ templ TeamsList(teams *db.List[db.Team]) {
{ t.AltShortName }
</span>
</div>
</div>
</a>
}
</div>
<!-- Pagination controls -->