<?php
/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 *
 * @link https://developer.WordPress.org/themes/basics/template-hierarchy/
 *
 * @package business_office
 */

get_header();
?>

<div class="box-image position-relative">
    <div class="single-page-img"></div>
    <div class="page-header">
        <h1><?php esc_html_e( 'Home', 'business-office' ); ?></h1>
    </div>
    <span><?php business_office_the_breadcrumb(); ?></span>
</div>

<div id="content-wrap" class="container layout l-container">
	<div id="primary" class="content-area layout__main">
		<main id="main" class="site-main blog-index" aria-label="<?php esc_attr_e( 'Blog posts', 'business-office' ); ?>">
			<section class="blog-archive columns-1 clear" aria-label="<?php esc_attr_e( 'Posts list', 'business-office' ); ?>">
				<?php
				if ( have_posts() ) :
					/* Start the Loop */
					while ( have_posts() ) :
						the_post();

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

					endwhile;

				else :

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

				endif;
				?>
			</section>

			<nav class="pagination-nav" aria-label="<?php esc_attr_e( 'Posts', 'business-office' ); ?>">
				<?php
				the_posts_pagination(
					array(
						'prev_text'          => business_office_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'business-office' ) . '</span>',
						'next_text'          => '<span class="screen-reader-text">' . __( 'Next page', 'business-office' ) . '</span>' . business_office_get_svg( array( 'icon' => 'arrow-right' ) ),
						'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'business-office' ) . ' </span>',
					)
				);
				?>
			</nav>
		</main>
	</div>

<?php get_sidebar(); ?>

</div>

<?php
get_footer();