From 6792d60c2d16207dd7ca80496fba97040a361fcd Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 9 Feb 2017 14:16:21 -0500 Subject: [PATCH] Fixed some more responsive top-navigation styles. --- assets/js/global.js | 8 ++-- style.css | 39 +++++++++++++++++--- template-parts/navigation/navigation-top.php | 1 - 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/assets/js/global.js b/assets/js/global.js index 1186568..966b2f2 100755 --- a/assets/js/global.js +++ b/assets/js/global.js @@ -68,16 +68,16 @@ // When there's a custom header image or video, the header offset includes the height of the navigation. if ( isFrontPage && ( $body.hasClass( 'has-header-image' ) || $body.hasClass( 'has-header-video' ) ) ) { - headerOffset = $customHeader.innerHeight() - navigationOuterHeight; +// headerOffset = $customHeader.innerHeight() - navigationOuterHeight; } else { - headerOffset = $customHeader.innerHeight(); +// headerOffset = $customHeader.innerHeight(); } // If the scroll is more than the custom header, set the fixed class. if ( $( window ).scrollTop() >= headerOffset ) { - $navigation.addClass( navigationFixedClass ); - $navigationBottom.addClass( navigationFixedClass ); +// $navigation.addClass( navigationFixedClass ); +// $navigationBottom.addClass( navigationFixedClass ); } else { //$navigation.removeClass( navigationFixedClass ); diff --git a/style.css b/style.css index 878f393..e0a77ad 100755 --- a/style.css +++ b/style.css @@ -1356,7 +1356,7 @@ a:hover .nav-title, .main-navigation .menu-item-has-children > a > .icon, .main-navigation .page_item_has_children > a > .icon, .main-navigation ul a > .icon { - display: none; + display: block; } .main-navigation > div > ul { @@ -1616,6 +1616,38 @@ a:hover .nav-title, padding: 0; } @media screen and (max-width: 1024px) { + + + .home .navigation-top { + bottom: auto; + position: fixed; + left: 0; + right: 0; + top: 140px; + width: 100%; + z-index: 7; + font-size: 14px; + font-size: 0.875rem; + padding: 6px; + } + .home .navigation-bottom { + bottom: 0; + position: fixed; + font-size: 14px; + font-size: 0.875rem; + left: 0; + right: 0; + width: 100%; + z-index: 7; + height: 80px; + padding: 6px; + background-color: #fff; + border-top: 2px solid black; + } + + .admin-bar .site-navigation-fixed.navigation-top { + top: 32px; + } .has-header-image .custom-header-media img, .has-header-video .custom-header-media video, .has-header-video .custom-header-media iframe, @@ -1661,10 +1693,6 @@ a:hover .nav-title, width: 100%; z-index: 9; } - .home .site-navigation-fixed.navigation-top { - top: 138px; - padding: 6px; - } .home .wrap .static-nav-parent { left: 0; position: relative; @@ -1682,6 +1710,7 @@ a:hover .nav-title, .js .home #static-nav-bottom .static-nav-section > ul { margin: 0; } + } /*-------------------------------------------------------------- 13.0 Layout diff --git a/template-parts/navigation/navigation-top.php b/template-parts/navigation/navigation-top.php index 6d6741c..5fe1e45 100755 --- a/template-parts/navigation/navigation-top.php +++ b/template-parts/navigation/navigation-top.php @@ -57,7 +57,6 @@ echo ""; } echo ""; - echo "
"; echo ""; } echo ""; -- 2.17.1