From 02e844006df2472100af7db811addf628cec752e Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 27 Oct 2025 23:10:14 +0000 Subject: [PATCH] t --- sbas/templates/sbas/exam_take.html | 35 ++++++++++++++++++++++-------- templates/base.html | 18 +++++++++++++++ 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/sbas/templates/sbas/exam_take.html b/sbas/templates/sbas/exam_take.html index 619b5bbd..fdd9a59b 100755 --- a/sbas/templates/sbas/exam_take.html +++ b/sbas/templates/sbas/exam_take.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content %} -
+
@@ -26,8 +26,8 @@ {% endif %} -
-
+
+
{{ question.stem|safe }}
@@ -40,7 +40,7 @@
  • {{ question.e_answer|safe }}
  • -
    {% csrf_token %} + {% csrf_token %}
    {{ form }}
    @@ -74,8 +74,10 @@
    -
    -
    +
    + {% include "sbas/exam_take_help.html" %} + +
    Questions

    Tap a number to jump to that question.

    @@ -94,7 +96,6 @@
    - {% include "sbas/exam_take_help.html" %}
    @@ -129,10 +130,11 @@ $("ul.sba-answer-list li[data-ans='{{saved_answer}}']").addClass("selected"); {% endif %} for (let i = 0; i < {{ exam_length }}; i++) { - qbutton = $(``) + // Create Bootstrap-styled buttons and append into the flex-wrap container + qbutton = $(``) if (i == {{pos}}) {qbutton.addClass("current-question")} - $("#menu-list").append(qbutton); + $("#menu-buttons").append(qbutton); } $("button.question-menu-item").on("click", (e) => { @@ -164,5 +166,20 @@ float: right } + /* Make question nav buttons consistent and allow wrapping on small screens */ + .question-menu-item { + white-space: nowrap; + flex: 0 0 auto; + padding: .25rem .5rem; + } + + /* Disable sticky behaviour on narrow viewports so the sidebar stacks naturally */ + @media (max-width: 767.98px) { + .card.sticky-top { + position: static !important; + top: auto !important; + } + } + {% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 79085138..2d9475c7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -92,6 +92,24 @@ word-break: break-word; max-width: 100%; } + /* Reduce horizontal page margins on small screens for better use of space */ + @media (max-width: 1210px) { + /* Narrow the default container padding */ + .container, + .container-fluid { + padding-left: .5rem !important; + padding-right: .5rem !important; + } + + /* Also tighten the main content wrapper specifically */ + div.content.container { + padding-left: .5rem !important; + padding-right: .5rem !important; + max-width: 100% !important; + + + } + } {% block css %} {% endblock %}