Implemente le mini-jeu Mots meles (grille reelle, placement 4 directions)
Build and deploy / test-python (push) Failing after 1m0s
Build and deploy / test-js (push) Failing after 50s
Build and deploy / lint-python (push) Failing after 1m2s
Build and deploy / lint-js (push) Failing after 1m7s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 1m1s
Build and deploy / test-python (push) Failing after 1m0s
Build and deploy / test-js (push) Failing after 50s
Build and deploy / lint-python (push) Failing after 1m2s
Build and deploy / lint-js (push) Failing after 1m7s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 1m1s
Quatrieme mini-jeu du support de formation : le createur ecrit 5 a 10 mots (recommandation souple, comme MIN_PAIRS/MIN_CARDS), places par le serveur dans une grille carree horizontalement, verticalement, ou en diagonale (deux sens seulement, jamais a l'envers) via un vrai algorithme de placement avec retry/agrandissement de grille en cas de conflit. La grille ET la position exacte de chaque mot sont calculees cote serveur puis embarquees en JSON ; le client valide chaque selection (glisser ou cliquer-cliquer) par comparaison de coordonnees exactes, jamais une simple comparaison de texte (qui se tromperait sur des lettres partagees entre deux mots qui se croisent). Comme Association/Memory, la grille reste affichee une fois tous les mots trouves : seul le bouton Recommencer (.docMinigameRestartBar, partage) apparait. Verifie via simulation DOM reelle (jsdom) : selection au glisser ET au clic-clic, mot invalide sans crash, barre de fin qui bascule, panneau Proprietes (ajout/suppression de mot avec revalidation serveur). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
1b1307bb85
commit
d8be80ebd1
@@ -500,31 +500,36 @@ img.docImage {
|
||||
color: var(--doc-muted);
|
||||
}
|
||||
|
||||
/* ---- Quiz/Association/Memory : mini-jeux interactifs en Mode Aperçu
|
||||
(voir docs/plan/maquettes/document-formation-web.html — référence
|
||||
visuelle du Quiz). Masqués en édition (seul .docMinigameBadge y est
|
||||
visible, voir plus haut) ; jamais les deux visibles en même temps. ---- */
|
||||
/* ---- Quiz/Association/Memory/Mots mêlés : mini-jeux interactifs en Mode
|
||||
Aperçu (voir docs/plan/maquettes/document-formation-web.html —
|
||||
référence visuelle du Quiz). Masqués en édition (seul
|
||||
.docMinigameBadge y est visible, voir plus haut) ; jamais les deux
|
||||
visibles en même temps. ---- */
|
||||
.docQuizPlayer,
|
||||
.docAssocPlayer,
|
||||
.docMemoryPlayer {
|
||||
.docMemoryPlayer,
|
||||
.docMotsPlayer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.docEditor3.docEditor3--preview [data-kind="quiz"] .docMinigameBadge,
|
||||
.docEditor3.docEditor3--preview [data-kind="association"] .docMinigameBadge,
|
||||
.docEditor3.docEditor3--preview [data-kind="memory"] .docMinigameBadge {
|
||||
.docEditor3.docEditor3--preview [data-kind="memory"] .docMinigameBadge,
|
||||
.docEditor3.docEditor3--preview [data-kind="mots"] .docMinigameBadge {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.docEditor3.docEditor3--preview [data-kind="quiz"] .docQuizPlayer,
|
||||
.docEditor3.docEditor3--preview [data-kind="association"] .docAssocPlayer,
|
||||
.docEditor3.docEditor3--preview [data-kind="memory"] .docMemoryPlayer {
|
||||
.docEditor3.docEditor3--preview [data-kind="memory"] .docMemoryPlayer,
|
||||
.docEditor3.docEditor3--preview [data-kind="mots"] .docMotsPlayer {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.docEditor3.docEditor3--preview [data-kind="quiz"],
|
||||
.docEditor3.docEditor3--preview [data-kind="association"],
|
||||
.docEditor3.docEditor3--preview [data-kind="memory"] {
|
||||
.docEditor3.docEditor3--preview [data-kind="memory"],
|
||||
.docEditor3.docEditor3--preview [data-kind="mots"] {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
@@ -534,7 +539,9 @@ img.docImage {
|
||||
.docEditor3.docEditor3--preview .docAssocPlayer,
|
||||
.docEditor3.docEditor3--preview .docAssocPlayer *,
|
||||
.docEditor3.docEditor3--preview .docMemoryPlayer,
|
||||
.docEditor3.docEditor3--preview .docMemoryPlayer * {
|
||||
.docEditor3.docEditor3--preview .docMemoryPlayer *,
|
||||
.docEditor3.docEditor3--preview .docMotsPlayer,
|
||||
.docEditor3.docEditor3--preview .docMotsPlayer * {
|
||||
/* .docEditor3--preview désactive pointer-events sur tout [data-element-id]
|
||||
(voir plus bas) pour empêcher la sélection/le déplacement pendant
|
||||
l'Aperçu — réactivé ici spécifiquement pour que ces mini-jeux restent
|
||||
@@ -989,6 +996,74 @@ img.docImage {
|
||||
color: var(--doc-quiz-success-text);
|
||||
}
|
||||
|
||||
/* ---- Mots mêlés : grille interactive (voir docs/plan/PLAN.md, "mots
|
||||
cachés horizontalement/verticalement/en diagonale"). Réutilise
|
||||
.docAssocCard/.docAssocTitle/.docAssocMeta/.docMinigameRestartBar
|
||||
(mêmes rôles visuels que l'Association/Memory ci-dessus). ---- */
|
||||
.docMotsBoard {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 24px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.docMotsGrid {
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
width: min(100%, 420px);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.docMotsCell {
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid var(--doc-border);
|
||||
background: var(--doc-bg-2);
|
||||
color: var(--doc-text);
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.docMotsCell.is-selecting {
|
||||
border-color: var(--doc-accent);
|
||||
background: rgb(255 95 46 / 18%);
|
||||
}
|
||||
|
||||
.docMotsCell.is-found {
|
||||
border-color: var(--doc-quiz-success-border);
|
||||
background: var(--doc-quiz-success-bg);
|
||||
color: var(--doc-quiz-success-text);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.docMotsWordList {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.docMotsWordChip {
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--doc-border);
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--doc-text);
|
||||
background: var(--doc-bg-2);
|
||||
}
|
||||
|
||||
.docMotsWordChip.is-found {
|
||||
border-color: var(--doc-quiz-success-border);
|
||||
background: var(--doc-quiz-success-bg);
|
||||
color: var(--doc-quiz-success-text);
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.docUnknown {
|
||||
font-size: 12.5px;
|
||||
color: var(--doc-muted);
|
||||
|
||||
Reference in New Issue
Block a user