{# Coffee House Shared Navbar Component. Expected context variables: - app_name: str (e.g. "Auth", "CHQR", "Beany KMS", "Digi") - user: dict|None (JWT payload with .name, .apps, .sub) - auth_service_url: str (e.g. "https://auth.coffeehouse.tools") - nav_links: list[dict] (optional) — [{href, label, active?}] - request: Request object Below the `lg` breakpoint the centre links are hidden, so the same `nav_links` also render in a menu behind a button at the start of the bar. The button is a focusable div (DaisyUI's focus dropdown; Safari does not focus a real {# App switcher #} {% if user is defined and user and user.apps is defined %} {% include "components/app_switcher.html" %} {% endif %} {# User menu dropdown (avatar/name → Change password + Logout). Falls back to same-origin Auth when `auth_service_url` is unset (Auth itself) or points at another app's domain (consumer apps). #} {% if user is defined and user %} {% set _auth_base = auth_service_url | default('', true) %} {% endif %}