style: show all back links the same way above the page title
This commit is contained in:
1 parent
3c19401d8b
commit
e9b0de44f1
14 files changed
+34
-64
No files matched your search
@@ -0,0 +1,8 @@
|
||||
{#
|
||||
The link back to where a page was opened from, always first in the content, above the title.
|
||||
Expects `url`; `label` defaults to "zurück" and may name the destination ("zurück zur Matrix").
|
||||
#}
|
||||
<a href="{{ url }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark"{{ qa_attribute('back-link') }}>
|
||||
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
|
||||
<span>{{ label|default('zurück') }}</span>
|
||||
</a>
|
||||
@@ -6,10 +6,7 @@
|
||||
{% block root %}
|
||||
{% set back = item.children|filter(child => child.extras.back is defined)|first %}
|
||||
{% if back %}
|
||||
<a href="{{ back.uri }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark">
|
||||
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
|
||||
<span>{{ back.label|raw }}</span>
|
||||
</a>
|
||||
{{ include('_partials/_back_link.html.twig', { 'url': back.uri, 'label': back.label }) }}
|
||||
{% endif %}
|
||||
<nav aria-label="Bereiche" class="flex overflow-x-auto border-b border-line mb-8">
|
||||
{% for child in item.children|filter(child => child.displayed and child.extras.divider is not defined and child.extras.back is not defined) %}
|
||||
|
||||
Reference in new issue
Block a user