39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
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>
|
|
}
|
|
}
|