Better search area, slideshow php, blocks php.
authorLaury GvR <laury@gaslightmedia.com>
Fri, 13 Mar 2015 20:11:13 +0000 (16:11 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 13 Mar 2015 20:11:13 +0000 (16:11 -0400)
root/assets/logo.png [new file with mode: 0644]
root/functions.php
root/header.php
root/parts/slide-show.php
root/scss/_structure.scss
root/search.php [new file with mode: 0644]

diff --git a/root/assets/logo.png b/root/assets/logo.png
new file mode 100644 (file)
index 0000000..2779936
Binary files /dev/null and b/root/assets/logo.png differ
index 4849bc0..a0cab5a 100644 (file)
@@ -132,7 +132,7 @@ function glm_site_scripts()
 
 
 /* Header for posts*/
-function GLM_get_header() {
+function glm_get_header() {
     echo '<div';
 
     if (has_post_thumbnail()) {
index 59d8064..b8ab732 100644 (file)
                 <div class="shadow-wrapper">
                     <header>
                         <div class="row">
-                            <div class="medium-4 columns show-for-medium-only">
+                            <div class="small-12 small-centered medium-4 medium-uncentered columns">
                                 <a href="#"><img src="<?php echo get_template_directory_uri(); ?>/assets/logo.png"></a>
                             </div>
-                            <div class="small-12 columns show-for-small-down text-center">
-                                <a href="#"><img src="<?php echo get_template_directory_uri(); ?>/assets/logo.png"></a>
-                            </div>
-                            <div class="medium-6 large-5 columns show-for-medium-up">
-                                <input  class="right show-for-large-up" type="search" placeholder="Search"><a id="magnifying-glass" class="show-for-large-up" href="#"></a>
+                            <div class="medium-6 large-3 columns show-for-medium-up">
+                                <div id="top_search" style="margin-top:50px">
+                                    <form role="search" method="get" id="searchform" action="<?php echo home_url('/'); ?>">
+                                         <input class="search-input" type="text" placeholder="Search" value="" name="s" id="lar-search">
+                                         <input class="search-button" type="image" 
+                                            src="<?php bloginfo('template_url'); ?>/assets/search_button.png" 
+                                            value="submit" form="searchform" name="searchButton">
+                                    </form>
+                                </div>
                             </div>
                         </div>
                         <div class="row">
index f4ff144..e566daa 100644 (file)
@@ -1,6 +1,6 @@
-<div id="slideshow">
-    <?php if (is_front_page()) {
-        echo do_shortcode("[metaslider id=27]");
-    }
-    ?>
-</div>
+<?php if (is_front_page()) {
+    echo '<div id="slideshow">';
+    echo do_shortcode("[metaslider id=27]");
+    echo '</div>';
+}
+?>
index 70d29cc..bbaf06b 100644 (file)
@@ -11,7 +11,7 @@
 //@font-face {
 //    font-family: "Rage Italic";
 //    src: url('assets/Rage Italic.ttf') format ('truetype'); 
-//}
+//
 body {
     background: #e6e7e9;
     #page-wrapper {
@@ -23,6 +23,7 @@ body {
             padding-top: rem-calc(20);
             header {
                 a {
+                    position: relative;
                     margin: 0 .643rem;
                     img {
                         padding-bottom: rem-calc(20);
@@ -38,16 +39,48 @@ body {
                         padding: 0 rem-calc(10);
                         font-size: rem-calc(15);
                     }
-                    &#magnifying-glass {
-                        font-size: 10em; /* This controls the size. */ 
+                    
+                }
+                #top_search {
+                    position: relative;
+                    float: right;
+                    width: 100%;
+                    max-width: 12rem;
+                    #searchform {
+                        position: relative;
+                    }
+                    a {
+                        margin: 0;
+                        position: absolute;
+                        right: rem-calc(2);
+                        top: rem-calc(12);
+                        width: rem-calc(20);
+                        height: rem-calc(20);
+                        padding: 1px;
+                    }
+                    .search-button {
+                        width: 17px;
+                        height: 17px;
+                        background-image: url("../assets/search_button.png");
+                        background-size: cover;
+                        background-repeat: no-repeat;
+                        display: block;
+                        position: absolute;
+                        right: 3px;
+                        top: 3px;
+                    }
+                }
+                    
+/*                #magnifying-glass {
+                        font-size: 10em;  This controls the size.  
                         display: inline-block; 
                         width: rem-calc(10); 
                         height: rem-calc(10);
                         border: rem-calc(2) solid $black; 
-                        position: relative; 
+                        position: absolute; 
                         border-radius: 0.35em;
-                        bottom: rem-calc(-15);
-                        right: rem-calc(-355);
+                        top: rem-calc(2);
+                        right: rem-calc(8);
                         &:before {
                             content: ""; 
                             display: inline-block; 
@@ -63,10 +96,9 @@ body {
                             -ms-transform: rotate(45deg);
                             transform: rotate(45deg);
                         }
-                    }
-                }
-                input {
-                    width: rem-calc(163);
+                    }*/
+                .search-input {
+                    width: 100%;
                     border: 2px solid #b2b3b6;
                     border-radius: 3px;
                     padding: 0 5px;
@@ -75,7 +107,7 @@ body {
                     margin: rem-calc(10) 0 1rem;
                 }
                 .top-bar {
-                    @include gradient(#1999ce, #107098);
+                    @include gradient(blue, red);
                     margin-top: rem-calc(10);
                     .top-bar-section {
                         background: transparent;
@@ -172,7 +204,7 @@ body {
                         font-style: italic;
                         font-size: rem-calc(36);
                     }
-                    .glm_blocks {
+                    .blocks {
                         margin-bottom: rem-calc(45);
                         img {
                             border: 5px solid $green;
diff --git a/root/search.php b/root/search.php
new file mode 100644 (file)
index 0000000..a5be70c
--- /dev/null
@@ -0,0 +1,38 @@
+<?php get_header(); ?>
+    <div id="search_results_over">
+        <h2 class="search-result-header">Search Results for "<?php echo get_search_query(); ?>"</h2><br>
+        <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
+        <div class="" id="search_results_container" style="max-width:1000px;">
+            <div class="row">
+                <div class="small-12 columns">
+
+                    <article id="<?php the_ID()?>" <?php post_class()?>>
+                        <h5 class="">Page: <a href="<?php the_permalink(); ?>"><?php the_title();?></a></h5>
+                        <?php //echo the_advanced_excerpt('length=30&length_type=words&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,strong,b,hr,br,div;'); ?>
+                        <?php the_excerpt(); ?>
+                        <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+
+                            <?php $post_categories = wp_get_post_categories( get_the_ID() );
+                            $cats = array();
+
+                            ?>
+
+                        </footer>
+                    </article>
+                </div>
+            </div>
+        </div>
+        <?php endwhile; ?>
+        <?php if ( function_exists('FoundationPress_pagination') ) { FoundationPress_pagination(); } else if ( is_paged() ) { ?>
+               <nav id="post-nav">
+                       <div class="post-previous"><?php next_posts_link( __( '&larr; Older results', 'FoundationPress' ) ); ?></div>
+                       <div class="post-next"><?php previous_posts_link( __( 'Newer results &rarr;', 'FoundationPress' ) ); ?></div>
+               </nav>
+       <?php } ?>
+        <?php else: ?>
+        <div id="post-404" class="noposts">
+                <p><?php _e('Sorry, no results were found.');?></p>
+        </div><!-- /#post-404 -->
+        <?php endif;?>
+    </div>
+<?php get_footer(); ?>