<?php get_header(); ?>

<?php
if (have_posts()) {
  while (have_posts()) {
    the_post();
    $content = get_the_content();
    if (trim($content) !== '') {
      echo '<main class="fjord-main">';
      echo apply_filters('the_content', $content);
      echo '</main>';
    } else {
      get_template_part('template-parts/home');
    }
  }
} else {
  get_template_part('template-parts/home');
}
?>

<?php get_footer(); ?>
