{# ── Unified Header (Notion-inspired breadcrumb navigation) ── Parameters available in calling context: breadcrumb_items: list of {label, url, id, icon, menu} — last item = current page page_icon: str — emoji icon page_title: str — fallback current-page label when no breadcrumb_items right_actions: str — raw HTML for right-side action buttons hamburger_click: str — Alpine expression for hamburger button hide_hamburger: bool — if truthy, hides the hamburger button hide_home: bool — if truthy, do not prepend the "Home" crumb nav_workspace_id: int — workspace id used to fetch the navigation menu nav_page_id: int — current page id (enables the sibling nav menu) #} {% set ns = namespace(items=[]) %} {% if not hide_home %} {% set ns.items = ns.items + [{"label": "Home", "url": "/workspaces", "id": none, "icon": "home", "menu": false, "home": true}] %} {% endif %} {% if breadcrumb_items %} {% for item in breadcrumb_items %} {% set ns.items = ns.items + [{ "label": item.get('label') or item.get('name') or 'Untitled', "url": item.get('url'), "id": item.get('id'), "icon": item.get('icon'), "menu": (item.get('id') is not none) }] %} {% endfor %} {% elif page_title %} {% set ns.items = ns.items + [{ "label": page_title, "url": none, "id": nav_page_id if nav_page_id is defined else none, "icon": page_icon if page_icon is defined else none, "menu": (nav_page_id is defined and nav_page_id) }] %} {% endif %}
{% if not hide_hamburger %} {% endif %}
{% if page_icon %} {% if page_icon in ("folder","file","star","link","trash","book","home","settings","lock","globe","image","edit","calendar","users","user","search","tag","bar-chart","grid","list","align-left","zap","paperclip","key","refresh","upload") %}{{ fd_icon(page_icon,18) }}{% else %}{{ page_icon }}{% endif %} {% endif %}
{% include '_notification_bell.html' %} {{ right_actions|safe if right_actions else '' }}