Désolé, le jeu est désactivé pour la journée. Revenez prochainement pour le prochain tour !
package component import ( "bytes" "context" "fmt" "forge.cadoles.com/wpetit/kouiz/internal/http/form" common "forge.cadoles.com/wpetit/kouiz/internal/http/handler/webui/common/component" "forge.cadoles.com/wpetit/kouiz/internal/store" "github.com/pkg/errors" "github.com/yuin/goldmark" "log/slog" "slices" "strconv" "time" ) type QuizPageVModel struct { Player *store.Player CurrentTurn *store.QuizTurn PlayDelay time.Duration IsOffDay bool } func NewSelectEntryForm() *form.Form { return form.New( form.NewField( "entry", form.Attrs{}, form.NonEmpty("Ce champ ne doit pas être vide."), ), ) } func NewAnswerForm() *form.Form { return form.New( form.NewField( "answer", form.Attrs{}, form.NonEmpty("Ce champ ne doit pas être vide."), ), ) } templ QuizPage(vmodel QuizPageVModel) { @common.AppPage(common.WithPageOptions( common.WithTitle(fmt.Sprintf("Tour #%d", vmodel.CurrentTurn.ID)), )) {
{ selectedEntry.Question }
{ selectedEntry.Category.Name } - { selectedEntry.Category.Theme }