centered topbar nav, added blocks for landing page grid
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 8 Aug 2016 12:57:26 +0000 (08:57 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 8 Aug 2016 12:57:26 +0000 (08:57 -0400)
css/app.css
functions.php
header.php
landing-page.php [new file with mode: 0644]
parts/glm-blocks.php
parts/reservation-form-main.php
scss/_main.scss

index f60a36b..38f6aad 100644 (file)
@@ -6482,13 +6482,13 @@ main.page-front #main-content {
     padding-bottom: 0; } }
 main.page-inside #page-title {
   background: #73bf45;
-  height: 115px; }
+  height: 80px; }
   main.page-inside #page-title h1 {
     font-size: 2.5rem;
     text-transform: uppercase;
     font-weight: bold;
     color: #FFFFFF;
-    margin-top: 30px; }
+    margin-top: 10px; }
 main.page-inside #main-content {
   padding-top: 77px; }
 
index 000db66..915ff4f 100644 (file)
@@ -33,6 +33,36 @@ if (!function_exists('glm_hubspot_widget_init')) {
 
 }
 
+// add shortcode for the landing page blocks
+function landing_page_blocks( $atts )
+{
+    $out = '';
+    extract(shortcode_atts(
+        array('category' => '-1'), $atts, 'glm-blocks')
+    );
+    if(function_exists('fetch_all_glm_blocks')):
+        $category = filter_var($atts['category'], FILTER_VALIDATE_INT);
+        $blocks = fetch_all_glm_blocks($category);
+        $out .= '<ul id="quick-sub_pages" class="small-block-grid-1 medium-block-grid-3">';
+        foreach ($blocks as $block):
+            $post_image_id = get_post_thumbnail_id($block->ID);
+            $thumbnail = wp_get_attachment_image_src( $post_image_id, 'landing_page');
+            $out .= '<li class="small-text-center medium-text-left landing-item">';
+            if($block->url):
+                $out .= '<a href="'.$block->url.'"'.(($block->externalUrl)? ' target="_blank"':'').'>';
+            endif;
+            $out .= '<img src="'.$thumbnail[0].'"/>';
+            $out .= '<h5>'.$block->post_title.'</h5>';
+            if($block->url):
+                $out .= '</a>';
+            endif;
+            $out .= '</li>';
+        endforeach;
+        $out .= '</ul>';
+    endif;
+    return $out;
+}
+add_shortcode('glm-blocks', 'landing_page_blocks');
 
 /**
  * Return the client info option for the given key
index 5e29941..68cbfe1 100644 (file)
                             </div>
                         </div>
                         <div class="row large-collapse">
-                            <div id="nav-off" class="small-12 large-10 columns">
+                            <div id="nav-off" class="small-12 large-9 columns">
                        
                                 <?php get_template_part('parts/top-bar');?>
                             </div>
-                            <div class="large-2 columns show-for-large-up book-btn">
+                            <div class="large-3 columns show-for-large-up book-btn">
                                 <div class="row large-collapse">
                                     <?php get_template_part ('parts/reservation-form-main');?>
                                 </div>
diff --git a/landing-page.php b/landing-page.php
new file mode 100644 (file)
index 0000000..c047f9e
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/*
+Template Name: Landing Page
+*/
+?>
+<?php get_header(); ?>
+<main class="page-inside">
+    <div class="feature-img">
+        <?php echo glm_get_header(); ?>
+    </div>
+    <div id="content-wrapper">
+        <div class="row">
+            <div id="main-content" class="small-12 columns">
+            <?php if ( !isset( $_REQUEST['glm_action'] ) ) : ?>
+                <?php get_template_part('parts/content-section'); ?>
+            <?php endif;?>
+            </div>
+        </div>
+        <div class="row">
+
+        <?php //the_block( 'member_block', array(
+           // 'label' => __('Member Short Code', 'text-domain'),
+          //  'type'  => 'one-liner'
+        //) ); ?>
+        </div>
+        <div class="row collapse">
+            <div class="small-12 medium-4 columns small-text-center action-item">
+                <a href="<?php echo get_permalink(3323); ?> "><img src="<?php bloginfo('template_url'); ?>/assets/request-guides.jpg"></a>
+            </div>
+            <div class="small-12 medium-4 columns small-text-center action-item">
+                <a href="<?php echo get_permalink(3309); ?> "><img src="<?php bloginfo('template_url'); ?>/assets/269-cool-things.jpg"></a>
+            </div>
+            <div class="small-12 medium-4 columns small-text-center action-item">
+                <a href="<?php echo get_permalink(3327); ?> "><img src="<?php bloginfo('template_url'); ?>/assets/email-signup.jpg"></a>
+            </div>
+        </div>
+    </div>
+<?php get_footer(); ?>
index ab37c72..514a3ac 100644 (file)
@@ -1,5 +1,5 @@
 <?php if(function_exists('fetch_all_glm_blocks')):?>
-<?php $blocks = fetch_all_glm_blocks();?>
+<?php $blocks = fetch_all_glm_blocks(1205);?>
 <div class="blocks row collapse glm-blocks-container">
     <?php foreach ($blocks as $block):?>
     <div class="small-12 medium-4 large-3 columns text-left blocks glm-block">
index 1e81dd6..27246a3 100644 (file)
@@ -1,4 +1,4 @@
-        <div id="bookit" class="small-9 columns text-center left">
+        <div id="bookit" class="small-6 columns text-center left">
             <li><a href="#">Book A Room</a>
 
             </li>
index 4d911ae..6a10f91 100644 (file)
@@ -26,13 +26,13 @@ main.page-inside {
     
     #page-title {
         background: $green;
-        height: 115px;
+        height: 80px;
         h1 {
             font-size: rem-calc(40);
             text-transform: uppercase;
             font-weight: bold;
             color: $white;
-            margin-top: 30px;
+            margin-top: 10px;
         }
     }
     #main-content {