Константин Лебединский 1 week ago
parent
commit
44366a2865
  1. 22
      flask_app/app/static/css/app.css
  2. 10
      flask_app/app/templates/tests/attempt_review.html
  3. 7
      flask_app/app/templates/tests/list.html

22
flask_app/app/static/css/app.css

@ -1024,6 +1024,28 @@ body.ui-legacy .attempts-card-list__action {
flex-shrink: 0;
}
.attempt-review-options {
list-style: none;
padding-left: 0;
margin: 0;
}
.attempt-review-option {
margin: 0.25rem 0;
padding: 0.3rem 0.5rem;
border-radius: 0.55rem;
}
.attempt-review-option--wrong {
background: #fef2f2;
color: #b42318;
}
.attempt-review-option--correct {
background: #ecfdf3;
color: #067647;
}
/* ─── Прохождение теста: один вопрос, прогресс сверху, удобно с телефона ─── */
.attempt-root {
max-width: var(--max-content);

10
flask_app/app/templates/tests/attempt_review.html

@ -2,7 +2,7 @@
{% block title %}Разбор попытки{% endblock %}
{% block content %}
<div class="test-detail-page">
<div class="test-detail-page attempt-review-page">
<p class="link-back"><a href="/tests">← к списку тестов</a></p>
<h1 class="font-headline" style="font-size:1.35rem;margin-top:0;">Разбор: {{ review.testTitle }}</h1>
<p>
@ -22,10 +22,12 @@
<span>{{ 'Верно' if q.isUserCorrect else 'Ошибка' }}</span>
</div>
<p style="margin-top:.25rem;"><strong>{{ loop.index }}.</strong> {{ q.text }}</p>
<ul style="list-style:none;padding-left:0;margin:0;">
<ul class="attempt-review-options">
{% for o in q.options %}
<li style="margin:.25rem 0;">
<span>
<li class="attempt-review-option
{% if o.isCorrect %}attempt-review-option--correct{% endif %}
{% if o.selected and not o.isCorrect %}attempt-review-option--wrong{% endif %}">
<span class="attempt-review-option__text">
{% if o.selected %}☑{% else %}☐{% endif %}
{{ o.text }}
{% if o.isCorrect %}<strong> (правильный)</strong>{% endif %}

7
flask_app/app/templates/tests/list.html

@ -124,9 +124,10 @@
{% endif %}
<dialog id="dlg-create"
class="m-0 p-0 w-full h-full sm:h-auto sm:max-w-md sm:w-full sm:m-auto
sm:rounded-2xl bg-white backdrop:bg-ink-900/50">
<form method="dialog" class="flex flex-col h-full sm:h-auto bg-white sm:rounded-2xl">
class="m-0 p-0 w-full sm:w-full sm:max-w-md
h-fit max-h-[calc(100vh-2rem)]
rounded-2xl bg-white backdrop:bg-ink-900/50 m-auto">
<form method="dialog" class="flex flex-col sm:h-auto bg-white sm:rounded-2xl">
<div class="px-4 sm:px-5 py-3 border-b border-ink-300/60 flex items-center justify-between">
<h2 class="text-lg font-semibold">Новый тест</h2>
<button type="button" id="dlg-cancel-x"

Loading…
Cancel
Save