Refactor exam overview template for improved readability and consistency in HTML structure
This commit is contained in:
@@ -49,7 +49,8 @@
|
||||
class="overview-question-btn btn btn-outline-secondary {% if flagged %}flagged{% endif %}"
|
||||
aria-label="Go to question {{ forloop.counter }}"
|
||||
{% if not answer %}title="You have not answered this question" aria-current="false"{% endif %}>
|
||||
{{forloop.counter}}{% if answer and answer.answer %}: {{answer.answer}}{% endif %}
|
||||
<span class="qn-num">{{forloop.counter}}</span>{% if answer and answer.answer %}<span class="qn-ans">: {{answer.answer}}</span>{% endif %}
|
||||
{% if flagged %}<span class="question-flag" aria-hidden="true">⚑</span>{% endif %}
|
||||
</a>
|
||||
|
||||
{% else %}
|
||||
@@ -57,7 +58,8 @@
|
||||
class="overview-question-btn btn btn-outline-secondary {% if flagged %}flagged{% endif %}"
|
||||
aria-label="Go to question {{ forloop.counter }}"
|
||||
{% if not answer %}title="You have not answered this question" aria-current="false"{% endif %}>
|
||||
{{forloop.counter}}{% if answer and answer.answer %}: {{answer.answer}}{% endif %}
|
||||
<span class="qn-num">{{forloop.counter}}</span>{% if answer and answer.answer %}<span class="qn-ans">: {{answer.answer}}</span>{% endif %}
|
||||
{% if flagged %}<span class="question-flag" aria-hidden="true">⚑</span>{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -97,7 +99,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<style>
|
||||
<style>
|
||||
/* Overview page specific styles */
|
||||
.overview-text {
|
||||
margin-bottom: 1rem;
|
||||
@@ -129,11 +131,13 @@
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
/* Flagged question indicator: use border colour to signal a flagged item */
|
||||
.overview-question-btn.flagged {
|
||||
border-color: #ffc107 !important;
|
||||
box-shadow: 0 1px 2px rgba(255,193,7,0.06);
|
||||
background: rgba(255,193,7,0.03);
|
||||
/* Flagged questions show only the flag icon; do not change border color */
|
||||
|
||||
.overview-question-btn .question-flag {
|
||||
margin-left: auto;
|
||||
font-size: 0.95rem;
|
||||
color: #ffc107;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Unanswered questions should draw attention */
|
||||
@@ -161,5 +165,5 @@
|
||||
}
|
||||
.overview-question-btn { font-size: .95rem }
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user