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

Move nav visibility classes from php to scss #698

Merged
merged 1 commit into from
Jan 28, 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
13 changes: 0 additions & 13 deletions assets/scss/components/_off-canvas.scss

This file was deleted.

5 changes: 2 additions & 3 deletions assets/scss/foundation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@import 'font-awesome';
@import 'motion-ui';

// Foundation global styles
// Foundation global styles
@include foundation-global-styles;

// Individual foundation components
Expand Down Expand Up @@ -70,15 +70,14 @@
*/

// Modules
@import "modules/topbar";
@import "modules/navigation";
@import "modules/footer";
@import "modules/sidebar";

// Components
@import "components/buttons";
@import "components/featured-image";
@import "components/dividers";
@import "components/off-canvas";

// Templates
@import "templates/front";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/* Navigation breakpoints */

.main-navigation {
@include show-for(medium);
}

.title-bar {
@include hide-for(medium);
}

/* Mobile menu */
.off-canvas {
ul#menu-main-menu {
height: 100vh;
padding: 1rem;
}
}

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

/* Tablet and desktop menu */
.top-bar {

.menu .home a {
Expand All @@ -19,44 +45,19 @@
}
}

.menu>li:not(.menu-text)>a {
padding: 1rem;
}

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

.dropdown.menu .submenu {
background-color: #121212;
color: #e6e6e6;
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 .has-submenu.is-down-arrow a { padding-right: 1rem; }
.dropdown.menu .has-submenu.is-down-arrow>a::after { border: 0; }
}

.vertical &.menu {
padding: 1rem;
}

.title-bar {
@include breakpoint(medium) {
display: none;
}

.title a {
font-size: 1rem;
color: #B9B9B9;
}
}
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div>

<nav id="site-navigation" class="main-navigation top-bar" role="navigation">
<div class="top-bar-left show-for-medium">
<div class="top-bar-left">
<ul class="menu">
<li class="home"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions 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 show-for-medium" data-dropdown-menu>%3$s</ul>',
'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 All @@ -44,7 +44,7 @@ function foundationpress_mobile_nav() {
'menu' => __( 'mobile-nav', 'foundationpress' ),
'menu_class' => 'vertical menu',
'theme_location' => 'mobile-nav',
'items_wrap' => '<ul id="%1$s" class="%2$s show-for-small-only" data-accordion-menu>%3$s</ul>',
'items_wrap' => '<ul id="%1$s" class="%2$s" data-accordion-menu>%3$s</ul>',
'fallback_cb' => false,
'walker' => new Foundationpress_Mobile_Walker(),
));
Expand Down