<?php

// Prevent Direct Access
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$background = get_theme_mod('blog_top_background');

get_header();

while( have_posts() ){

the_post();
?>

<section id="page_header" class="page-header padding_top" <?php if($background){ echo 'style="background-image:url('.wp_get_attachment_url($background).');"'; } ?>>
	<div class="container header_content padding_top">
		<div class="row">
			<div class="col-sm-12">

				<?php echo '<h1 class="whitecolor bottom25">'.the_title().'</h1>'; ?>

			</div>
		</div>
	</div>
</section>

<section id="ourblog" class="padding_bottom padding_top_half">
	<div class="container">
		<div class="row">

			<div class="col-xs-12 padding_top_half">
				
				<div class="blog_item">
					
					<?php if( has_post_thumbnail() ){ ?>
					<div class="image">
						<?php the_post_thumbnail('blog_wide') ?>
					</div>
					<?php } ?>
					
					<h3 class="top40 darkcolor bottom25"><?php the_title() ?></h3>
					<?php the_content() ?>
					
				</div>
				
			</div>
			
		</div>
	</div>
</section>

<?php
}

get_footer();