<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Theme Palace
 * @subpackage Power News
 * @since Power News 1.0.0
 */
$options = power_news_get_theme_options();
$class = has_post_thumbnail() ? 'has-post-thumbnail' : '';
?>

	<article id="post-<?php the_ID(); ?>" <?php post_class( $class ); ?>>
		<div class="featured-image">
			<img src="<?php the_post_thumbnail_url( 'large' ); ?>">
			<span class="min-read"><?php echo power_news_time_interval(get_the_content()); echo esc_html__(' min to read', 'power-news'); ?></span>
		</div><!-- .featured-image-->

		<div class="entry-container">
			
			<div class="entry-meta">
                <span class="cat-links">
                <?php echo power_news_single_categories(); ?>
				</span>
				<?php if (! $options['single_post_hide_date']) power_news_posted_on($post->ID);  ?>
            </div>

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

		<div class="entry-content">
		<?php
			the_content( sprintf(
				/* translators: %s: Name of current post. */
				wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'power-news' ), array( 'span' => array( 'class' => array() ) ) ),
				the_title( '<span class="screen-reader-text">"', '"</span>', false )
			) );

			wp_link_pages( array(
				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'power-news' ),
				'after'  => '</div>',
			) );
		?>
		</div>
    </div><!-- .entry-container -->

	<?php 
	echo power_news_author();

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