summaryrefslogtreecommitdiff
path: root/components/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'components/index.html')
-rw-r--r--components/index.html16
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"
>