adjusting blog style
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 4 Jan 2016 14:18:42 +0000 (09:18 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 4 Jan 2016 14:18:42 +0000 (09:18 -0500)
functions.php
home.php
parts/head-image.php [new file with mode: 0644]

index e26d176..1f16437 100644 (file)
@@ -70,25 +70,40 @@ function glm_site_scripts()
 
 }
 
-
-/* Header for posts*/
 function glm_get_header() {
     echo '<div';
+    if ( get_post_type( get_the_ID() ) == 'page' && has_post_thumbnail() ) {
+        $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+        echo ' id="feature-image" style="background-image: url('.$image_data[0].');height:100%;padding:0;background-position:top center;background-size:cover;background-repeat:no-repeat;min-height: 270px;max-height: 630px;"';
 
-    if (has_post_thumbnail()) {
-            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-            echo ' style="background-image: url('.$image_data[0].');height:350px;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat; "';
     } else {
-            echo ' style="background-image: url('.get_template_directory_uri().'/assets/government.jpg);background-size: 100%;background-repeat:no-repeat;"';
-            echo ' class="no-featured"';
+        echo ' id="feature-image" style="background-image: url('.get_template_directory_uri().'/assets/government.jpg);height:100%;padding:0;background-position:top center;background-size:cover;background-repeat:no-repeat;min-height: 270px;max-height: 630px;"';
     }
     echo '>';
     echo '</div>';
-//    echo '<div class="row">';
-//    echo '<div class="small-12 columns">';
-//    echo '</div>';
-//    echo '</div>';
+    echo '<div class="row">';
+    echo '<div class="small-12 columns">';
+    echo '</div>';
+    echo '</div>';
 }
+///* Header for posts*/
+//function glm_get_header() {
+//    echo '<div';
+//
+//    if (has_post_thumbnail()) {
+//            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+//            echo ' style="background-image: url('.$image_data[0].');height:350px;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat; "';
+//    } else {
+//            echo ' style="background-image: url('.get_template_directory_uri().'/assets/government.jpg);background-size: 100%;background-repeat:no-repeat;"';
+//            echo ' class="no-featured"';
+//    }
+//    echo '>';
+//    echo '</div>';
+////    echo '<div class="row">';
+////    echo '<div class="small-12 columns">';
+////    echo '</div>';
+////    echo '</div>';
+//}
 
 // // The code below is useful when you want the image to resize to
 //    if (has_post_thumbnail()) {
index 8168dea..d84c65b 100644 (file)
--- a/home.php
+++ b/home.php
@@ -1,10 +1,17 @@
 <?php get_header(); ?>
+<header>
+    <?php get_template_part('parts/head-image');?>
+</header>
 <main class="blog-home">
-<!--    <article <?php // post_class() ?> id="interior-featured">
-        <?php // GLM_get_header(); ?>
-    </article> -->
+<!--
+   <article <?php  //post_class() ?> id="interior-featured">
+        <?php // glm_get_header(); ?>
+    </article> 
+-->
     <div class="row">
+        <?php get_template_part('parts/bread-crumbs'); ?>
         <div id="blog-posts-over" class="small-12 medium-9 columns">
+           <h1> County News</h1>
             <?php if(have_posts()) : while(have_posts()): the_post();?>
             <div class="row content blog-posts-container">
 <!--                <div class="small-11 small-centered columns">-->
diff --git a/parts/head-image.php b/parts/head-image.php
new file mode 100644 (file)
index 0000000..0ae7508
--- /dev/null
@@ -0,0 +1,5 @@
+<div id="head-img">
+    <?php echo glm_get_header(); ?>
+    <div class="gradient"></div>
+    <div class="gradient"></div>
+</div>
\ No newline at end of file