<?php get_header(); ?>

<?php 
$picurl = get_template_directory_uri()."/"."images/pageimage.jpg";
?>
<style>
.jumbo {
background: #f8f7fc url('<?php echo $picurl; ?>')  no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
width: 100%;
height: 300px;
}
</style>

<div class="jumbo">
<div class="container"><div style="width: 100%; height: 300px; position: relative;"><div class="leadbox">

<h1>
<?php
            if ( is_category() ) {
                printf( __( '%s', 'skyline-news' ), '<span>' . single_cat_title( '', false ) . '</span>' );
 
            } elseif ( is_tag() ) {
                printf( __( '%s', 'skyline-news' ), '<span>' . single_tag_title( '', false ) . '</span>' );
 
            } elseif ( is_author() ) {
                /* Queue the first post, that way we know
                 * what author we're dealing with (if that is the case).
                */
                the_post();
                printf( __( 'All posts by: %s', 'skyline-news' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
                /* Since we called the_post() above, we need to
                 * rewind the loop back to the beginning that way
                 * we can run the loop properly, in full.
                 */
                rewind_posts();
 
            } elseif ( is_day() ) {
                printf( __( '%s', 'skyline-news' ), '<span>' . get_the_date() . '</span>' );
 
            } elseif ( is_month() ) {
                printf( __( '%s', 'skyline-news' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
 
            } elseif ( is_year() ) {
                printf( __( '%s', 'skyline-news' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
 
            } else {
                _e( 'Archives', 'skyline-news' );
 
            }
        ?>

</h1>


</div></div></div></div>


<div class="container">
<div class="row" id="post-content">


 <?php
        if ( is_category() ) {
            // show an optional category description
            $category_description = category_description();
            if ( ! empty( $category_description ) )
                echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
 
        } elseif ( is_tag() ) {
            // show an optional tag description
            $tag_description = tag_description();
            if ( ! empty( $tag_description ) )
                echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
        }
elseif ( is_author() ) {
            // show an optional author description
            
?>
<div class="panel panel-default">
  <div class="panel-body">
<div class="authorarea">
<div class="authorinfo">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 75 ); ?>

<div class="authortext">

<p><b><?php the_author(); ?></b></p>
<p><?php the_author_meta( 'description' ); ?></p>
<?php
$p = get_the_author_meta('url');
if (!empty($p)) { ?>
<p><i class="glyphicon glyphicon-globe"></i>&nbsp;&nbsp;<a href="<?php esc_url(the_author_meta('url')); ?>"><?php esc_url(the_author_meta('url')); ?></a></p>
<?php } ?>
</div>
<div class="clearfix"></div>
</div></div></div></div>
<?php
        }
    ?>


<div class="starter-template">
<section id="postflow">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="thumbnail white-panel">
<a href="<?php esc_url( the_permalink() ); ?>">
<?php the_post_thumbnail('thumbnail'); ?>
<h1><?php the_title(); ?></h1></a>
<p class="text-muted small"><i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-calendar"></i>&nbsp;&nbsp;<?php the_time(get_option('date_format')); ?>&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-comment"></i>&nbsp;&nbsp;<?php echo get_comments_number(); ?></p>


</article>

<?php endwhile;  ?>




<?php else: ?>
<p><?php _e('Sorry, no posts matched your criteria.','skyline-news'); ?></p><?php endif; ?>
</section>

<?php  
the_posts_pagination( array(
				'prev_text'          => __( 'Previous', 'skyline-news' ),
				'next_text'          => __( 'Next', 'skyline-news' ),
'screen_reader_text'          => __( 'Navigation', 'skyline-news' ),
				
			) );

?>




</div>
</div>
</div>
<?php get_footer(); ?>