{% load i18n static ui %}{% comment %} The context bar (#227, the workspace design of #230): under the app's header on every workspace and station page, across the window on the surface, over a hairline. In order: a breadcrumb (workspace / station) with the previous and next item at its end; the title (the page's h1, or a line above a page's own h1 when ``heading`` is false); one mono line of provenance (coordinates, period, base period, settings, version); the page's actions at the end of the title's row; then the tabs and anything under them (the Inputs bar). It stays in view as the page scrolls (sticky), so include it as a direct child of the page's block; js/context-bar.js keeps --context-bar-height to its height, which the page's scroll padding uses so focus never goes under it (WCAG 2.4.11). On phones (below 40rem) the title and a ⋯ menu share one line, the actions are in that menu (a
disclosure; the script closes it on Escape and on a click elsewhere), the provenance line keeps only its parts marked ``phone``, and only the tabs and what is under them stay in view. Parameters: title; heading (true: the title is the h1); provenance (a list of {text, phone}); breadcrumb (optional, a list of {label, url}: the last one, without a url, is the page); step_previous and step_next (optional, {label, url}: the previous and next station; with ``code`` and ``name``, an index, named codes first); title_template (optional: a template drawn in place of the title, which holds the page's h1, such as an index's name and theme, #237); lead_template (optional: a line under the title, such as an index's definition); provenance_end (optional: a template at the end of the provenance line, such as the Indices' "Edit inputs", #263); flow (true: in place as the page scrolls, for a page without tabs, such as an index's); actions (optional, a template with the page's actions); tabs (optional, the sections as components/workspace_tabs.html takes them) and tabs_label (their navigation's name); below (optional, a template under the tabs, such as the Inputs bar); static (true: in place, not sticky and not across the window, for /patterns/). {% endcomment %}
{% if breadcrumb or step_previous or step_next %} {% endif %}
{% if title_template %}{% include title_template %} {% elif heading %}

{{ title }}

{% else %}

{{ title }}

{% endif %} {% if lead_template %}{% include lead_template %}{% endif %} {% if provenance %}

{% for part in provenance %}{{ part.text }}{% endfor %}{% if provenance_end %}{% include provenance_end %}{% endif %}

{% endif %}
{% if actions %}
{% include actions %}
{% endif %}
{% if tabs %}{% include "components/workspace_tabs.html" with tabs=tabs label=tabs_label %}{% endif %} {% if below %}{% include below %}{% endif %} {% if not static %}{% endif %}