From db235379074f7531d7cc8df424a26de85f9178d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Tue, 23 Jan 2024 17:30:05 +0100 Subject: [PATCH] auto-close navbar menu when tapped on mobile --- .../includes/organisms/layout/navbar.html | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/shared/templates/styleguide2/includes/organisms/layout/navbar.html b/shared/templates/styleguide2/includes/organisms/layout/navbar.html index 6c9e2fd8..ee7291fc 100644 --- a/shared/templates/styleguide2/includes/organisms/layout/navbar.html +++ b/shared/templates/styleguide2/includes/organisms/layout/navbar.html @@ -55,7 +55,13 @@ <a href="{{ target }}" - class="__js-root flex gap-1 items-center decoration-1 underline-offset-4 {% if selected_item == page.root_page.important_item_name %}navbar__menu-item--selected{% endif %}" + class=" + __js-root flex gap-1 items-center decoration-1 underline-offset-4 + + navbar__menu-item + + {% if selected_item == page.root_page.important_item_name %}navbar__menu-item--selected{% endif %} + " > <div class="mb-1"> {% if not is_transparent %} @@ -84,6 +90,9 @@ href="{{ target }}" class=" decoration-1 underline-offset-4 + + navbar__menu-item + {% if menu_item.value.title == selected_item %}navbar__menu-item--selected{% endif %} " >{{ menu_item.value.title }}</a> @@ -167,7 +176,13 @@ {% if important_item %} <a href="#" - class="__js-root flex items-center decoration-1 underline-offset-4 {% if selected_item == important_item %}navbar__menu-item--selected{% endif %}" + class=" + __js-root flex items-center decoration-1 underline-offset-4 + + navbar__menu-item + + {% if selected_item == important_item %}navbar__menu-item--selected{% endif %} + " > {% if not is_transparent %} {% include 'styleguide2/includes/atoms/icons/arrow.html' with width='27' height='28.35' %} @@ -186,6 +201,9 @@ href="{{ target }}" class=" decoration-1 underline-offset-4 + + navbar__menu-item + {% if menu_item.value.title == selected_item %}navbar__menu-item--selected{% endif %} " >{{ menu_item.value.title }}</a> -- GitLab