{#- chirp-ui: App shell layout — extends chirp shell with ChirpUI structure Use this for persistent app shells (topbar, sidebar). Extends chirp/layouts/shell.html and fills in ChirpUI CSS, toast, and app shell structure. Usage: {% extends "chirpui/app_shell_layout.html" %} {% block brand %}My App{% end %} {% block sidebar %} {% from "chirpui/sidebar.html" import sidebar, sidebar_link, sidebar_section, shell_brand_link %} {% call sidebar() %} {% call sidebar_section("Main") %} {{ sidebar_link("/", "Home") }} {{ sidebar_link("/dashboard", "Dashboard") }} {% end %} {% end %} {% end %} {% block content %} Page content here {% end %} Collapsible sidebar (override block with "true"): {% block sidebar_collapsible %}{% end %} Custom brand (override brand_link for non-/ href or custom markup): {% block brand_link %}{% call shell_brand_link(href="/projects") %}My App{% end %}{% end %} Alpine: Chirp injects Alpine.js via AppConfig(alpine=True) or automatically when use_chirp_ui() is called. This layout does NOT load Alpine itself — Chirp is the single authority for Alpine injection. Full-height main (chat, maps): override {% block main_shell_class %} with chirpui-app-shell__main--fill so #page-content receives flex:1 and inner panels handle scroll. See docs/LAYOUT-VERTICAL.md. HTMX: primary #main swap runs before out-of-band fragments; a beforeSwap handler clears #chirp-shell-actions when the response includes shell-actions OOB (see docs/UI-LAYERS.md). -#} {# target: body #} {% extends "chirp/layouts/shell.html" %} {% block head %} {% if csrf_token is defined %} {% end %} {% block head_extra %}{% end %} {% end %} {% block shell %} {% from "chirpui/sidebar.html" import sidebar, sidebar_toggle, shell_brand_link %} {% from "chirpui/shell_actions.html" import shell_actions_bar %} {% from "chirpui/toast.html" import toast_container %} {% set _sidebar_collapsible = "false" %} {% set _collapsible = _sidebar_collapsible and _sidebar_collapsible != "false" %} {% set _shell_actions = shell_actions | default(none) %} {% set _shell_actions_target = _shell_actions.target if _shell_actions else "chirp-shell-actions" %}