player profile added

This commit is contained in:
2026-03-06 19:51:27 +11:00
parent fc219a044c
commit 71181c43e9
7 changed files with 341 additions and 4 deletions

View File

@@ -0,0 +1,38 @@
package playersview
import "git.haelnorr.com/h/oslstats/internal/db"
import "git.haelnorr.com/h/oslstats/internal/view/baseview"
import "fmt"
templ PlayerPage(player *db.Player, isOwner bool) {
@baseview.Layout(player.DisplayName() + " - Player Profile") {
<div class="max-w-screen-xl mx-auto px-4 py-8">
<div class="bg-mantle border border-surface1 rounded-lg overflow-hidden">
<!-- Header -->
<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">{ player.DisplayName() }</h1>
<div class="flex items-center gap-2 mt-2 flex-wrap">
if player.SlapID != nil {
<span class="px-2 py-1 bg-mantle rounded text-subtext0 font-mono text-sm">
Slapshot ID: { fmt.Sprintf("%d", *player.SlapID) }
</span>
}
if isOwner {
<span class="px-2 py-0.5 bg-blue/20 text-blue rounded text-xs font-medium">
Your Profile
</span>
}
</div>
</div>
</div>
</div>
<!-- Content -->
<div class="p-6">
@SlapIDSection(player, isOwner)
</div>
</div>
</div>
}
}