Skip to content

Commit

Permalink
Merge branch 'release/1.3.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Jun 28, 2017
2 parents bd39803 + 8b21cc7 commit cfd137c
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 24 deletions.
4 changes: 3 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
== Changelog ==

View full release information on [Github](https://github.com/siteorigin/siteorigin-north/releases).
= 1.3.13 - 28 June 2017 =
* Resolved header shadow bug.
* Added support for Max Mega Menu.

= 1.3.12 - 13 June 2017 =
* Added the ability to close the WooCommerce Quick View modal with the escape key.
Expand Down
44 changes: 29 additions & 15 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,36 @@

<nav id="site-navigation" class="main-navigation" role="navigation">

<?php if ( siteorigin_page_setting( 'layout' ) !== 'stripped' ) : ?>
<?php if ( siteorigin_page_setting( 'layout' ) !== 'stripped' ) : ?>

<a href="#menu" id="mobile-menu-button">
<?php siteorigin_north_display_icon( 'menu' ) ?>
<?php if ( siteorigin_setting( 'responsive_menu_text' ) ) : ?>
<?php echo esc_html( siteorigin_setting( 'responsive_menu_text' ) ); ?>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'siteorigin-north' ); ?></span>
<?php endif; ?>
</a>

<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu'
) );
?>


<?php if ( function_exists( 'max_mega_menu_is_enabled' ) && max_mega_menu_is_enabled( 'primary' ) ) : ?>

<?php
wp_nav_menu( array(
'theme_location' => 'primary'
) );
?>

<?php else: ?>

<a href="#menu" id="mobile-menu-button">
<?php siteorigin_north_display_icon( 'menu' ) ?>
<?php if ( siteorigin_setting( 'responsive_menu_text' ) ) : ?>
<?php echo esc_html( siteorigin_setting( 'responsive_menu_text' ) ); ?>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'siteorigin-north' ); ?></span>
<?php endif; ?>
</a>

<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu'
) );
?>

<?php endif; ?>

<?php if ( class_exists( 'Woocommerce' ) ) : ?>
<?php if ( ( ! ( is_cart() || is_checkout() ) && siteorigin_setting( 'woocommerce_display_cart' ) ) || ( ( is_cart() || is_checkout() ) && siteorigin_setting( 'woocommerce_display_checkout_cart' ) ) ) : ?>
Expand Down
21 changes: 16 additions & 5 deletions js/north.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ jQuery( function ( $ ) {
}
}
};

sttWindowScroll();
$( window ).scroll( sttWindowScroll );
$( '#scroll-to-top' ).click( function () {
$( 'html,body' ).animate( {scrollTop: 0} );
} );

// Now lets do the sticky menu

// Now lets do the sticky menu.
if ( $( '#masthead' ).hasClass( 'sticky-menu' ) ) {
var $mhs = false,
mhTop = false,
Expand Down Expand Up @@ -322,9 +322,20 @@ jQuery( function ( $ ) {

}
smSetup();

$( window ).resize( smSetup ).scroll( smSetup );

// Sticky header shadow.
var smShadow = function() {
if ( $( window ).scrollTop() > 0 ) {
$( $mh ).addClass( 'floating' );
}
else {
$( $mh ).removeClass( 'floating' );
}
};
smShadow();
$( window ).scroll( smShadow );

var mhPadding = {
top: parseInt( $mh.css( 'padding-top' ) ),
bottom: parseInt( $mh.css( 'padding-bottom' ) )
Expand Down Expand Up @@ -360,7 +371,7 @@ jQuery( function ( $ ) {
$mh.css( {
'padding-top': mhPadding.top * scale,
'padding-bottom': mhPadding.bottom * scale
} ).addClass( 'floating' );
} );
}
else {
if ( ! $img.length ) {
Expand All @@ -370,7 +381,7 @@ jQuery( function ( $ ) {
$mh.css( {
'padding-top': mhPadding.top,
'padding-bottom': mhPadding.bottom
} ).removeClass( 'floating' );
} );
}
};
smResizeLogo();
Expand Down
16 changes: 16 additions & 0 deletions sass/navigation/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,22 @@
}
}
}

// Max Mega menu
#mega-menu-wrap-primary {
display: inline-block;

.mega-sub-menu {
li {
min-width: auto;
}
}

ul ul a {
white-space: normal;
width: auto !important;
}
}
}

#header-search {
Expand Down
6 changes: 3 additions & 3 deletions sass/site/primary/_masthead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@
}

&.floating {
box-shadow: 0 1px 1px rgba(0,0,0,0.075);
box-shadow: 0 1px 1px rgba(0, 0, 0 , .075);
}

// All the different layouts

// Header layouts.
&.layout-centered {

.container-inner {
Expand All @@ -126,6 +125,7 @@
display: block;
}
}

body.responsive & {
min-width: 0;
}
Expand Down
7 changes: 7 additions & 0 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cfd137c

Please sign in to comment.