diff --git a/templates/_partials/_back_link.html.twig b/templates/_partials/_back_link.html.twig new file mode 100644 index 0000000..f3c2c51 --- /dev/null +++ b/templates/_partials/_back_link.html.twig @@ -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"). +#} + + {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} + {{ label|default('zurück') }} + diff --git a/templates/_partials/_tabs.html.twig b/templates/_partials/_tabs.html.twig index bcb9cbd..6faa68e 100644 --- a/templates/_partials/_tabs.html.twig +++ b/templates/_partials/_tabs.html.twig @@ -6,10 +6,7 @@ {% block root %} {% set back = item.children|filter(child => child.extras.back is defined)|first %} {% if back %} - - {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} - {{ back.label|raw }} - + {{ include('_partials/_back_link.html.twig', { 'url': back.uri, 'label': back.label }) }} {% endif %}