diff options
author | Grail Finder <wohilas@gmail.com> | 2025-04-05 18:24:35 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-04-05 18:24:35 +0300 |
commit | 5515c456d5cf69e83bccb91b015056478633b285 (patch) | |
tree | 4d6556a391950ac192406be7408833e508f6002b /components | |
parent | 80b0788e4a6d30be936b9cf4e84639042cdc760f (diff) |
Chore: index.html update
Diffstat (limited to 'components')
-rw-r--r-- | components/index.html | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/components/index.html b/components/index.html index d3811b1..7d4552f 100644 --- a/components/index.html +++ b/components/index.html @@ -16,6 +16,14 @@ <div class="question-text" data-testid="question"> {{.Text}} </div> + <div id="reaction"> + {{if eq .Status 1}} + Correct! + {{end}} + {{if eq .Status 2}} + Wrong. + {{end}} + </div> <div id="feedback" data-testid="feedback"> {{if ne .Status 0}} <div> @@ -36,7 +44,7 @@ data-testid="option1" hx-post="/answer" hx-vals='{"selected": "0", "question_id": "{{.ID}}"}' - hx-target="#feedback" + hx-target="#ancestor" hx-swap="innerHTML" class="option-button" > @@ -46,7 +54,7 @@ data-testid="option2" hx-post="/answer" hx-vals='{"selected": "1", "question_id": "{{.ID}}"}' - hx-target="#feedback" + hx-target="#ancestor" hx-swap="innerHTML" class="option-button" > @@ -56,7 +64,7 @@ data-testid="option3" hx-post="/answer" hx-vals='{"selected": "2", "question_id": "{{.ID}}"}' - hx-target="#feedback" + hx-target="#ancestor" hx-swap="innerHTML" class="option-button" > @@ -66,7 +74,7 @@ data-testid="option4" hx-post="/answer" hx-vals='{"selected": "3", "question_id": "{{.ID}}"}' - hx-target="#feedback" + hx-target="#ancestor" hx-swap="innerHTML" class="option-button" > |