summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-04-05 17:56:01 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-04-05 17:56:01 +0300
commit96441a431eaca60b1b798e997608812c8be76598 (patch)
treee21349c8301074964a84ff0f11d2bcdaa83c9e31 /components
parentc2d82a17832590d86c7c243671b64df95913350e (diff)
feat: update question template and simplify handler logic
Diffstat (limited to 'components')
-rw-r--r--components/index.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/index.html b/components/index.html
index 3efca24..d3811b1 100644
--- a/components/index.html
+++ b/components/index.html
@@ -10,12 +10,17 @@
</head>
<body>
<div id="ancestor">
+ {{if .Requirement}}
+ <p>{{.Requirement}}</p>
+ {{end}}
<div class="question-text" data-testid="question">
{{.Text}}
</div>
<div id="feedback" data-testid="feedback">
- {{if .Correct}}{{template "feedback" .}}{{else if .Requirement}}{{template "feedback" .}}{{end}}
{{if ne .Status 0}}
+ <div>
+ {{.Explanation}}
+ </div>
<button
hx-get="/next-question?current_id={{.ID}}"
hx-target="#ancestor"