<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Stucco
 */

?>
<?php if ( get_theme_mod( 'single_post_view', '0' ) == '0' ){ ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('content-section-large'); ?>>

	<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>', 'stucco' ), array( 'span' => array( 'class' => array() ) ) ),
				the_title( '<span class="screen-reader-text">"', '"</span>', false )
			) );

		?>
	</div><!-- .entry-content -->
	<div class="next-pages">
		<?php	
			wp_link_pages( array(
				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'stucco' ),
				'after'  => '</div>',
			) );
		?>
	</div>

	<footer class="entry-footer">
		<?php stucco_entry_footer(); ?>
	</footer><!-- .entry-footer -->
</article><!-- #post-## -->

<?php } else { ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<header class="entry-header">
		<div class="content-title">
					
			<?php stucco_entry_category(); ?>
						
			<?php
				the_title( '<h1 class="entry-title">', '</h1>' );
			?>
			<?php
				if ( 'post' === get_post_type() ) : ?>
					<div class="entry-meta">
						<?php stucco_post_meta(); ?>
					</div><!-- .entry-meta -->
			<?php
				endif; ?>
		</div>	
	</header><!-- .entry-header-large -->
	<?php if ( get_theme_mod( 'single_post_view', '0' ) != '3' ){ ?>
		<div class="post-image">	
			<?php the_post_thumbnail('full'); ?>
		</div>
	<?php } ?>
	<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>', 'stucco' ), array( 'span' => array( 'class' => array() ) ) ),
				the_title( '<span class="screen-reader-text">"', '"</span>', false )
			) );

		?>
	</div><!-- .entry-content -->
	<div class="next-pages">
		<?php	
			wp_link_pages( array(
				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'stucco' ),
				'after'  => '</div>',
			) );
		?>
	</div>

	<footer class="entry-footer">
		<?php stucco_entry_footer(); ?>
	</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php } ?>
