Set up Blocks
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 16 Mar 2015 13:22:13 +0000 (09:22 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 16 Mar 2015 13:22:13 +0000 (09:22 -0400)
front-page.php
functions.php
header.php
page.php
scss/_structure.scss
sidebar.php

index 000d374..da0a450 100644 (file)
@@ -1,36 +1,46 @@
 <?php get_header(); ?>
                     <div class="main">
-                        <div class="row">    
+                        <div class="row">
                             <div id="slideshow">
                                 <?php if (is_front_page()) {
-                                    echo do_shortcode("[metaslider id=27]");
+                                    echo do_shortcode("[metaslider id=19]");
                                 }
                                 ?>
                             </div>
                         </div>
-                        <div id="content-wrapper">    
+                        <div id="content-wrapper">
                             <div class="row">
                                 <div class="small-12 columns text-center">
                                     <h1 id="Emer">If this is an emergency, please call 9-1-1</h1>
                                 </div>
                             </div>
-                             <div class="row">
-                                <?php if(function_exists('bcn_display') && !is_front_page())
-                                {
-                                    echo "<div class=\"breadcrumbs\">";
-                                    bcn_display();
-                                    echo "</div>";
-                                    echo '<div class="separator"><hr></div>';
-                                } else if (is_front_page()) {
-
-                                    if (function_exists('glm_blocks_show')) {
-                                        echo '<div class="blocks">';                        
-                                        glm_blocks_show();
-                                        echo '</div>';
-                                        echo '<div class="separator"><hr></div>';
-                                    }
-                                }
-                                ?>
+                                <div class="row">
+                                    <?php if(function_exists('fetch_all_glm_blocks')):?>
+                                    <?php $blocks = fetch_all_glm_blocks();?>
+                                    <div class="blocks">
+                                        <?php foreach ($blocks as $block):?>
+                                        <div class="text-center small-12 large-4 columns large-text-left blocks">
+                                                <?php if($block->url):?>
+                                                <a href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+                                                <?php endif;?>
+                                                <?php echo $block->thumbnail;?>
+                                                <?php if($block->url):?>
+                                                </a>
+                                                <?php endif;?>
+                                                <?php if($block->url):?>
+                                                <a class="title-posts" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+                                                <?php endif;?>
+                                                    <h1><?php echo $block->post_title;?></h1>
+                                                <?php if($block->url):?>
+                                                </a>
+                                                 <?php endif;?>
+                                            <p><?php echo $block->post_excerpt;?></p>
+                                            <a href="<?php echo $block->url;?>">Read More...</a>
+                                        </div>
+                                        <?php endforeach;?>
+                                    </div>
+                                    <div class="separator"><hr></div>
+                                    <?php endif;?>
                             </div>
                             <div class="row">
                                 <div id="main-content" class="small-12 medium-6 large-8 columns">
@@ -45,4 +55,4 @@
                                 </div>
                             </div>
                         </div>
-<?php get_footer(); ?>
\ No newline at end of file
+<?php get_footer(); ?>
index 4849bc0..2dda100 100644 (file)
@@ -54,7 +54,7 @@ function glm_page_menu($parent = 0, $class = '')
         'post_type'   => 'page',
         'parent'      => $parent,
         'number'      => '',
-        'exclude'     => $frontPageId,
+        'exclude'     => '',
         'post_status' => 'publish',
         'sort_order'  => 'asc',
         'sort_column' => 'menu_order'
@@ -72,7 +72,13 @@ function glm_page_menu($parent = 0, $class = '')
             echo glm_page_menu($page->ID, 'sub-menu dropdown');
             echo '</li>'."\n";
         } else {
-            echo '<li><a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a></li>'."\n";
+            echo '<li';
+            if ($page->ID == $frontPageId) {
+                echo ' id="logo"';
+            }
+            echo '><a href="'.get_permalink($page->ID).'">';
+            echo ($page->ID == $frontPageId) ? '<img src="'.get_bloginfo('template_url').'/assets/logo.png">': $page->post_title;
+            echo '</a></li>'."\n";
         }
     }
     echo '</ul><!-- end -->'."\n";
index f7f406c..2d5219d 100644 (file)
@@ -4,15 +4,15 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title><?php wp_title(); ?></title>
-    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css">
     <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
     <link href='http://fonts.googleapis.com/css?family=Crimson+Text:600italic' rel='stylesheet' type='text/css'>
     <?php wp_head(); ?>
+    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css">
   </head>
   <body>
       <div class="off-canvas-wrap" data-offcanvas>
         <div class="inner-wrap">
-            <div id="page-wrapper">    
+            <div id="page-wrapper">
                 <div class="shadow-wrapper">
                     <header>
                         <div class="row">
@@ -41,6 +41,6 @@
                             </nav>
                         </div>
                         <aside class="left-off-canvas-menu hide-for-large-up">
-                            <?php glm_page_menu(); ?>
+                            <?php glm_offcanvas_menu(); ?>
                         </aside>
                     </header>
index f7b5bef..0779da9 100644 (file)
--- a/page.php
+++ b/page.php
@@ -1,29 +1,19 @@
 <?php get_header(); ?>
-                                
-                <div class="main">    
-                    <div id="content-wrapper">    
+
+                <div class="main">
+                    <div id="content-wrapper">
                         <div class="row">
                             <div class="small-12 columns text-center">
                                 <h1 id="Emer">If this is an emergency, please call 9-1-1</h1>
                             </div>
                         </div>
                          <div class="row">
-                                <?php if(function_exists('bcn_display') && !is_front_page())
-                                {
-                                    echo "<div class=\"breadcrumbs\">";
-                                    bcn_display();
-                                    echo "</div>";
-                                    echo '<div class="separator"><hr></div>';
-                                } else if (is_front_page()) {
-
-                                    if (function_exists('glm_blocks_show')) {
-                                        echo '<div class="blocks">';                        
-                                        glm_blocks_show();
-                                        echo '</div>';
-                                        echo '<div class="separator"><hr></div>';
-                                    }
-                                }
-                                ?>
+                            <?php
+                                echo "<div class=\"breadcrumbs\">";
+                                bcn_display();
+                                echo "</div>";
+                                echo '<div class="separator"><hr></div>';
+                            ?>
                          </div>
                          <div class="row">
                             <div id="main-content" class="small-12 medium-6 large-8 columns">
index 69deb84..369664e 100644 (file)
@@ -94,6 +94,8 @@ body {
                                     margin: 0;
                                 }
                                 &#logo {
+                                    z-index: 999;
+                                    position: relative;
                                     &:hover {
                                         background: transparent;
                                     }
@@ -152,11 +154,16 @@ body {
                 #slideshow {
                     border-bottom: 3px solid #0e688d;
                     .nivo-caption {
-                        float: right;
-                        font-size: rem-calc(12);
+                        bottom: 10px;
+                        right: 0;
+                        left: auto;
+                        width: 400px;
+                        color: black;
+                        text-align: right;
+                        font-size: rem-calc(14);
                         @include gradient2 ($white, transparent);
                         margin-top: -60px;
-                        padding: 10px 0;
+                        padding: 10px 20px 10px 0;
                         p {
                             float: right;
                             margin-bottom: 0;
@@ -337,4 +344,4 @@ body {
             }
         }
     }
-}
\ No newline at end of file
+}
index 8100f45..d17d3d9 100644 (file)
@@ -1,3 +1,3 @@
 <?php if (is_active_sidebar('sidebar-r')) :?>
-                            <?php dynamic_sidebar('sidebar-r');?>
-                        <?php endif;?>
\ No newline at end of file
+    <?php dynamic_sidebar('sidebar-r');?>
+<?php endif;?>
\ No newline at end of file