{% load static i18n %} {% comment %} brickwork shell base. Every shell (app/auth/centred) extends this. It owns the document skeleton, the token/CSS asset links via plain {% static %} (stable filenames, no django-vite), and the theme/density/direction attributes on . No-JS floor (BR-BW-HTMX-001): nothing here requires Alpine or htmx. The {% block head_js %} / {% block body_js %} blocks are where a JS-enabled consumer loads the host-owned Alpine + htmx singletons; a consumer that loads neither still gets a fully working document. The theme attributes come from a consuming project's context (typically via brickwork.services.tokens.resolve_theme_attributes in a context processor); they default to the documented BRICKWORK_DEFAULT_* here so the shell renders unbranded out of the box. Brand hook (0.10.0, 03-services amendment): a non-empty bw_brand renders data-bw-brand on , NEVER on body or a link tag, because the derived color-mix tokens compute at :root and a lower hook cannot recolour them. The slug is validated at resolve time (resolve_theme_attributes). With bw_brand unset the output is byte-identical to 0.9.0. This is the first-class version of the site-level base.html override icvlocal carried from 0.6.0 (BR-BW-TPL-002 demand evidence, resolved here). {% endcomment %} {% block page_title %}{{ bw_page_title|default:'' }}{% endblock %} {# Stable-named artefacts, referenced by plain {% static %} (no manifest). #} {% block head_extra %}{% endblock %} {% block head_js %}{% endblock %} {% comment %}Skip link: first focusable element, jumps to the main workspace. Every shell ships one (the audit found 0/5 apps had a skip link).{% endcomment %} {% block skip_link_label %}{% translate "Skip to main content" %}{% endblock %} {% block shell %}{% endblock %} {% block body_js %}{% endblock %} {% comment %} Toast region (BR-BW-HTMX-005): the stable #bw-toast-region live region and OOB append target (hx-swap-oob="afterbegin:#bw-toast-region", BR-BW-HTMX-003/007). Included once here from 0.9.0 so every shell page has a working toast target out of the box; an empty region renders nothing visible. position defaults to top-end; a consuming project sets bw_toast_position in context (the bw_theme pattern) to move it. {% endcomment %} {% include "brickwork/components/_toast_region.html" with position=bw_toast_position %} {% comment %} htmx modal target (BR-BW-HTMX-005): a stable swap root for server-rendered modal fragments; zero-footprint when empty (display: contents) so an OOB or targeted swap never shifts layout (BR-BW-HTMX-009). Shipped with the 0.8.0 interaction tranche alongside _modal.html. {% endcomment %}
{% comment %} htmx slide-over target (BR-BW-HTMX-005, 0.14.0, brickwork#55): a SEPARATE stable swap root from #bw-modal-root, so a modal and a slide-over can be open at the same time (e.g. a split-shell detail screen where a slide-over sits beside content while a confirm modal opens over it). Zero-footprint when empty (display: contents), matching the modal root. {% endcomment %}