<?php get_header(); ?>
<?php $blog_type = get_theme_mod( 'blog_type' ); ?>

<main class="page-content container_wrap">
    <div class="container">
        
        <div class="posts-wrap">

            <h1 class="page-title"><?php the_archive_title(); ?></h1>
        
            <?php if ( have_posts() ) { ?>
            <div class="posts-loop <?php echo $blog_type ?>">
                
                <?php while ( have_posts() ) {
                    the_post();
                    get_template_part( 'template-parts/post/content', 'preview' );
                }; ?>

            </div>
            <?php the_posts_pagination();
            } else {
                get_template_part( 'template-parts/post/content', 'none' );
            }; ?>
        
        </div>

        <?php get_sidebar(); ?> 
        
    </div>
</main>

<?php get_footer(); ?>