Skip to content

Commit

Permalink
Updated and designed search.php template
Browse files Browse the repository at this point in the history
  • Loading branch information
zackmitchell committed Apr 24, 2018
1 parent 34647eb commit f58d335
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 106 deletions.
6 changes: 4 additions & 2 deletions assets/css/buildr.css
Original file line number Diff line number Diff line change
Expand Up @@ -1366,12 +1366,14 @@ section.error-404 {
}

.error-404 .page-header,
body.archive .page-header {
body.archive .page-header,
body.search .page-header {
margin: 0;
border: none;
}

body.archive .page-header {
body.archive .page-header,
body.search .page-header {
margin: 50px 0 30px;
}

Expand Down
74 changes: 0 additions & 74 deletions assets/css/util.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,80 +77,6 @@ h6 { font-size: 1em; }
vertical-align: bottom;
}

/* ----- FORMS ----- */

/*form {
padding-top: 30px;
}*/

/*form input[type="text"],
form textarea {
width: 100% !important;
border-radius: 0;
border: none;
border-bottom: thin solid #e4e4e4;
font-size: 16px !important;
font-family: "Open Sans" !important;
font-weight: 400;
color: rgba(0,0,0,0.54);
background: none;
border-radius: 3px 3px 0 0;
position: relative;
z-index: 9;
padding: 5px;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
form .group {
position: relative;
margin: 30px 0 50px 0;
}
form .group > label {
position: absolute;
top: 10px;
left: 10px;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
font-weight: 500;
text-transform: uppercase;
letter-spacing: .125em;
z-index: 1;
font-family: Montserrat;
letter-spacing: .5em;
font-size: 10px;
}
form input[type="submit"] {
height: 40px;
line-height: 40px;
margin-top: 15px;
font-size: 18px;
margin: 15px 0 0 auto;
display: block;
padding: 0 40px;
}
form label.focused-material {
top: -20px;
left: 5px;
font-size: 8px;
line-height: normal;
}
form input.focused-material,
form textarea.focused-material {
background: #f4f4f4;
}
form .mail-sent,
form .mail-not-sent {
display: none;
}*/

/* ----- FLEXBOX ----- */

.flxbx {
Expand Down
120 changes: 90 additions & 30 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,105 @@
* @package Buildr
*/

get_header(); ?>
get_header();
?>

<section id="primary" class="content-area">
<main id="main" class="site-main">
<div id="primary" class="content-area">

<main id="main" class="site-main">

<?php
if ( have_posts() ) : ?>
<div class="padded-content-wrap">

<?php if ( have_posts() ) : ?>

<header class="page-header">
<h1 class="page-title"><?php
/* translators: %s: search query. */
printf( esc_html__( 'Search Results for: %s', 'buildr' ), '<span>' . get_search_query() . '</span>' );
?></h1>
</header><!-- .page-header -->
<div class="container">

<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
<div class="row">

/**
* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called content-search.php and that will be used instead.
*/
get_template_part( 'template-parts/content', 'search' );
<div class="col-sm-12">

endwhile;
<header class="page-header">
<h1 class="page-title">
<?php printf( esc_html__( 'Search Results for: %s', 'buildr' ), '<span>' . get_search_query() . '</span>' ); ?>
</h1>
</header><!-- .page-header -->

the_posts_navigation();
</div>

else :
</div>

get_template_part( 'template-parts/content', 'none' );
</div>

endif; ?>
<?php
switch ( get_theme_mod( BUILDR_OPTIONS::BLOG_LAYOUT_STYLE, BUILDR_DEFAULTS::BLOG_LAYOUT_STYLE ) ) :

</main><!-- #main -->
</section><!-- #primary -->
case 'blog_masonry' :
do_action( 'buildr_blog_masonry_wrap_open');
break;

<?php
get_sidebar();
get_footer();
case 'blog_mosaic' :
do_action( 'buildr_blog_mosaic_wrap_open');
break;

default :
do_action( 'buildr_blog_standard_wrap_open');

endswitch;
?>

<?php
/* Start the Loop */
while ( have_posts() ) : the_post();

/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_theme_mod( BUILDR_OPTIONS::BLOG_LAYOUT_STYLE, BUILDR_DEFAULTS::BLOG_LAYOUT_STYLE ) );

endwhile;
?>

<?php
switch ( get_theme_mod( BUILDR_OPTIONS::BLOG_LAYOUT_STYLE, BUILDR_DEFAULTS::BLOG_LAYOUT_STYLE ) ) :

case 'blog_masonry' :
do_action( 'buildr_blog_masonry_wrap_close');
break;

case 'blog_mosaic' :
do_action( 'buildr_blog_mosaic_wrap_close');
break;

default :
do_action( 'buildr_blog_standard_wrap_close');

endswitch;
?>

<?php else : ?>

<div class="container">

<div class="row">

<div class="col-sm-12">

<?php get_template_part( 'template-parts/content', 'none' ); ?>

</div>

</div>

</div>

<?php endif; ?>

</div>

</main><!-- #main -->

</div><!-- #primary -->

<?php get_footer();

0 comments on commit f58d335

Please sign in to comment.