common "forge.cadoles.com/wpetit/kouiz/internal/http/handler/webui/common/component"
"forge.cadoles.com/wpetit/kouiz/internal/store"
"strconv"
)
type ResultPageVModel struct {
Player *store.Player
PlayerRank int
Entry *store.QuizEntry
Won bool
}
templ ResultPage(vmodel ResultPageVModel) {
@common.AppPage(common.WithPageOptions(
common.WithTitle("Quiz"),
)) {
<div class="columns">
<div class="column">
<div class="content has-text-centered is-size-5">
if vmodel.Won {
<h3 class="title">Bien joué !</h3>
} else {
<h3 class="title">Dommage !</h3>
}
<p>La réponse attendue à la question <br/><span class="is-italic">"{ vmodel.Entry.Question }"</span> était <span class="is-italic">"{ vmodel.Entry.Answer }"</span>.</p>