<?php
/**
 * Single post template.
 *
 * @package EasySite_Pro
 */

get_header();
?>

<div class="easysite-container easysite-content-area <?php echo easysite_get_mod( 'easysite_show_sidebar', true ) ? 'has-sidebar' : ''; ?>">
	<div class="easysite-primary">
		<?php while ( have_posts() ) : the_post(); ?>
			<article <?php post_class( 'easysite-post' ); ?>>
				<header class="easysite-entry-header">
					<?php the_title( '<h1 class="easysite-entry-title">', '</h1>' ); ?>
					<p class="easysite-meta"><?php echo esc_html( get_the_date() ); ?> · <?php the_author(); ?></p>
				</header>
				<?php if ( has_post_thumbnail() ) : ?>
					<div class="easysite-featured-image"><?php the_post_thumbnail( 'large' ); ?></div>
				<?php endif; ?>
				<div class="easysite-entry-content">
					<?php the_content(); ?>
				</div>
				<?php easysite_social_share_buttons(); ?>
			</article>
			<?php
			if ( comments_open() || get_comments_number() ) {
				comments_template();
			}
			?>
		<?php endwhile; ?>
	</div>
	<?php if ( easysite_get_mod( 'easysite_show_sidebar', true ) ) : ?>
		<?php get_sidebar(); ?>
	<?php endif; ?>
</div>

<?php
get_footer();
