<?php
/**
 * The main template file
 *
 */

get_header();


?>
<?php
// Include hero slider template part
get_template_part( 'inc/sections/banner' ); ?>
<?php if ( is_front_page() && is_home() ) : ?>
	<?php get_template_part( 'global-templates/hero' ); ?>
<?php endif;
$container = get_theme_mod('bexplore_container_type', 'container');
?>

	<main id="primary" class="site-main">
        <div class="<?php echo esc_attr($container);?>">
            <div class="row">
                <!-- Do the left sidebar check and opens the primary div -->
	            <?php get_template_part( 'global-templates/left-sidebar-check' ); ?>

                    <?php
                    if ( have_posts() ) :

                        if ( is_home() && ! is_front_page() ) :
                            ?>
                            <header>
                                <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
                            </header>
                        <?php
                        endif;?>
                <div class="bexplore-masonry-grid">
                    <div class="bexplore-masonry-sizer"></div>
                    <div class="bexplore-masonry-gutter"></div>
                    <?php
                    while (have_posts()) :
                        the_post();

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

                    endwhile;
                    ?>
                </div>
<?php
                        get_template_part( 'template-parts/pagination' );

                    else :

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

                    endif;
                    ?>
                <!-- Do the left sidebar check and opens the primary div -->
	            <?php get_template_part( 'global-templates/right-sidebar-check' ); ?>
                </div>
            </div>
	</main><!-- #main -->

<?php

get_footer();
