<?php
/**
 * The template part for displaying single posts
 *
 * @package WordPress
 * @subpackage blazeblog
 * @since BlazeBlog 1.0
 */
?>
<div class="row">
    <div class="col-sm-12">
        <article id="post-<?php the_ID(); ?>" <?php post_class( 'post' ); ?>>
            <?php blazeblog_post_thumbnail(); ?>

            <header class="entry-header col-sm-12">
                <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
            </header>

            <div class="entry-content col-sm-8">
                <?php blazeblog_excerpt(); ?>
                <?php
                the_content();

                wp_link_pages( array(
                    'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'blazeblog' ) . '</span>',
                    'after'       => '</div>',
                    'link_before' => '<span>',
                    'link_after'  => '</span>',
                    'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'blazeblog' ) . ' </span>%',
                    'separator'   => '<span class="screen-reader-text">, </span>',
                ) );
                ?>
            </div>

            <footer class="entry-footer col-sm-4">
                <?php blazeblog_entry_meta(); ?>
                <?php
                // Retrieve attachment metadata.
                $metadata = wp_get_attachment_metadata();
                if ( $metadata ) {
                    printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a target="_blank" href="%2$s">%3$s &times; %4$s</a></span>',
                        esc_html_x( 'Full size', 'Used before full size attachment link.', 'blazeblog'),
                        esc_url( wp_get_attachment_url() ),
                        absint( $metadata['width'] ),
                        absint( $metadata['height'] )
                    );
                }
                $format = 'attachment';
                printf( '<span class="entry-format %4$s">%1$s<a target="_blank" href="%2$s">%3$s</a></span>',
                    sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'blazeblog' ) ),
                    esc_url( wp_get_attachment_url() ),
                    'Attachment',
                    $format
                );
                edit_post_link(
                    sprintf(
                        /* translators: %s: Name of current post */
                        __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'blazeblog' ),
                        get_the_title()
                    ),
                    '<span class="edit-link">',
                    '</span>'
                );
                ?>
            </footer>
        </article>
    </div>
</div>
<div class="clearfix"></div>
<?php 
if ( '' !== get_the_author_meta( 'description' ) ) {
    get_template_part( 'template-parts/biography' );
}
?>
