feat: initial commit

This commit is contained in:
2025-06-15 16:44:44 +02:00
parent c50d1858f2
commit 21b334bc70
27 changed files with 13550 additions and 122 deletions

View File

@ -1,6 +1,7 @@
package component
import (
"fmt"
common "forge.cadoles.com/wpetit/kouiz/internal/http/handler/webui/common/component"
"forge.cadoles.com/wpetit/kouiz/internal/store"
"strconv"
@ -29,7 +30,7 @@ templ ResultPage(vmodel ResultPageVModel) {
if vmodel.Won {
<p>Vous avez gagné <strong>{ strconv.FormatInt(int64((vmodel.Entry.Level+1)*2), 10) } points</strong> !</p>
}
<p class="is-size-6 is-family-secondary has-text-grey">Vous avez actuellement { strconv.FormatInt(int64((vmodel.Player.Score)), 10) } points, ce qui vous place <a href={ common.BaseURL(ctx, common.WithPath("/quiz/leaderboard")) }>en position #{ strconv.FormatInt(int64(vmodel.PlayerRank), 10) } du classement.</a></p>
<p class="is-size-6 is-family-secondary has-text-grey">Vous avez actuellement { strconv.FormatInt(int64((vmodel.Player.Score)), 10) } points, ce qui vous place <a href={ common.BaseURL(ctx, common.WithPath("/quiz/leaderboard"), common.WithFragment(fmt.Sprintf("player-%d", vmodel.Player.ID))) }>en <strong>position #{ strconv.FormatInt(int64(vmodel.PlayerRank), 10) } du classement</strong>.</a></p>
</div>
</div>
<div class="column">