added off canvas menu for toplinks topbar
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 28 Jan 2016 15:10:13 +0000 (10:10 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 28 Jan 2016 15:10:13 +0000 (10:10 -0500)
css/app.css
js/app.js
js/custom/pageSetup.js
lib/navigation.php
parts/off-canvas-menu.php
scss/_topbar.scss

index 40927ef..855e3e1 100644 (file)
@@ -6621,9 +6621,13 @@ header {
 #headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown {
   margin-left: 5px; }
 
-#headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown > li > a {
+#headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown {
   width: 55%; }
 
+#headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown > li > a {
+  width: 55%;
+  text-align: center; }
+
 .top-bar-section li:not(.has-form) a:not(.button) {
   background: none; }
 
index 03c81f3..f57d3fe 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -217,5 +217,7 @@ var extraDay, end, arrival, currentDate, currentDate2, requiredDate, requiredDat
     $($topMenu).each(function () {
        $(this).removeClass("active") ;
     });
+    
+    $("#menu-menu-4").children("li").children("a.toggle").attr("href", "javascript:void(0)");
  
 });
index 9598402..d09d402 100644 (file)
@@ -208,5 +208,7 @@ var extraDay, end, arrival, currentDate, currentDate2, requiredDate, requiredDat
     $($topMenu).each(function () {
        $(this).removeClass("active") ;
     });
+    
+    $("#menu-menu-4").children("li").children("a.toggle").attr("href", "javascript:void(0)");
  
 });
index 5ef3452..2308037 100644 (file)
@@ -51,7 +51,26 @@ if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) {
         echo '</ul></div>';
     }
 }
-
+if ( ! function_exists( 'glm_topLinks_mobile_off_canvas' ) ) {
+    function glm_topLinks_mobile_off_canvas() {
+        echo '<div class="left-off-canvas-list">';
+        wp_nav_menu(array(
+            'container' => false,                           // remove nav container
+            'container_class' => '',                        // class of container
+            'menu' => '',                                   // menu name
+            'menu_class' => 'off-canvas-list',              // adding custom nav class
+            'theme_location' => 'header-bar',        // where it's located in the theme
+            'before' => '',                                 // before each link <a>
+            'after' => '',                                  // after each link </a>
+            'link_before' => '',                            // before each link text
+            'link_after' => '',                             // after each link text
+            'depth' => 5,                                   // limit the depth of the nav
+            'fallback_cb' => false,                         // fallback function (see below)
+            'walker' => new Glm_Theme_Off_Canvas_Walker()
+        ));
+        echo '</ul></div>';
+    }
+}
 /**
  * Footer
  */
index 68230b1..7bf355f 100644 (file)
         <li><a class="insta" target="_blank" href="https://www.instagram.com/visitthesault/"></a></li>
         <li><span id="offShareLeft" class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span></li>
     </ul>
+<!--
     <ul>
         <li><a href="<?php bloginfo('url'); ?>/contact-us/">Contact</a></li>
         <li><a href="<?php bloginfo('url'); ?>/media/">Media</a></li>
         <li><a href="<?php bloginfo('url'); ?>">Group & Conferences</a></li>
     </ul>
+-->
+   <?php glm_topLinks_mobile_off_canvas(); ?>
     <?php get_template_part('parts/client-info-offcanvas');?>
 </aside>
 
index 46dc6c0..d21aecf 100644 (file)
 #headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown{
     margin-left: 5px; 
 }
-
+#headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown{
+    width: 55%;
+}
 #headerLinks > ul#menu-top-menu > li.menu-item > ul.dropdown > li > a{
     width: 55%;
+    text-align: center;
 }
 
 .top-bar-section li:not(.has-form) a:not(.button){