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

Fix topbar issues #714

Merged
merged 1 commit into from
Feb 7, 2016
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
6 changes: 4 additions & 2 deletions assets/scss/modules/_navigation.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/* Navigation breakpoints */

.main-navigation {
.desktop-menu, .top-bar-left {
@include show-for(medium);
}

.title-bar {
#mobile-menu, .title-bar {
@include hide-for(medium);
}

/* Mobile menu */

.off-canvas {
ul#menu-main-menu {
height: 100vh;
Expand Down Expand Up @@ -39,6 +40,7 @@
padding-bottom: 0;
font-weight: bold;
font-size: 0.8rem;
line-height: 1;

&:hover:not(.button) {
background-color: #2a2a2a;
Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<header id="masthead" class="site-header" role="banner">
<div class="title-bar" data-responsive-toggle="site-navigation">
<button class="menu-icon" type="button" data-toggle="offCanvas"></button>
<button class="menu-icon" type="button" data-toggle="mobile-menu"></button>
<div class="title-bar-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion library/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function foundationpress_top_bar_r() {
wp_nav_menu( array(
'container' => false,
'menu_class' => 'dropdown menu',
'items_wrap' => '<ul id="%1$s" class="%2$s" data-dropdown-menu>%3$s</ul>',
'items_wrap' => '<ul id="%1$s" class="%2$s desktop-menu" data-dropdown-menu>%3$s</ul>',
'theme_location' => 'top-bar-r',
'depth' => 3,
'fallback_cb' => false,
Expand Down
2 changes: 1 addition & 1 deletion parts/mobile-off-canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

?>

<nav class="off-canvas position-left" id="offCanvas" data-off-canvas data-position="left" role="navigation">
<nav class="off-canvas position-left" id="mobile-menu" data-off-canvas data-position="left" role="navigation">
<?php foundationpress_mobile_nav(); ?>
</nav>

Expand Down
2 changes: 1 addition & 1 deletion parts/mobile-top-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

?>

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