{# @description Lays the page's title and content out beside a side panel, when it has one. With an empty side slot it draws the title and content and nothing else. #} {# @prop class:text | description:"Extra classes on the layout, drawn only when there is a side panel." #} {# @slot:header The page title. — Drawn above the content; the panel's align decides whether the panel starts level with it. #} {# @slot The page's content. — The main column. #} {# @slot:side — The side panel. Left empty, the page is drawn exactly as it was. #} {% load mvp %} {% if side|slot_is_empty is False %} {# The grid areas come from the panel's own data attributes, in mvp/tailwind/base.css. Title first, #} {# then the panel before or after the content by position, so reading and tab order follow the eye. #}
{% if header|slot_is_empty is False %}
{{ header }}
{% endif %} {% if side|root_attr:"data-mvp-side-position" == "start" %}{{ side }}{% endif %}
{{ slot }}
{% if side|root_attr:"data-mvp-side-position" != "start" %}{{ side }}{% endif %}
{% else %} {{ header }} {{ slot }} {% endif %}