|
@@ -6,6 +6,7 @@
|
|
|
- `breadcrumbs_items` - breadcrumbs items to be rendered, in the format of [{"url": str, "label": str}]
|
|
|
- `side_panels` - list of side panels to be rendered
|
|
|
- `history_url` - URL to the history view for the current object
|
|
|
+ - `title` - title of the current page, to be displayed as a hidden h1 for screen readers
|
|
|
|
|
|
When including this template, use the `only` parameter whenever possible to
|
|
|
ensure that the above variables are indeed the only ones needed for this
|
|
@@ -23,8 +24,27 @@
|
|
|
<div class="w-pl-slim-header sm:w-pl-5 w-min-h-slim-header sm:w-pr-2 w-w-full w-flex-1 w-overflow-x-auto w-box-border">
|
|
|
<div class="w-flex w-flex-1 w-items-center w-overflow-hidden">
|
|
|
{% block header_content %}
|
|
|
- {% if breadcrumbs_items %}
|
|
|
- {% breadcrumbs breadcrumbs_items %}
|
|
|
+ {% block title %}
|
|
|
+ {% if title %}
|
|
|
+ {# Accessible page title as the h1 because we do not want #}
|
|
|
+ {# to put the h1 inside the breadcrumbs #}
|
|
|
+ <h1 class="w-sr-only">
|
|
|
+ {{ title }}
|
|
|
+ </h1>
|
|
|
+ {% endif %}
|
|
|
+ {% endblock %}
|
|
|
+
|
|
|
+ {% block breadcrumbs %}
|
|
|
+ {% if breadcrumbs_items %}
|
|
|
+ {% breadcrumbs breadcrumbs_items %}
|
|
|
+ {% endif %}
|
|
|
+ {% endblock %}
|
|
|
+
|
|
|
+ {% fragment as actions %}{% block actions %}{% endblock %}{% endfragment %}
|
|
|
+ {% if actions %}
|
|
|
+ {# Actions divider #}
|
|
|
+ <div class="w-w-px w-h-[30px] w-ml-auto sm:w-ml-0 w-bg-border-furniture"></div>
|
|
|
+ {{ actions }}
|
|
|
{% endif %}
|
|
|
{% endblock %}
|
|
|
</div>
|