<?php
global $mb_content_area;
$class = bavotasan_article_class();
$bavotasan_theme_options = bavotasan_theme_options();
?>
	<article id="post-<?php the_ID(); ?>" <?php post_class( $class ); ?>>

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

	    <div class="entry-content">
		    <?php
		    if ( ( is_singular() || 'content' == $bavotasan_theme_options['excerpt_content'] ) && 'main' == $mb_content_area && ! is_archive() && ! is_search() ) {
			    the_content( __( 'Read more &rarr;', 'magazine-basic' ) );
		    } else {
		    	$image_name = ( 'main' == $mb_content_area ) ? 'thumbnail' : '1_column';
		    	if ( is_home() ) {
		    		$image_name = '1_column';
		    		$image_name = ( 'three-col c4' == $class ) ? '3_column' : $image_name;
		    		$image_name = ( 'two-col c6' == $class ) ? '2_column' : $image_name;
				}

				if( has_post_thumbnail() ) {
					echo '<a href="' . get_permalink() . '">';
					the_post_thumbnail( $image_name, array( 'class' => 'alignleft' ) );
					echo '</a>';
				}
				the_excerpt();
		    }
			?>
	    </div><!-- .entry-content -->

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

	</article><!-- #post-<?php the_ID(); ?> -->