This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
andrewmbacon
committed
Jun 29, 2015
1 parent
0d18951
commit ece733c
Showing
5 changed files
with
223 additions
and
221 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,102 @@ | ||
<!-- CSS code from Bootply.com editor --> | ||
<style type="text/css"> | ||
.marginBottom-0 { | ||
margin-bottom: 0; | ||
} | ||
.dropdown-submenu { | ||
position: relative; | ||
} | ||
.dropdown-submenu>.dropdown-menu { | ||
top: 0; | ||
left: 100%; | ||
margin-top: -6px; | ||
margin-left: -1px; | ||
-webkit-border-radius: 0 6px 6px 6px; | ||
-moz-border-radius: 0 6px 6px 6px; | ||
border-radius: 0 6px 6px 6px; | ||
} | ||
.dropdown-submenu>a:after { | ||
display: block; | ||
content: " "; | ||
float: right; | ||
width: 0; | ||
height: 0; | ||
border-color: transparent; | ||
border-style: solid; | ||
border-width: 5px 0 5px 5px; | ||
border-left-color: #cccccc; | ||
margin-top: 5px; | ||
margin-right: -10px; | ||
} | ||
.dropdown-submenu:hover>a:after { | ||
border-left-color: #555; | ||
} | ||
.dropdown-submenu.pull-left { | ||
float: none; | ||
} | ||
.dropdown-submenu.pull-left>.dropdown-menu { | ||
left: -100%; | ||
margin-left: 10px; | ||
-webkit-border-radius: 6px 0 6px 6px; | ||
-moz-border-radius: 6px 0 6px 6px; | ||
border-radius: 6px 0 6px 6px; | ||
} | ||
</style> | ||
|
||
<nav class="navbar navbar-default" role="navigation"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> | ||
</div> | ||
<div class="collapse navbar-collapse" id="navbar-collapse-1"> | ||
<?php | ||
$locations = get_nav_menu_locations(); | ||
$menu_at_primary_location = $locations['primary']; | ||
$items = wp_get_nav_menu_items( $menu_at_primary_location ); | ||
if(empty($items)){ | ||
echo '<ul class="nav navbar-nav"><li><a href="'.home_url().'">Home</a></li></ul>'; | ||
} else { | ||
$menu = wp_nav_menu( | ||
array( | ||
'menu_class' => 'nav navbar-nav', | ||
'theme_location' => 'primary', /* where in the theme it's assigned */ | ||
'container' => false, /* container class */ | ||
'fallback_cb' => 'hale_main_nav_fallback', | ||
'items_wrap' => '<ul class="%2$s"><li><a href="'.home_url().'">Home</a></li>%3$s</ul>', | ||
'walker' => new Drop_Multi_Nav_Walker()/*, | ||
'with_search' => true*/ | ||
) | ||
); | ||
} | ||
?> | ||
</div> | ||
<!-- /.navbar-collapse --> | ||
|
||
</nav> | ||
|
||
|
||
<!-- JavaScript jQuery code from Bootply.com editor --> | ||
|
||
<script type='text/javascript'> | ||
|
||
(function($){ | ||
|
||
$(document).ready(function(){ | ||
|
||
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { | ||
|
||
event.preventDefault(); | ||
|
||
event.stopPropagation(); | ||
|
||
$(this).parent().siblings().removeClass('open'); | ||
|
||
$(this).parent().toggleClass('open'); | ||
|
||
}); | ||
|
||
}); | ||
|
||
})(jQuery); | ||
|
||
</script> | ||
<!-- CSS code from Bootply.com editor --> | ||
<style type="text/css"> | ||
.marginBottom-0 { | ||
margin-bottom: 0; | ||
} | ||
.dropdown-submenu { | ||
position: relative; | ||
} | ||
.dropdown-submenu>.dropdown-menu { | ||
top: 0; | ||
left: 100%; | ||
margin-top: -6px; | ||
margin-left: -1px; | ||
-webkit-border-radius: 0 6px 6px 6px; | ||
-moz-border-radius: 0 6px 6px 6px; | ||
border-radius: 0 6px 6px 6px; | ||
} | ||
.dropdown-submenu>a:after { | ||
display: block; | ||
content: " "; | ||
float: right; | ||
width: 0; | ||
height: 0; | ||
border-color: transparent; | ||
border-style: solid; | ||
border-width: 5px 0 5px 5px; | ||
border-left-color: #cccccc; | ||
margin-top: 5px; | ||
margin-right: -10px; | ||
} | ||
.dropdown-submenu:hover>a:after { | ||
border-left-color: #555; | ||
} | ||
.dropdown-submenu.pull-left { | ||
float: none; | ||
} | ||
.dropdown-submenu.pull-left>.dropdown-menu { | ||
left: -100%; | ||
margin-left: 10px; | ||
-webkit-border-radius: 6px 0 6px 6px; | ||
-moz-border-radius: 6px 0 6px 6px; | ||
border-radius: 6px 0 6px 6px; | ||
} | ||
</style> | ||
|
||
|
||
<nav class="navbar navbar-default" role="navigation"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> | ||
</div> | ||
<div class="collapse navbar-collapse" id="navbar-collapse-1"> | ||
<?php | ||
$locations = get_nav_menu_locations(); | ||
$menu_at_primary_location = $locations['primary']; | ||
$items = wp_get_nav_menu_items( $menu_at_primary_location ); | ||
if(empty($items)){ | ||
echo '<ul class="nav navbar-nav"><li><a href="'.home_url().'">Home</a></li></ul>'; | ||
} else { | ||
$menu = wp_nav_menu( | ||
array( | ||
'menu_class' => 'nav navbar-nav', | ||
'theme_location' => 'primary', /* where in the theme it's assigned */ | ||
'container' => false, /* container class */ | ||
'fallback_cb' => 'hale_main_nav_fallback', | ||
'items_wrap' => '<ul class="%2$s"><li><a href="'.home_url().'">Home</a></li>%3$s</ul>', | ||
'walker' => new Drop_Multi_Nav_Walker()/*, | ||
'with_search' => true*/ | ||
) | ||
); | ||
} | ||
?> | ||
</div> | ||
|
||
|
||
</nav> | ||
|
||
|
||
<!-- JavaScript jQuery code from Bootply.com editor --> | ||
|
||
<script type='text/javascript'> | ||
|
||
(function($){ | ||
|
||
$(document).ready(function(){ | ||
|
||
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { | ||
|
||
event.preventDefault(); | ||
|
||
event.stopPropagation(); | ||
|
||
$(this).parent().siblings().removeClass('open'); | ||
|
||
$(this).parent().toggleClass('open'); | ||
|
||
}); | ||
|
||
}); | ||
|
||
})(jQuery); | ||
|
||
</script> |
Oops, something went wrong.