summaryrefslogtreecommitdiff
path: root/components/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'components/index.html')
-rw-r--r--components/index.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/index.html b/components/index.html
index fb294f5..b51c0e3 100644
--- a/components/index.html
+++ b/components/index.html
@@ -13,7 +13,14 @@
<div class="question-text" data-testid="question">
{{.Text}}
</div>
- <div id="feedback"></div>
+ <div id="feedback" data-testid="feedback" class="{{if .Correct}}correct-feedback{{else}}error-feedback{{end}}">
+ {{if .Correct}}
+ <div class="correct-answer">Correct!</div>
+ {{else}}
+ <div class="wrong-answer">Try Again</div>
+ {{end}}
+ <div class="explanation">{{.Explanation}}</div>
+ </div>
<div id="options">
<button
data-testid="option1"