Refactor HTML structure for user marking templates to improve readability and maintainability

This commit is contained in:
Ross
2026-01-04 12:40:56 +00:00
parent 4ffadd3914
commit c3a70b079d
3 changed files with 65 additions and 65 deletions
+11 -11
View File
@@ -1,19 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<h1 class="mb-4">Marking: Exams you can mark</h1> <h1 class="mb-4">Marking: Exams you can mark</h1>
<style> <style>
.htmx-indicator { display: none; } .htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; } .htmx-request .htmx-indicator { display: inline-block; }
</style> </style>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<p class="text-muted">Click an exam type to load exams — each section loads independently.</p> <p class="text-muted">Click an exam type to load exams — each section loads independently.</p>
</div> </div>
</div> </div>
<div class="row g-4"> <div class="row g-4">
{% for app in apps %} {% for app in apps %}
<div class="col-md-6"> <div class="col-md-6">
<div class="card"> <div class="card">
@@ -30,9 +30,9 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
<script> <script>
// Show/hide indicators referenced by triggering element's hx-indicator attribute // Show/hide indicators referenced by triggering element's hx-indicator attribute
document.body.addEventListener('htmx:beforeRequest', function(evt){ document.body.addEventListener('htmx:beforeRequest', function(evt){
try{ try{
@@ -55,11 +55,11 @@
} }
}catch(e){console.warn(e)} }catch(e){console.warn(e)}
}); });
</script> </script>
<style> <style>
.htmx-indicator { display: none; } .htmx-indicator { display: none; }
.htmx-indicator.visible { display: inline-block !important; } .htmx-indicator.visible { display: inline-block !important; }
</style> </style>
{% endblock %} {% endblock %}