{# Application-level override of the library's structure/base.html. Note what is NOT here: the design stylesheet . That is registered in __init__.py with fcu.add_stylesheet(active_design_stylesheet) -- the supported hook for getting app CSS into the
. This override exists only because the demo also needs custom *markup* (the switcher in the navbar's navbar_start slot), which no configuration option can provide. Overriding this template means reproducing the library's layout selection verbatim, so full-page vs Unpoly-partial rendering keeps working. Those are internal paths and they can move between releases -- which is exactly why the stylesheet no longer goes through here. Both blocks below exist on the full-page layout only (base_partial has no or navbar), so Unpoly partial swaps simply skip them. #} {% set _up_target = request.headers.get('X-Up-Target', '') %} {% set _is_partial = _up_target and 'body' not in _up_target and 'html' not in _up_target %} {% set layout = "style/base_full.html" if not _is_partial else "style/base_partial.html" %} {% extends layout %} {% block head_extra %} {# Keep the reader's scroll position across a design switch, so the same component stays under the eye for side-by-side comparison. The switcher links are plain full-page navigations (they carry no up-follow), so we stash the offset on click and restore it once the new document loads. The key is one-shot: it only fires right after a switch, never on normal navigation between pages. #} {% endblock %} {# The switcher goes in navbar_start -- the app-owned area between the brand and the built-in actions -- so search, notifications and the user menu keep rendering beside it. (Overriding global_access instead would replace them.) #} {% block navbar_start %} {% endblock %}