{#- chirp-ui: App Shell component Full-page shell with topbar, sidebar, and main content area. Navigation is driven by explicit hx-boost on sidebar_link/nav_link, targeting #main to keep the sidebar and topbar persistent. Named slots: brand (when brand_slot=true), topbar, topbar_end, sidebar, default (main content). Usage: from "chirpui/app_shell.html" import app_shell call app_shell(brand="My App", brand_url="/") {% slot topbar %}breadcrumbs(...){% end %} {% slot topbar_end %}command_palette_trigger(){% end %} {% slot sidebar %}call sidebar()...end{% end %} Page content here end call app_shell(brand_url="/", brand_slot=true) {% slot brand %}logo(text="My App", image_src="/static/logo.svg", variant="both"){% end %} {% slot sidebar %}...{% end %} Page content here end call app_shell(brand="My App", sidebar_collapsible=true) ... end -#} {% from "chirpui/shell_actions.html" import shell_actions_bar %} {% def app_shell(brand="", brand_url="/", brand_slot=false, sidebar_collapsible=false, topbar_variant="default", sidebar_variant="default", shell_actions=none, cls="") %} {% set topbar_variant = topbar_variant | validate_variant(("default","glass","gradient"), "default") %} {% set sidebar_variant = sidebar_variant | validate_variant(("default","glass","muted"), "default") %} {% set topbar_class = " chirpui-app-shell__topbar--" ~ topbar_variant if topbar_variant != "default" else "" %} {% set sidebar_class = " chirpui-app-shell__sidebar--" ~ sidebar_variant if sidebar_variant != "default" else "" %} {% set shell_actions_target = shell_actions.target if shell_actions else "chirp-shell-actions" %} {% if sidebar_collapsible %}
{% else %}
{% end %}
{% if brand_slot %} {% slot brand %} {% else %} {{ brand }} {% end %}
{% slot topbar %}
{% if shell_actions %} {{ shell_actions_bar(shell_actions) }} {% end %}
{% slot topbar_end %}
{% slot %}
{% end %}