<?php
/**
 * The template for displaying Search Results pages.
 *
 * @package The Columnist
 * @since The Columnist 1.0
 */

get_header(); ?>

		<section id="primary" class="site-content">
			<div id="left-col">
				<header id="masthead" class="site-header" role="banner">
					<a class="thumbnail" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
						<?php $header_image = get_header_image(); ?>
						<?php if ( ! empty( $header_image ) ) : ?>
							<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
						<?php endif; ?>
					</a>
					<hgroup class="single-title">
						<?php
						if ( have_posts() ) :
							printf( __( '<h1>Search Results</h1><h2 class="single-description">Results for: <em>%s</em></h2>', 'the_columnist' ), '<span>' . get_search_query() . '</span>' );
						else :
							printf( __( '<h1>No Results</h1><h2 class="single-description">No Results for: <em>%s</em></h2>', 'the_columnist' ), '<span>' . get_search_query() . '</span>' );
						endif;
						?>
					</hgroup><!-- end .single-title -->
				</header>
			</div>

			<div id="content" role="main">
				<nav role="navigation" class="site-navigation main-navigation">
					<h1 class="assistive-text"><?php _e( 'Menu', 'the_columnist' ); ?></h1>
					<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'the_columnist' ); ?>"><?php _e( 'Skip to content', 'the_columnist' ); ?></a></div>

					<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
				</nav><!-- .site-navigation -->

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

					<div id="feed-wrap">

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

						<?php get_template_part( 'content', 'search' ); ?>

					<?php endwhile; ?>

					</div>

					<?php the_columnist_content_nav( 'nav-below' ); ?>

				<?php else : ?>

					<?php get_template_part( 'no-results', 'search' ); ?>

				<?php endif; ?>

			</div><!-- #content -->
		</section><!-- #primary .site-content -->

<?php get_footer(); ?>