{% load lucide static ui %} {% comment %} The page skeleton, with no branding of its own. `_platform_base.html` dresses it as RosterChief, `_club_base.html` as a club; the `branding` context processor picks between them per tenant. {% endcomment %} {% block title %}RosterChief{% endblock title %} {% comment %} Apply the stored theme before first paint, otherwise the page flashes the wrong colours. Nothing stored means "auto": we set no attribute at all, so daisyUI's `dark --prefersdark` follows the OS. {% endcomment %} {# After the stylesheet: brand overrides (logo urls, club colours) must win. #} {% block extra %}{% endblock extra %} {% comment %} An app shell: the viewport is the frame, and exactly one region scrolls. The body is a flex column pinned to the screen height with overflow hidden, so the navbar and the sidebar cannot be scrolled away — only
moves. Leave the body scrollable instead and a "sticky" sidebar still drifts on a long page, which is the thing this is for. {% endcomment %} {% comment %} Every text label on the right (theme name, "Django admin", the user's email) is wrapped in `hidden sm:inline` — icon-only below the `sm` breakpoint, with the button's own padding doing the rest (no fixed width to fight). None of these buttons wrap or shrink on their own (button labels don't break), so on a 360-400px phone the unlabelled row is what keeps the navbar from forcing the whole page wider than the device — which, left unchecked, makes the browser zoom the entire layout out to fit rather than actually rendering at device width. `min-w-0` on the brand block matters for the same reason: a flex item defaults to `min-width: auto`, which ignores `flex-1` and refuses to shrink past its content's intrinsic width. {% endcomment %}
{% comment %} The sidebar is a sibling of
, not inside it, so it sits outside the one scrolling region and stays put by construction. Pages with no menu (the auth screens) leave the block empty and
simply takes the full width. {% endcomment %} {% block menu %}{% endblock menu %} {% comment %} `scrollbar-gutter: stable` reserves the scrollbar's width whether or not the page actually overflows -- without it, a short page (nothing to scroll) renders a hair wider than a tall one (scrollbar eats the width), and switching between them visibly shifts the content. {% endcomment %}
{% if messages %}
{% for message in messages %} {% with alert=message|as_alert %} {% endwith %} {% endfor %}
{% endif %} {% block main %}{% endblock main %}
{% comment %} allauth puts page-level scripts and out-of-form markup here — notably the hidden `mfa_login` form the passkey button submits. Without this block that form is never rendered and "Sign in with a passkey" is a dead button. {% endcomment %} {% block extra_body %}{% endblock extra_body %}