<?php
/**
 * The homepage template file
 *
 *
 * @package Meridian One
 * @since 1.0
 */

get_header(); ?>

	<div id="content" <?php meridian_one_content_class(); ?> role="main">

		<?php

			// If there are posts
			if ( have_posts() ) :

				?><div id="blog-posts-listing"  class="blog-posts-listing"><?php

					// Loop posts
					while ( have_posts() ) : the_post();

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

					// End loop posts
					endwhile;

					// Previous/next pagination
					the_posts_pagination( array(
						'prev_text'          => esc_html__( 'Previous', 'meridian-one' ),
						'next_text'          => esc_html__( 'Next', 'meridian-one' ),
						'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'meridian-one' ) . ' </span>',
					) );

				?></div><!-- .blog-posts-listing --><?php

			// If no posts found
			else :

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

			// Finish if statement
			endif;

		?>

	</div><!-- #content -->

	<?php get_sidebar(); ?>

<?php get_footer();
