<?php
/**
 * The template part for displaying content on a single post
 *
 * @package Meridian One
 * @since 1.0
 */
?>

<?php if ( has_post_thumbnail() ) : ?>
	<div class="blog-post-single-thumb">
		<?php the_post_thumbnail( 'meridian-one-posts-listing' ); ?>
	</div><!-- .blog-post-single-thumb -->
<?php endif; ?>

<div class="blog-post-single-main">

	<h1 class="blog-post-single-title"><?php the_title(); ?></h1>

	<div class="blog-post-single-meta clearfix">

		<span class="post-meta-date">
			<?php echo get_the_time( get_option( 'date_format' ), get_the_ID() ); ?>
		</span><!-- .post-meta-date -->
		<span class="post-meta-separator">&#8212;</span>
		<span class="post-meta-comments">
			<a href="<?php comments_link(); ?>"><span class="blog-post-share-count"><?php comments_number( esc_html__( '( 0 ) Comments', 'meridian-one' ), esc_html__( '( 1 ) Comment', 'meridian-one' ), esc_html__( '( % ) Comments', 'meridian-one' ) ); ?></span></a>
		</span><!-- .post-meta-comments -->
		<span class="post-meta-separator">&#8212;</span>
		<span class="post-meta-author">
			<?php
				// author
				echo sprintf(
					esc_html_x( 'By %s', 'post author', 'meridian-one' ),
					'<span class="blog-post-single-meta-info-author"><a href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
				);
			?>
		</span><!-- .post-meta-author -->

	</div><!-- .blog-post-single-meta -->

	<div class="blog-post-single-content">
		<?php the_content(); ?>
	</div><!-- .blog-post-single-content -->

	<?php if ( has_tag() ) : ?>
		<div class="blog-post-single-tags post-meta-tags">
			<?php the_tags(); ?>
		</div><!-- .blog-post-single-tags -->
	<?php endif; ?>

	<div class="blog-post-single-cats post-meta-cats">
		<span><?php esc_html_e( 'Categories:', 'meridian-one' ); ?></span>
		<?php the_category( ', '); ?>
	</div><!-- .blog-post-single-tags -->

	<div class="blog-post-single-pagination">
		<?php wp_link_pages( array( 'link_before' => '<span class="blog-post-single-pagination-item">', 'link_after' => '</span>' ) ); ?>
	</div><!-- .blog-post-single-pagination -->

	<div class="clear"></div>
	<?php edit_post_link( esc_html__( 'Edit', 'meridian-one' ), '<span class="edit-link">', '</span>' ); ?>

</div><!-- .blog-post-single-main -->