{% from "templates/wiki/macros/buttons.html" import render_icon %} {% from "templates/wiki/macros/space.html" import render_space_mark %} {% from "templates/wiki/macros/sidebar_tree.html" import render_wiki_tree %}
{#- Left: space identity only. The nav toggle is the floating pill below, mirroring frappe-ui docs. -#}
{{ render_space_mark(wiki_space) }} {{ wiki_space.space_name or _("Wiki") }}
{% for item in navbar_items %} {% if item.icon %} {{ render_icon(item.icon) }} {% endif %} {% endfor %}
{#- Floating nav trigger — frappe-ui docs pins its "Menu" button to the bottom-right of the viewport instead of the header. Classes are the frappe-ui Button outline/lg recipe (h-10 px-3 rounded-5, gray-outline colours) so it reads as the same component. z-30 keeps it under the sheet (z-50), which is what dismisses it once open. -#}
{#- Drag handle — geometry from frappe-ui docs' MobileNavSheet. -#}
{#- No divider: the docs sheet has no internal rules, only the search field's own border. -#}
{{ render_space_mark(wiki_space, size="md") }}

{{ wiki_space.space_name or _("Wiki") }}

{% if wiki_spaces_for_switcher and wiki_spaces_for_switcher|length > 1 %} {% endif %}
{% if wiki_spaces_for_switcher and wiki_spaces_for_switcher|length > 1 %} {% endif %} {% set current_route = doc.route if doc else '' %} {#- Sheet search — frappe-ui docs hides the navbar search field below md and puts this in the drawer instead, so it's the only search bar that ever renders on mobile. Markup is frappe-ui TextInput, size lg + subtle, with a prefix slot (h-10, ps-10 for the icon). It filters the tree in place, like the docs sheet; full-text search stays on the header's ⌘K button. -#}
{{ render_icon("search", "size-[18px] text-[var(--ink-gray-5)]") }}
{% if navbar_items %}
{% for item in navbar_items %} {% if item.icon %} {{ render_icon(item.icon, "w-5 h-5") }} {% else %} {{ item.label }} {% endif %} {% endfor %}
{% endif %}