<?php
/**
 * Template part for displaying single post layout one
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Purenote
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

if ( has_post_thumbnail() ) {
    $custom_post_class = 'has-thumbnail';
} else {
    $custom_post_class = 'no-thumbnail';
}

?>

<article id="post-<?php the_ID(); ?>" <?php post_class( $custom_post_class ); ?>>
	
	<div class="purenotes-post-content-wrap"> 
		<div class="post-thumbnail-wrap">
        <?php
        	purenote_post_thumbnail();
        ?>
        <div class="post-cats-wrap">
		<?php purenote_the_post_categories_list( get_the_ID(), 1 ); ?>
	</div><!-- .post-cats-wrap -->
    </div>
		<header class="entry-header">
			<?php
			if ( is_singular() ) :
				the_title( '<h1 class="entry-title">', '</h1>' );
			else :
				the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
			endif;

			if ( 'post' === get_post_type() ) :
			?>
				<div class="entry-meta purenote-flex  post-meta-wrap">
					
					<?php
						purenote_posted_by();
						purenote_posted_on();
        				purenote_the_estimated_reading_time();
						purenote_post_comment();
					 	purenote_entry_footer();
					?>
				</div><!-- .entry-meta -->
			<?php endif; ?>
		</header><!-- .entry-header -->

		<?php get_template_part( 'template-parts/partials/post/content' ); ?>
	</div> <!-- post-content-wrapper -->
</article><!-- #post-<?php the_ID(); ?> -->
