<?php
get_header();
if (!$kippis_is_smartphone) get_sidebar('left');
?>
      <div id="content">
        <article>
          <div class="article">
            <div id="archive">
              <?php if (have_posts()) { ?>
                <header class="page-header">
                  <h1 class="page-title">
                  <?php
                    if      (is_day     ()) printf(__('Daily Archives: %s'   ,'kippis'),'<span>' . get_the_date()             . '</span>');
                    else if (is_month   ()) printf(__('Monthly Archives: %s' ,'kippis'),'<span>' . get_the_date('F Y')        . '</span>');
                    else if (is_year    ()) printf(__('Yearly Archives: %s'  ,'kippis'),'<span>' . get_the_date('Y')          . '</span>');
                    else if (is_category()) printf(__('Category Archives: %s','kippis'),'<span>' . single_cat_title('',false) . '</span>');
                    else if (is_tag     ()) printf(__('Tag Archives: %s'     ,'kippis'),'<span>' . single_tag_title('',false) . '</span>');
                    else if (is_author  ()) {
                      the_post();
                      printf(__('Author Archives: %s','kippis'),'<span class="vcard"><a class="url fn n" href="'
                        . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" title="'
                        . esc_attr(get_the_author()) . '" rel="me">' . get_the_author() . '</a></span>');
                      rewind_posts();
                    }
                    else _e('Blog Archives','kippis');
                  ?>
                  </h1>
                </header>
                <?php
                kippis_content_nav('nav-above');
                while (have_posts()) {
                  the_post();
                  get_template_part('content',get_post_format());
                }
                kippis_content_nav('nav-below');
              }
              else {
                ?>
                <div id="post-0" class="article post no-results not-found">
                  <header class="entry-header">
                    <h1 class="entry-title"><?php _e('Nothing Found','kippis'); ?></h1>
                  </header><!-- .entry-header -->
                  <div class="entry-content">
                    <p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.','kippis'); ?></p>
                    <?php get_search_form(); ?>
                  </div><!-- .entry-content -->
                </div><!-- #post-0 -->
              <?php } ?>
            </div><!-- #archive -->
          </div><!-- #article -->
        </article>
      </div><!-- #content -->
<?php
if ($kippis_is_smartphone) get_sidebar('left');
get_sidebar('right');
get_footer();

