{# Same locale caveat as the sidebar in base.html. #}
{%- set has_sidebar = config.theme.include_sidebar and nav and (page or not config.plugins.get('i18n')) %}
{#
Edge to edge, like the layout below it — not a centred container. The class
tells the stylesheet there is a navigation column for the title to stand
over; without one the header is the plain row it always was.
#}
{%- if has_sidebar %}
{# The mobile hamburger comes first, matching the usual left-edge placement. #}
{%- if config.theme.icon == 'lucide' %}
{%- else %}
{%- endif %}
{% include "partials/nav.html" %}
{%- endif %}
{#
`nav` belongs to whichever locale mkdocs-static-i18n happened to build
last, and a static template (404.html) is rendered once, outside any
locale. Using its homepage there sends an English visitor to, say, the
French home page; base_url is locale-agnostic and always right.
#}
{%- if config.theme.logo %}
{%- endif %}
{{ config.site_name }}
{#
One spacer either side of the search field, so it sits in the middle of
the header rather than against the controls on the right. The trailing one
is dropped on a narrow window, where the field is a popover and what is
left in the row is the button that opens it — that belongs with the
controls at the right edge, in the same order as the field it replaces.
#}
{%- if 'search' in config.plugins %}
{% include "partials/search-box.html" %}
{%- endif %}
{% include "partials/language.html" %}
{% include "partials/color-mode.html" %}