<?php
/**
 * The archive template file.
 * @package RetroTale
 * @since RetroTale 1.0.0
*/
get_header(); ?>
<?php if ( have_posts() ) : ?>   
    <div class="content-headline">
      <h1 class="entry-headline"><?php if ( is_day() ) :
						printf( __( 'Daily Archive: %s', 'retrotale' ), '<span>' . get_the_date() . '</span>' );
					elseif ( is_month() ) :
						printf( __( 'Monthly Archive: %s', 'retrotale' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'retrotale' ) ) . '</span>' );
					elseif ( is_year() ) :
						printf( __( 'Yearly Archive: %s', 'retrotale' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'retrotale' ) ) . '</span>' );
					else :
						_e( 'Archive', 'retrotale' );
					endif ;?></h1>
<?php retrotale_get_breadcrumb(); ?>
    </div>
    <div<?php if (get_theme_mod('retrotale_post_entry_format', retrotale_default_options('retrotale_post_entry_format')) == 'Grid - Masonry') { ?> class="js-masonry"<?php } ?>>
<?php 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; ?> 
    </div>
<?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(); ?>