<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package nouveau
 */

get_header(); ?>

	<div id="primary" class="content-area">

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


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

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

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

	<header class="entry-header">

		<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );?>

		<?php if ( 'post' == get_post_type() ) : ?>

		<?php endif; ?>
	</header><!-- .entry-header -->

	<?php if ( is_search() ) : // Only display Excerpts for Search ?>
	<div class="entry-summary">
		<?php the_excerpt(); ?>
	</div><!-- .entry-summary -->
	<?php else : ?>
	<div class="entry-content">


	   <a href="<?php the_permalink(); ?>" class="th" title="<?php the_title_attribute(); ?>" >
		<?php the_post_thumbnail('thumb-large'); ?>
		</a>


		<?php the_excerpt();?>

	</div><!-- .entry-content -->

	<?php endif; ?>

	<footer class="entry-meta">
		<div class="entry-meta">
			<?php get_template_part( 'inc/meta' ); ?>
		</div><!-- .entry-meta -->
	</footer><!-- .entry-meta -->
</article><!-- #post-## -->


			<?php endwhile; ?>

			<?php nouveau_paging_nav(); ?>

		  <?php else : ?>

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

		  <?php endif; ?>


		  <div class="clearfix"></div>

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



	</div><!-- #primary -->
	<div class="clearfix"></div>


<?php get_footer(); ?>