diff options
author | Grail Finder <wohilas@gmail.com> | 2025-04-05 18:04:26 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-04-05 18:04:26 +0300 |
commit | d5d503e1ec81bd4e21cfb53566b015df61a99db5 (patch) | |
tree | 8e29767168b48c3246206765fba11fc71b496856 /components | |
parent | ba24de361eb2133d5e014d5796f654c82e6d69cb (diff) |
Enha: /answer to return question
Diffstat (limited to 'components')
-rw-r--r-- | components/feedback.html | 32 | ||||
-rw-r--r-- | components/index.html | 5 |
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}} |