{% load static %} {% block title %}Dashboard{% endblock %} — Fincas {% comment %} Stylesheet order is load-bearing — framework → theme tokens → binding layer → compat → local overrides. Two constraints in particular: * erp-compat.css MUST come after tabler.min.css. Several of its rules (.opacity-5 and the rest of the opacity scale) tie on specificity and win on source order alone. Move it up and they silently lose. * themes/eva-01.css defines the --brand-t-* tokens that tabler-bindings.css maps onto --tblr-*, so it must precede it. Swapping themes is one href change on #theme-css; swapping frameworks is one on #framework. That is the whole seam. #theme-css is registry-driven (settings.ERP_THEMES via the core.context_processors.erp_themes context processor): the server renders the DEFAULT theme's stylesheet, and the pre-paint snippet at the end of re-points it to the visitor's stored choice before first paint. A registry entry with css=None means "no theme stylesheet" — the link element stays in the DOM but disabled (link.disabled is the standard stylesheet on/off switch; an empty href would be invalid HTML). {% endcomment %} {% if erp_default_theme_entry.css_url %} {% else %} {% endif %} {% block stylesheets %}{% endblock %} {# ERP chat assistant — page context. Templates override this block #} {# to tell the assistant which record the user is currently viewing. #} {% block chat_context %}{% endblock %} {# Theme registry as XSS-safe JSON — read by the pre-paint snippet below #} {# and by the picker JS in includes/scripts.html. #} {{ erp_themes|json_script:"erp-themes-data" }} {% comment %} Tabler layout shell. Structure is load-bearing, not cosmetic: .page root flex wrapper └ aside.navbar-vertical the sidebar └ [class^=container] REQUIRED — .navbar-vertical.navbar-expand-lg > [class^=container] sets flex-direction:column. Without it, brand + nav lay out in a ROW. └ .page-wrapper sibling of aside; the .navbar-expand-lg.navbar-vertical ~ .page-wrapper rule gives it margin-left:15rem. Nesting it inside the aside silently kills the offset. Dropped from the Soft UI shell: .g-sidenav-show, .bg-gray-100 (fought the theme's body background and forced its only !important), .main-content, .border-radius-lg, .max-height-vh-100. {% endcomment %}
{% include "includes/sidebar.html" %}
{% include "includes/navigation.html" %}
{% if messages %} {% for message in messages %} {% endfor %} {% endif %} {% block content %}{% endblock %}
{% comment %} Outside .page-body: Tabler's .footer uses margin-top:auto to sink to the bottom of .page-wrapper. Nested in the content container it would float directly under the content instead. {% endcomment %} {% include "includes/footer.html" %}
{% include "includes/scripts.html" %} {% include "includes/submit_guard.html" %} {% include "includes/scroll_regions.html" %} {% block javascripts %}{% endblock %} {# ERP chat assistant drawer — only renders for authenticated users #} {% if user.is_authenticated %} {% include "chat/drawer.html" %} {% endif %}