<?php
/**
 * The template for displaying 404 pages (not found)
 *
 * @link https://codex.wordpress.org/Creating_an_Error_404_Page
 *
 * @package relax_spa
 */

get_header();

$layout = relax_spa_get_sidebar_layout();
if( $layout == 'no-sidebar' ) {
  $content_column_class = 'col-sm-12';
} else {
  $content_column_class = 'col-sm-8';
}
?>

<div class="inside-page" id="primary">
  <div class="container">
  		<header class="page-header">
			<h1 class="page-title">
				<?php esc_html_e( 'Page not found', 'default' ); ?>
			</h1>
		</header>

		<div class="row">

			<?php if ( $layout == 'left-sidebar' ) : ?>
	      <div class="col-sm-4"><?php get_sidebar(); ?></div>
	    <?php endif; ?>

			<div class="<?php echo esc_attr( $content_column_class ); ?>">
			<?php if ( have_posts() ) : ?>
				<?php /* Start the Loop */ ?>
				<?php while ( have_posts() ) : the_post(); ?>
				<?php get_template_part( 'template-parts/content' ); ?>
				<?php endwhile; ?>                  
				<?php else : ?>
				<?php get_template_part( 'template-parts/content', 'none' ); ?>
				<?php endif; ?>
			</div>  

			<?php if( $layout == 'right-sidebar' ) : ?>
	      <div class="col-sm-4"><?php get_sidebar(); ?></div>
	    <?php endif; ?>

		</div>

  </div>
</div>

<?php
get_footer();
