{# `data-fcu-auth` / `data-fcu-menu` stamp the shell's session and menu; construct-core.js compares them with the X-Construct-Auth / -Menu response headers (see technical/architecture.org → The Main Menu). #} {# Varies per page (construct.page_title folds in the active view's name), so navigating between list/create/edit changes the document title. #} {% block title %}{{ construct.page_title }}{% endblock %} {# Icon library — chosen by the active icon mode (theme/design). Both fonts are self-hosted under construct_static (no external CDN). #} {% if construct.icon_mode == "bootstrap" %} {% else %} {% endif %} {# Core UI & Library assets #} {% if construct.design_stylesheet %} {# Built-in design skin (overrides whitelabel design tokens) #} {% endif %} {# Application stylesheets (FlaskConstructUI(stylesheets=…) / add_stylesheet). Linked after everything the library owns so app rules and --fcu-* overrides win the cascade. #} {% for href in construct.stylesheets or [] %} {% endfor %} {# Application scripts (FlaskConstructUI(scripts=…) / add_script). After the library's scripts, so `up` and its globals exist when they run. Unpoly keeps across navigation: each loads once per full page. #} {% for script in construct.scripts or [] %} {% endfor %} {% block head_extra %}{% endblock %} {# First focusable element on the page: lets a keyboard user jump the sidebar (which can be 20+ links) straight to content. Visible only while focused. #} {{ construct.t("nav-skip-to-content") }} {# Navbar / Top Header: `header=` on the constructor (see header_shown) or an app emptying {% block navbar %}. Rendered first so the layout knows whether it has a header row; like the footer, the
is emitted only when there is something in it. #} {% set _navbar %}{% if construct.header_shown %}{% block navbar %} {{ construct.title }} {# App-owned area between the brand and the actions. The wrapper is only emitted when an app fills the block, so an unused slot adds no markup. #} {% set _navbar_start %}{% block navbar_start %}{% endblock %}{% endset %} {% if _navbar_start | trim %}
{{ _navbar_start }}
{% endif %} {% endblock navbar %}{% endif %}{% endset %} {% set _has_navbar = _navbar | trim %}
{% if _has_navbar %}
{{ _navbar }}
{% endif %} {# Sidebar Wrapper #} {% block sidebar %} {% endblock sidebar %} {# Main Workspace. `main_class` adds classes to it per page, e.g. fcu-main-content--form for a single form at a readable width. It is on the element Unpoly swaps, so it follows in-app navigation. #}
{# The body renders before the flashes so a page that placed them itself with flashes() has done so by the time the layout asks. Every page needs exactly one

. Templates that render their own visible heading override this block to empty (the CRUD views do); component pages, whose content the library does not compose, get this visually-hidden default. #} {% set _fcu_body %} {% block page_heading %}

{{ construct.page_heading }}

{% endblock %} {% block content %} {% endblock %} {% endset %} {{ flashes() }} {{ _fcu_body }}
{# Footer: `footer=` / `footer_poll=` on the constructor (see footer_content and style/_footer.html) or an app's own {% block footer %}. The
is emitted only when there is something in it, so turning it off leaves no empty landmark behind. #} {% set _footer %}{% block footer %}{% include "style/_footer.html" %}{% endblock %}{% endset %} {% if _footer | trim %}
{{ _footer }}
{% endif %}