Refactor frontend views
All checks were successful
Build and push image / build-containers (push) Successful in 10m14s

This commit is contained in:
2025-06-14 21:56:17 +02:00
parent b3debd3ed2
commit bce372a1d1
32 changed files with 1230 additions and 458 deletions

View File

@ -12,13 +12,17 @@
{% include '/dashboard/sidebar.html' %}
{% endif %}
<div id="main-content" class="relative w-full h-full overflow-y-auto bg-gray-50 lg:ml-64 dark:bg-gray-900">
<main>
<div id="main-content" class="relative w-full h-full overflow-y-auto bg-gray-50 lg:ml-64 dark:bg-gray-900 flex flex-col md:flex-row flex-grow">
<main class="flex-grow p-4 order-2 md:order-1">
{% block content %}
{% endblock %}
</main>
{% block sidebar %}
{% endblock %}
</div>
</div>
{% include '/dashboard/_scripts.html' %}
{% block scripts %}
{% endblock %}
</body>
</html>

View File

@ -7,9 +7,12 @@
<script type="text/javascript" src="{{ url_for('static', path="js/prism.js") }}"></script>
<script>
document.body.addEventListener("htmx:afterSwap", () => {
if (typeof window.initFlowbite === "function") {
window.initFlowbite();
}
});
document.body.addEventListener("htmx:afterSwap", (e) => {
const swappedEl = e.target;
const initTargets = swappedEl.querySelectorAll(".flowbite-init-target");
if (initTargets.length > 0 && typeof window.initFlowbite === "function") {
window.initFlowbite();
}
});
</script>