fix: keep the tab rows from scrolling vertically

This commit is contained in:
fromme committed 2026-11-12 11:41:46 +01:00
1 parent e9b0de44f1
commit 8f4c4d8267
3 files changed
+22 -4

No files matched your search

+2 -2
View File
@@ -8,12 +8,12 @@
{% if back %}
{{ 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">
<nav aria-label="Bereiche" class="tabs 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) %}
{# by route name: the items carry the return url, which the matcher would compare as well #}
{% set current = child.extras.routes|default([])|filter(r => r.route is defined and r.route == app.request.attributes.get('_route'))|length > 0 %}
<a href="{{ child.uri }}"
class="{{ html_classes('-mb-px shrink-0 whitespace-nowrap border-b-4 px-3 py-2 text-sm', { 'border-brand-bright font-bold text-brand': current, 'border-transparent text-ink hover:text-brand': not current }) }}"
class="{{ html_classes('tab', { 'tab--current': current }) }}"
{% if current %}aria-current="page"{% endif %}>{{ child.label|raw }}</a>
{% endfor %}
</nav>
@@ -29,11 +29,11 @@
</div>
</div>
{# one tab per questionnaire, as the record tabs (_partials/_tabs.html.twig) #}
<nav aria-label="Fragebögen" class="flex overflow-x-auto border-b border-line mb-6">
<nav aria-label="Fragebögen" class="tabs mb-6">
{% for other in definitions %}
{% set current = other.key == definition.key %}
<a href="{{ path('app_administrative_questionnaire_index', { 'questionnaire': other.key }) }}"
class="{{ html_classes('-mb-px shrink-0 whitespace-nowrap border-b-4 px-3 py-2 text-sm', { 'border-brand-bright font-bold text-brand': current, 'border-transparent text-ink hover:text-brand': not current }) }}"
class="{{ html_classes('tab', { 'tab--current': current }) }}"
{% if current %}aria-current="page"{% endif %}>{{ other.title }}</a>
{% endfor %}
</nav>