<?php
/**
 * Template part for displaying single posts.
 *
 * @package bloger Lite
 */

?>
<div class="artical_wraper">
    <article id="post-<?php the_ID(); ?>" <?php post_class('post_content_article'); ?>>
        <?php
            $bloger_comment_post_numbers = get_theme_mod('bloger_comment_number_post_setting','1');    
            $bloger_comment_count = get_comments_number();
            $bloger_slide_cat = get_the_category();
        ?>
      <div class="entry-content">
        <?php
        $feat_img = get_theme_mod('bloger_single_post_img_enable',1);
        if($feat_img){
          $bloger_img_src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'bloger-post-image-withsidebar', false );
          if($bloger_img_src){ 
          ?>
          <div class="bloger_img_wrap">
            <img src="<?php echo esc_url($bloger_img_src[0]); ?>" />
          </div>
        <?php } }?>
        <div class="title_cat_wrap">
           <?php
          $show_cat = get_theme_mod('bloger_single_post_cat_enable',1);
          if($show_cat){ ?>
            <a class="bloger_cat" href="<?php echo esc_url(get_category_link( $bloger_slide_cat[0]->term_id )); ?>"><?php echo esc_html($bloger_slide_cat[0]->name);?></a>
            <?php }
            $post_title = get_theme_mod('bloger_single_post_title_enable',1);
            if($post_title){ ?>
            <h1><?php the_title(); ?></h1>
            <?php } ?>
        </div>
        <?php $show_data =get_theme_mod('bloger_single_post_metadata_enable',1);
        if($show_data){ ?>
        <div class="date_comment_author">
            <div class="wrap11">
                <span class="date_post"><?php echo esc_html(get_the_date()); ?></span>
                <?php $bloger_author = get_the_author(); ?> 
                <span class="author_post"><?php echo esc_html($bloger_author); ?></span>
                <?php if($bloger_comment_post_numbers > '0'){ ?>
                <span class="post_comment"><i class="fa fa-comments"></i><span><?php echo esc_html($bloger_comment_count); ?></span><?php esc_html_e('Comment','bloger'); ?></span>
                <?php } ?>
            </div>        
        </div>
        <?php } ?>
        <?php $show_decp =get_theme_mod('bloger_single_post_desc_enable',1);
        if($show_decp){?>
        <div class="excerpt_post_content">
          <?php the_content(); ?>
         </div>
         <?php } ?>
         <div class="read_more_share">
             <footer class="entry-footer">
             <div class="social_share">
                <?php 
                    if( is_plugin_active( 'accesspress-social-share/accesspress-social-share.php' ) ) {
                      if(is_active_sidebar('bloger_home_post_social_share')){
                        ?> <span class="share_text"><i class="fa fa-share-alt" aria-hidden="true"></i></span> <?php
                        dynamic_sidebar('bloger_home_post_social_share');
                      }
                    }
                ?>
                </div>
            </footer><!-- .entry-footer -->
         </div>
       </div><!-- .entry-content -->
    </article><!-- #post-## -->
</div>
