{% load static mvp i18n flex_menu %}{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
{% block head %}
{% block head.title %}{% block title %}
{% endblock title %}{% if mounted_app %} | {{ mounted_app.name }}{% endif %}{% endblock head.title %}
| {% firstof mvp_config.site_name request.site.name %}
{% comment %}
Two links, not one merged file: the light/dark SVGs would go stale
if merged. The light link is unconditional as well as media-scoped,
so a browser that ignores `media` on an icon still gets one.
{% endcomment %}
{% if mvp_config.pwa %}{% include "mvp/pwa/head.html" %}{% endif %}
{% if icon_stylesheet_url %}
{% endif %}
{# django-mvp-layout's stylesheet comes first, so its layer sits below #}
{# Tailwind's components and utilities, and a class on a layout, such #}
{# as its bg, beats the layout's own background. #}
{% block styles %}
{% endblock styles %}
{% comment %}
Bundled and shipped with the package rather than fetched at page
load, so the UI does not depend on a third party staying up. Add
your own Alpine plugins or htmx extensions by extending `head`.
{% endcomment %}
{# The layout's script comes from django-mvp-layout. Not deferred: each #}
{# layout mounts from a script right after its markup. #}
{% endblock head %}
{% comment %}
Scripts and styles a component sends with ``, once
per page, such as the formset's. Outside `head` so overriding that block
keeps it. A plain script here still runs before the deferred bundle.
{% endcomment %}
{% comment %}
Only a theme's stylesheet knows its scheme, so it's read here, after every
head stylesheet and before first paint. Outside `head` so overriding that
block keeps it. The two rules are complements: one image of a pair shows.
{% endcomment %}
{% comment %}
Declared outside the app shell, in normal document flow, so filled
content scrolls away with the page while `app.header` keeps pinning
independently — an announcement bar above a sticky navbar (#244).
{% endcomment %}
{% block announcement %}
{% endblock announcement %}
{% block app %}
{% comment %}
The shell is one layout from django-mvp-layout, arranged by the
layout code in MVP_CONFIG["layout"]["view"], or a layout_view context
variable when a template sets one. data-mvp-breakpoint
keeps the shell's own responsive classes (mvp-dock-only and the rest)
keyed to the sidebar's breakpoint, so keep the wrapper when
overriding this block.
{% endcomment %}
{% firstof layout_view mvp_config.layout.view as layout_view %}
{% with sb=mvp_config.layout.sidebar sec=mvp_config.layout.secondary_sidebar %}
{% block app.header %}
{% block app.navbar %}
{% block app.navbar.start %}
{% endblock app.navbar.start %}
{% block app.breadcrumbs %}
{% endblock app.breadcrumbs %}
{% block app.navbar.center %}
{% endblock app.navbar.center %}
{% block app.navbar.end %}
{% endblock app.navbar.end %}
{% endblock app.navbar %}
{% block app.header.tray %}
{# A view that puts local_menu in its context gets its #}
{# record's local navigation under the header. #}
{% if local_menu %}
{% render_menu local_menu renderer="local" pk=object.pk %}
{% endif %}
{% endblock app.header.tray %}
{% endblock app.header %}
{% block app.sidebar %}
{% comment %}
A region block left empty draws the component's own default.
Fill one and its content replaces that region outright.
{% endcomment %}
{% block app.sidebar.header %}
{% endblock app.sidebar.header %}
{% block app.sidebar.body %}
{% endblock app.sidebar.body %}
{% block app.sidebar.footer %}
{% endblock app.sidebar.footer %}
{% endblock app.sidebar %}
{% block app.main %}
{% block content %}
{% endblock content %}
{% block app.messages %}
{% endblock app.messages %}
{% endblock app.main %}
{% comment %}
The right sidebar is drawn only when a page fills the block. The
header's button for it is drawn hidden, and django-mvp-layout's
script shows it where this sidebar exists.
{% endcomment %}
{% block app.secondary_sidebar %}
{% endblock app.secondary_sidebar %}
{% block app.footer %}
{% endblock app.footer %}
{% block app.dock %}
{% endblock app.dock %}