From 0a6ae01982bb2686e0f74c527283772d7aacb328 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Thu, 11 Jun 2020 14:59:55 +0200 Subject: [PATCH] fix extra menu button inside mobile view --- kit/category-bestand.php | 7 ++++++- kit/css/header.css | 9 ++++++++- kit/css/menu.css | 21 +++++++++++++++------ kit/header.php | 1 - kit/template-parts/site-nav.php | 9 +++++++++ 5 files changed, 38 insertions(+), 9 deletions(-) diff --git a/kit/category-bestand.php b/kit/category-bestand.php index 26c57d3..128308d 100644 --- a/kit/category-bestand.php +++ b/kit/category-bestand.php @@ -46,7 +46,12 @@ get_header();
-
A
+
+
    +
  • Alle
  • +
  • A
  • +
+
diff --git a/kit/css/header.css b/kit/css/header.css index 25810b1..c9e1250 100644 --- a/kit/css/header.css +++ b/kit/css/header.css @@ -205,7 +205,7 @@ header.sticky-header .header-lang-small { } header.sticky-header .header-lang-small .dropdown .dropdown-content { - top: 54px; + top: 54px; } .header-lang-small .dropdown .dropdown-content li:not(.active) { @@ -341,6 +341,13 @@ header.sticky-header .header-lang { header .header-button-container { display: none; } + header nav ul.extraMenu { + display: inline; + } + + header nav ul.extraMenu li { + border-top: 0px; + } } .sticky-header { diff --git a/kit/css/menu.css b/kit/css/menu.css index 9ecb027..6cc4f7a 100644 --- a/kit/css/menu.css +++ b/kit/css/menu.css @@ -99,7 +99,7 @@ nav > ul > li .nav-first-level-opener::after { } @media (max-width: 960px) { - nav { + nav:not(.pagination) { position: fixed; top: 4.44444rem; right: -360px; @@ -113,32 +113,36 @@ nav > ul > li .nav-first-level-opener::after { background-color: #f2f2f2; transition: right .3s; } - nav > ul { + nav:not(.pagination) > ul { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; } - nav > ul > li { + nav:not(.pagination) > ul > li { position: relative; z-index: 2; width: 100%; margin-left: 0; border-bottom: 1px solid #cccccc; } - nav > ul > li > a { + + nav:not(.pagination) > ul > li > a { padding: 20px; line-height: 1; background-color: #ffffff; } - nav > ul > li:nth-of-type(1) { + nav:not(.pagination) > ul > li:nth-of-type(1) { border-top: 1px solid #cccccc; } + nav:not(.pagination) > ul.extraMenu > li { + border-top: 0px; + } nav > ul > li:hover > a::after, nav > ul > li:active > a::after { display: none; } - nav > ul > li .nav-first-level-opener { + nav:not(.pagination) > ul > li .nav-first-level-opener { display: block; } .header-burger-button:checked + label + nav { @@ -320,6 +324,11 @@ nav ul li:hover .nav-second-level { visibility: visible; } +nav ul.extraMenu { + display: none; + border-top: none; +} + @media (max-width: 960px) { .nav-second-level, nav ul li:hover .nav-second-level { diff --git a/kit/header.php b/kit/header.php index 668e4ff..9ab4bf2 100644 --- a/kit/header.php +++ b/kit/header.php @@ -161,7 +161,6 @@ ); echo strip_tags(wp_nav_menu( $menuParameters ), '' ); ?> - diff --git a/kit/template-parts/site-nav.php b/kit/template-parts/site-nav.php index 67831b3..c3f3866 100644 --- a/kit/template-parts/site-nav.php +++ b/kit/template-parts/site-nav.php @@ -9,4 +9,13 @@ )); ?> + false, + 'menu_class' => 'extraMenu', + 'depth' => 0, + 'theme_location' => 'extra', + )); + ?> +