slowly working on layout
authorIan Weller <ian@gaslightmedia.com>
Mon, 13 Mar 2017 18:36:31 +0000 (14:36 -0400)
committerIan Weller <ian@gaslightmedia.com>
Mon, 13 Mar 2017 18:36:31 +0000 (14:36 -0400)
I am slowly working on the layout for the site.  I am mostly working on
the header.

index.php
lib/navigation.php
sections/front-page.php
sections/header.php

index 3f0fbc4..9a07cc9 100644 (file)
--- a/index.php
+++ b/index.php
@@ -7,8 +7,7 @@
             <div class="inner-wrap">
                 <div id="page-wrapper">
                     <?php
-                    include "sections/header.php"; 
-                    include "sections/top-bar.php";
+                    include "sections/header.php";
                     include "sections/off-canvas.php"; 
                     if (is_front_page()) { 
                         include "sections/front-page.php"; 
index f5b5d91..144b2ad 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 
 register_nav_menus(array(
-  'top-bar' => 'Site Navigation'
+  'top-bar' => 'Site Navigation',
+  'header-nav' => 'Second Header Navigation'  
 ));
 
 /**
@@ -19,7 +20,7 @@ if ( ! function_exists( 'glm_theme_top_bar' ) ) {
           'after' => '',                                  // after each link </a>
           'link_before' => '',                            // before each link text
           'link_after' => '',                             // after each link text
-          'depth' => 3,                                   // limit the depth of the nav
+          'depth' => 2,                                   // limit the depth of the nav
           'fallback_cb' => false,                         // fallback function (see below)
           'walker' => new Glm_Theme_Top_Bar_Walker()
       ));
@@ -51,13 +52,34 @@ function glm_get_mobile_nav_menu( $theme_location )
         '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
+        'depth'           => 2,                 // limit the depth of the nav
         'fallback_cb'     => false,             // fallback function (see below)
         'walker'          => new Glm_Theme_Off_Canvas_Walker()
     ));
     return preg_replace( array( '%^<ul[^>]*>%', '%</ul>$%' ), '', $menu );
 }
 
+/**
+ * Header
+ */
+if ( ! function_exists( 'glm_theme_head_nav' ) ) {
+  function glm_theme_head_nav() {
+      wp_nav_menu(array(
+          'container' => false,                           // remove nav container
+          'container_class' => '',                        // class of container
+          'menu' => '',                                   // menu name
+          'menu_class' => '',                             // adding custom nav class
+          'theme_location' => 'header-nav',                   // 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' => 1,                                   // limit the depth of the nav
+          'fallback_cb' => false,                         // fallback function (see below)
+      ));
+  }
+}
+
 /**
  * Footer
  */
index 84d36de..41ce8e9 100644 (file)
@@ -4,9 +4,7 @@
                         </div>
                         <div id="content-wrapper">
                             <div class="row" data-equalizer data-options="equalize_on_stack: false">
-                                <?php
-                                get_template_part('parts/glm-blocks');
-                                ?>
+                                
                             </div>
                             <div class="row">
                                 <?php get_template_part('parts/main-content');?>
index 38be909..e237328 100644 (file)
@@ -1,19 +1,13 @@
 <header class="main">
     <div class="row  medium-uncollapse large-collapse">
-        <div id="logo-tag" class="small-12 text-center medium-12 columns">
-            <?php get_custom_logo($blog_id = 0 );?>
-            <?php the_custom_logo($blog_id = 0 );?>
-            <?php
-            if ( is_front_page() && is_home() ) : ?>
-                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
-            <?php else : ?>
-                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
-            <?php endif;
-            $description = get_bloginfo( 'description', 'display' );
-            if ( $description || is_customize_preview() ) : ?>
-                <h3 class="site-description"><?php echo $description; ?></h3>
-            <?php endif;
-            ?>
+        <div id="logo-tag" class="small-12 text-center medium-3 columns">
+            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="<?php bloginfo('template_url');?>/assets/brewbakers-logo.png"></a>
+        </div>
+        <div class="medium-9 columns show-for-medium-up">
+            <div class="right">
+                <?php glm_theme_head_nav(); ?>
+            </div>
+            <?php include "sections/top-bar.php";?>
         </div>
     </div>
 </header>
\ No newline at end of file