summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-04-05 18:04:26 +0300
committerGrail Finder <wohilas@gmail.com>2025-04-05 18:04:26 +0300
commitd5d503e1ec81bd4e21cfb53566b015df61a99db5 (patch)
tree8e29767168b48c3246206765fba11fc71b496856 /components
parentba24de361eb2133d5e014d5796f654c82e6d69cb (diff)
Enha: /answer to return question
Diffstat (limited to 'components')
-rw-r--r--components/feedback.html32
-rw-r--r--components/index.html5
2 files changed, 0 insertions, 37 deletions
diff --git a/components/feedback.html b/components/feedback.html
deleted file mode 100644
index 06d39de..0000000
--- a/components/feedback.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{{define "feedback"}}
-{{if .Correct}}
-<div class="correct-feedback">
- <div class="correct-answer">Correct!</div>
- <div class="explanation">{{.Explanation}}</div>
- {{if .ShowNext}}
- <button
- hx-get="/next-question?current_id={{.ID}}"
- hx-target="#ancestor"
- hx-swap="outerHTML"
- class="next-button"
- data-testid="next-button">
- Next Question →
- </button>
- {{end}}
-</div>
-{{else}}
-<div class="error-feedback">
- <div class="explanation">{{.Explanation}}</div>
- {{if .ShowNext}}
- <button
- hx-get="/next-question?current_id={{.ID}}"
- hx-target="#ancestor"
- hx-swap="outerHTML"
- class="next-button"
- data-testid="next-button">
- Next Question →
- </button>
- {{end}}
-</div>
-{{end}}
-{{end}}
diff --git a/components/index.html b/components/index.html
index 31775b0..d3811b1 100644
--- a/components/index.html
+++ b/components/index.html
@@ -17,11 +17,6 @@
{{.Text}}
</div>
<div id="feedback" data-testid="feedback">
- {{if eq .Status 1}}
- <div class="feedback">Correct! 🎉</div>
- {{else if eq .Status 2}}
- <div class="feedback">Wrong answer! The correct answer was: {{index .Options .CorrectIndex}}</div>
- {{end}}
{{if ne .Status 0}}
<div>
{{.Explanation}}