Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Cleanup Navigation #1366

Merged
merged 2 commits into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
</div>

<nav class="site-navigation top-bar" role="navigation">
<nav class="site-navigation top-bar" role="navigation" id="<?php foundationpress_mobile_menu_id(); ?>">
<div class="top-bar-left">
<div class="site-desktop-title top-bar-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
Expand Down
4 changes: 2 additions & 2 deletions library/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function foundationpress_top_bar_r() {
wp_nav_menu(
array(
'container' => false,
'menu_class' => 'dropdown menu',
'items_wrap' => '<ul id="%1$s" class="%2$s desktop-menu" data-dropdown-menu>%3$s</ul>',
'menu_class' => 'dropdown menu desktop-menu',
'items_wrap' => '<ul id="%1$s" class="%2$s" data-dropdown-menu>%3$s</ul>',
'theme_location' => 'top-bar-r',
'depth' => 3,
'fallback_cb' => false,
Expand Down
10 changes: 5 additions & 5 deletions src/assets/scss/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ $dropdownmenu-arrow-color: $anchor-color;
$dropdownmenu-arrow-size: 6px;
$dropdownmenu-arrow-padding: 1.5rem;
$dropdownmenu-min-width: 200px;
$dropdownmenu-background: $dark-nav-color;
$dropdownmenu-submenu-background: $dropdownmenu-background;
$dropdownmenu-background: null;
$dropdownmenu-submenu-background: $white;
$dropdownmenu-padding: $global-menu-padding;
$dropdownmenu-nested-margin: 0;
$dropdownmenu-submenu-padding: $dropdownmenu-padding;
$dropdownmenu-border: 1px solid $medium-gray;
$dropdown-menu-item-color-active: $light-gray;
$dropdown-menu-item-color-active: get-color(primary);
$dropdown-menu-item-background-active: transparent;

// 19. Flexbox Utilities
Expand Down Expand Up @@ -847,8 +847,8 @@ $tooltip-radius: $global-radius;
// 55. Top Bar
// -----------

$topbar-padding: 0;
$topbar-background: $dark-nav-color;
$topbar-padding: 0.5rem;
$topbar-background: $light-gray;
$topbar-submenu-background: $topbar-background;
$topbar-title-spacing: 0.5rem 1rem 0.5rem 0;
$topbar-input-width: 200px;
Expand Down
79 changes: 1 addition & 78 deletions src/assets/scss/modules/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.site-title-bar {
@include hide-for(medium);
}

//
.desktop-menu,
.site-navigation .top-bar-left {
@include show-for(medium);
Expand All @@ -14,83 +14,6 @@
font-weight: bold;
}

// Mobile menu
.mobile-menu {
display: none; // prevents repaint caused by JS hiding menu onload
}

.off-canvas {
> ul.menu {
height: 100vh;
padding: 1rem;

a {
color: $white;
font-weight: 600;
font-size: rem-calc(15);
}
}

.menu .active > a { background-color: #ccc; }

}

.title-bar-title {
a {
font-size: 1rem;
color: #B9B9B9;
}
}

.mobile-menu,
.mobile-off-canvas-menu {

.menu .is-active > a {
background-color: lighten($dark-nav-color, 5%);
}
}

// Tablet and desktop menu

.top-bar {

.top-bar-title a {
font-size: 1rem;
color: #B9B9B9;
padding-left: 1rem;
line-height: 1.8;
}

.menu a {
color: #e6e6e6;
padding-top: 0;
padding-bottom: 0;
font-weight: bold;
font-size: 0.8rem;
line-height: 1;

&:hover:not(.button) {
background-color: #42525D;
}
}

.menu .active > a { background-color: #ccc; }

.menu>li:not(.menu-text)>a { padding: 1rem; }
.menu li:not(:last-child) { border-right: 1px solid #4e4e4e; }

.dropdown.menu .submenu { border: 0; }
.dropdown.menu .has-submenu.is-down-arrow a { padding-right: 1rem; }
.dropdown.menu .has-submenu.is-down-arrow > a::after { border: 0; }
.dropdown.menu:first-child > li.is-dropdown-submenu-parent > a::after { display: none; }
}

.site-navigation {
@include breakpoint(small only) {
padding: 0; // prevents container visibility on small screens
}
}

// WP post navigation
.post-navigation {
@include clearfix;
Expand Down
2 changes: 1 addition & 1 deletion template-parts/mobile-top-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

?>

<nav class="mobile-menu vertical menu" id="<?php foundationpress_mobile_menu_id(); ?>" role="navigation">
<nav class="mobile-menu vertical menu" role="navigation">
<?php foundationpress_mobile_nav(); ?>
</nav>