{% load i18n brickwork_icons %} {% comment %} Marketing mobile-nav toggle (icvoss/django-brickwork#263). Package-owned companion to marketing_nav_region: a native
/ disclosure that, as a SIBLING of .bw-marketing-header__nav and .bw-marketing-header__actions, collapses those regions on narrow viewports and reveals them when open. marketing.css owns the collapse rules; this partial owns only the trigger markup. Place it by overriding marketing_nav_region (do NOT fill the outer marketing_header and reproduce the shell): {% block marketing_nav_region %} {% include "brickwork_marketing/components/_mobile_nav_toggle.html" %} {% endblock %} Or insert it before marketing_actions_region the same way. Sibling position is load-bearing: the CSS uses general sibling combinators off .bw-mobile-nav-toggle[open]. No JS (BR-BW-HTMX-001). Both icons always render; CSS toggles which shows on [open]. Accessible name is on (aria-label); icons are decorative. States: closed (default) and open (native details[open]). CSS swaps the menu/close icons and reveals following nav/actions siblings when open. Accessibility: summary carries aria-label="Menu"; icons are decorative (decorative=True). Closed, the following nav/actions are display:none (removed from the a11y tree) until the disclosure opens. No Alpine. Responsive: marketing.css shows the toggle below --bw-breakpoint-lg (64rem) and hides it at that breakpoint and up, restoring the inline nav/actions bar. {% endcomment %} {% translate "Menu" as menu_label %}
{% bw_icon "menu" size="md" decorative=True css_class="bw-mobile-nav-toggle__icon bw-mobile-nav-toggle__icon--open" %} {% bw_icon "close" size="md" decorative=True css_class="bw-mobile-nav-toggle__icon bw-mobile-nav-toggle__icon--close" %}