<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Theme Palace
 * @subpackage Newstation
 * @since Newstation 1.0.0
 */
$options = newstation_get_theme_options();

$ids = get_the_id();
$content = get_the_content($ids);

?>

<article>

	<?php if ( has_post_thumbnail() ) : ?>
		<div class="featured-image">
			<img src="<?php the_post_thumbnail_url( 'full' ); ?>">
		</div>
	<?php endif; ?>

	<div class="entry-container">
		<div class="entry-meta">
			<?php
			if ( ! $options['single_post_hide_date'] ) :
				newstation_posted_on();
			endif;

			?>

			<span class="min-read"><?php echo newstation_time_interval( $content ); echo esc_html__(' min read', 'newstation'); ?></span>

			<?php

			if ( ! $options['single_post_hide_category'] ) :
				newstation_single_categories();
			endif;

			?>

		</div>

		<header class="entry-header">
			<h2 class="entry-title"><?php the_title(); ?></h2>
		</header>

			<div class="entry-content">
				<?php the_content(); ?>
			</div>

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

	</article>