-
-
Save robincornett/34120d76561ad3942a92 to your computer and use it in GitHub Desktop.
Snippets for Altitude Pro example tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening tag! | |
add_filter( 'supersideme_modify_display_css', 'altitude_full_width_supersideme' ); | |
function altitude_full_width_supersideme( $display_css ) { | |
$display_css = ' | |
nav, #nav, .nav-primary, .nav-secondary, .site-header .secondary-toggle { display: none; } | |
.slide-nav-link { display: block; }'; | |
return $display_css; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do not include opening tag! | |
add_filter( 'supersideme_navigation_options', 'altitude_modify_supersideme_options', 10, 2 ); | |
function altitude_modify_supersideme_options( $side_tweaks ) { | |
$side_tweaks['position'] = 'absolute'; // lock the button postion within its parent element | |
$side_tweaks['width'] = 'auto'; // instead of 100% width | |
$side_tweaks['displace'] = false; // the side panel will slide over the site instead of pushing it | |
$side_tweaks['location'] = '.site-header .wrap'; // the menu button will hook into the .site-header div instead of being added to the body (default) | |
$side_tweaks['closeevent'] = '.menu-close, a[itemprop="url"]:not(.sub-menu-toggle)'; // change what causes the SuperSide Me panel to close (useful mostly if you have on page anchor links in your menu) | |
$side_tweaks['button_color'] = 'transparent'; // optional, so it has no color | |
$side_tweaks['background'] = 'rgba(0,0,0,.8)'; // optional, to give the menu panel some transparency | |
return $side_tweaks; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do not include opening tag! | |
add_action( 'after_setup_theme', 'altitude_conditionally_add_menus' ); | |
function altitude_conditionally_add_menus() { | |
if ( function_exists( 'supersideme_has_content' ) && supersideme_has_content() ) { | |
return; | |
} | |
add_action( 'genesis_header', 'genesis_do_nav', 12 ); | |
add_action( 'genesis_header', 'genesis_do_subnav', 5 ); | |
add_action( 'genesis_footer', 'rainmaker_footer_menu', 7 ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Altitude Pro Full Width SuperSide Me Tweaks | |
--------------------------------------------------------- */ | |
.site-header .wrap { | |
position: relative; | |
} | |
.site-header.dark .slide-nav-link { | |
margin: 0; | |
} | |
.slide-nav-link { | |
margin: 12px 0; | |
} | |
.menu-close:hover { | |
border: none; | |
} | |
@media only screen and (max-width: 1023px) { | |
.slide-nav-link { | |
margin: 2px 0; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment