<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Theme Palace
 * @subpackage FavBlog
 * @since FavBlog 1.0.0
 */

$options = favblog_get_theme_options();
$class = has_post_thumbnail() ? '' : 'no-post-thumbnail';?>

<article id="post-<?php the_ID(); ?>"  <?php post_class( $class ); ?> >
    <div class="popular-post-wrapper">
        <?php if ( has_post_thumbnail() ) : ?>
            <div class="featured-image" style="background-image: url('<?php the_post_thumbnail_url( 'post-thumbnail' ) ?>');">
                <a href="<?php the_permalink(); ?>" class="post-thumbnail-link" title="<?php the_title_attribute(); ?>"></a>
            </div><!-- .featured-image -->
        <?php endif; 

        echo favblog_article_footer_meta(); ?>

        <div class="entry-container">
            <header class="entry-header">
                <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
            </header>
            
            <div class="entry-content">
                <?php the_excerpt(); ?>
            </div>
            <div class="admin-profile">
                <?php echo favblog_author_image(); ?>
                <div class="admin-container">
                    <?php echo favblog_author_name(); ?>

                    <div class="entry-meta">
                        <?php favblog_posted_on( ); ?>
                    </div><!-- .entry-meta -->
                </div><!-- .entry-container -->
            </div><!-- .admin-profile -->
        </div><!-- .entry-container -->
    </div>
</article>
