<?php
/**
 * The main template file.
 * @package RetroTale
 * @since RetroTale 1.0.0
*/
get_header(); ?> 
<h1 class="entry-headline"><?php if(get_theme_mod('retrotale_latest_posts_headline', retrotale_default_options('retrotale_latest_posts_headline')) == '') { ?><?php _e( 'Latest Posts' , 'retrotale' ); ?><?php } else { echo esc_html(get_theme_mod('retrotale_latest_posts_headline', retrotale_default_options('retrotale_latest_posts_headline'))); } ?></h1> 
    <section class="home-latest-posts<?php if (get_theme_mod('retrotale_post_entry_format', retrotale_default_options('retrotale_post_entry_format')) == 'Grid - Masonry') { ?> js-masonry<?php } ?>">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (get_theme_mod('retrotale_post_entry_format', retrotale_default_options('retrotale_post_entry_format')) == 'Grid - Masonry') {
get_template_part( 'content', 'grid' ); } else {
get_template_part( 'content', 'archives' ); } ?>
<?php endwhile; endif; ?>
   </section>   
<?php retrotale_content_nav( 'nav-below' ); ?>
  </div> <!-- end of content -->
<?php if (get_theme_mod('retrotale_display_sidebar_archives', retrotale_default_options('retrotale_display_sidebar_archives')) != 'Hide') { ?>
<?php get_sidebar(); ?>
<?php } ?>
<?php get_footer(); ?>