Enha: mark with partial name

This commit is contained in:
Grail Finder
2025-07-06 13:55:52 +03:00
parent 357f42c354
commit a131183729
3 changed files with 20 additions and 5 deletions

View File

@ -29,7 +29,12 @@
<div class="h-6 bg-stone-600 rounded-b flex items-center justify-center text-white text-sm cursor-pointer"
hx-get="/mark-card?word={{.Word}}" hx-trigger="click" hx-swap="outerHTML transition:true swap:.05s">
{{range .Marks}}
{{ $length := len .Username }}
{{ if lt $length 3 }}
<span class="mx-0.5">{{.Username}}</span>
{{else}}
<span class="mx-0.5">{{slice .Username 0 3}}</span>
{{end}}
{{end}}
</div>
</div>