:php
  /**
   * <%= themeName %> template for displaying Archives
   *
   * @package WordPress
   * @subpackage <%= themeName %>
   * @since <%= themeName %> 1.0
   */

- get_header();

  .content
    - if ( have_posts() ) :
      h1
        - if ( is_category() ):
          - printf( __( 'Category Archives: %s', '<%= themeName %>' ), single_cat_title( '', false ) );

        - elseif ( is_tag() ):
          - printf( __( 'Tag Archives: %s', '<%= themeName %>' ), single_tag_title( '', false ) );

        - elseif ( is_tax() ):
          - $term     = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
          - $taxonomy = get_taxonomy( get_query_var( 'taxonomy' ) );
          - printf( __( '%s Archives: %s', '<%= themeName %>' ), $taxonomy->labels->singular_name, $term->name );

        - elseif ( is_day() ) :
          - printf( __( 'Daily Archives: %s', '<%= themeName %>' ), get_the_date() );

        - elseif ( is_month() ) :
          - printf( __( 'Monthly Archives: %s', '<%= themeName %>' ), get_the_date( _x( 'F Y', 'monthly archives date format', '<%= themeName %>' ) ) );

        - elseif ( is_year() ) :
          - printf( __( 'Yearly Archives: %s', '<%= themeName %>' ), get_the_date( _x( 'Y', 'yearly archives date format', '<%= themeName %>' ) ) );

        - elseif ( is_author() ) : the_post();
          - printf( __( 'All posts by %s', '<%= themeName %>' ), get_the_author() );

        - else :
          - _e( 'Archives', '<%= themeName %>' );

        - endif;
      - if ( is_category() || is_tag() || is_tax() ):
        - $term_description = term_description();
        - if ( ! empty( $term_description ) ) : ?>
          .archive-description
            = $term_description;
        - endif;
      - endif;

      - if ( is_author() && get_the_author_meta( 'description' ) ) :
        .archive-description
          - the_author_meta( 'description' );
      - endif;

      - while ( have_posts() ) : the_post();
        - get_template_part( 'loop', get_post_format() );
      - endwhile;
    - else :
      - get_template_part( 'loop', 'empty' );
    - endif;

    .pagination
      - get_template_part( 'template-part', 'pagination' );

- get_footer();

