{# No here, and Unpoly reads only from a full-document response. So the title block (overridden per view, as in base_full.html) is captured and sent as the X-Up-Title header instead (app_hooks.py), which keeps the tab title in step with the swapped content. #} {% set _fcu_title %}{% block title %}{{ construct.page_title }}{% endblock %}{% endset %} {{- set_fragment_title(_fcu_title) -}} {% set _up_mode = request.headers.get('X-Up-Mode', '') %} {% if _up_mode == 'modal' %} {# Still a <main>: this fragment replaces #main-content in the host document, so degrading it to a <div> would delete the main landmark from the page on the first modal navigation. #} <main id="main-content" up-main class="fcu-modal-container"> <div> {# Body first, as in base_full.html: a page may place flashes() itself. #} {% set _fcu_body %} {% block page_heading %} <h1 class="fcu-sr-only">{{ construct.page_heading }}</h1> {% endblock %} {% block content %}{% endblock %} {% endset %} {{ flashes() }} {{ _fcu_body }} </div> </main> {% else %} <main class="fcu-main-content{% set _main_class %}{% block main_class %}{% endblock %}{% endset %}{% if _main_class | trim %} {{ _main_class | trim }}{% endif %}" id="main-content" up-main> <div> {% set _fcu_body %}{{ self.page_heading() }}{{ self.content() }}{% endset %} {{ flashes() }} {{ _fcu_body }} </div> </main> {% endif %}