<?php

/**
 * The template for displaying archive pages.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package cleanlogic
 */

get_header(); ?>

<div id="primary" class="content-area">
	<main id="main" class="site-main" role="main">

		<?php
		if (have_posts()) : ?>

			<header class="page-header">
				<?php
				the_archive_title('<h1 class="page-title">', '</h1>');
				the_archive_description('<div class="taxonomy-description">', '</div>');
				?>
			</header><!-- .page-header -->

			<?php
			/* Start the Loop */
			while (have_posts()) :
				the_post();

				get_template_part('template-parts/content', get_post_format());

			endwhile;
			
			the_posts_pagination(
				array(
					'mid_size'           => 2,
					'prev_text'          => esc_html_x( '« Previous', 'previous posts', 'cleanlogic' ),
					'next_text'          => esc_html_x( 'Next »', 'next posts', 'cleanlogic' ),
					'screen_reader_text' => esc_html__( 'Search navigation', 'cleanlogic' ),
				)
			);
			
		else :

			get_template_part('template-parts/content', 'none');

		endif; ?>

	</main><!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();
