<?php
/**
 * Template part for displaying Single Posts
 *
 * @subpackage Dinero
 * @since 1.0
 * @version 1.4
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('inner-service'); ?>>
  <div class="single-post">
    <div class="article_content">
      <div class="article-text">
        <?php if ( !get_header_image() ) { ?>
          <h1 class="single-post"><?php the_title();?></h1>
        <?php }?>
        <?php if(has_post_thumbnail() && get_theme_mod('dinero_show_featured_image',true) == true) { ?>
          <div class="single-post-image">
            <?php the_post_thumbnail(); ?>  
          </div>
        <?php }?>
        <div class="metabox"> 
          <?php if (get_theme_mod('dinero_show_single_post_author',true) != false){ ?>
            <span class="entry-author"><i class="fas fa-user"></i><?php the_author(); ?></span>
          <?php }?>
          <span class="entry-date"><i class="fas fa-calendar-alt"></i><?php echo esc_html( get_the_date()); ?></span>
          <?php if (get_theme_mod('dinero_show_single_post_comments',true) != false){ ?>
            <span class="entry-comments"><i class="fas fa-comments"></i><?php comments_number( __('0 Comments','dinero'), __('0 Comments','dinero'), __('% Comments','dinero') ); ?></span>
          <?php }?>
          <span class="entry-time"><i class="far fa-clock"></i><?php echo esc_html( get_the_time() ); ?></span>
        </div>
        <p><?php the_content(); ?></p>
        <?php if (get_theme_mod('dinero_show_single_post_category',true) != false) {?>
          <div class="single-post-category mt-3"><i class="fas fa-folder-open mr-2"></i><?php the_category(', '); ?></div>
        <?php }?>
        <div class="row">
          <div class="col-lg-7 col-md-12">
            <?php if (get_theme_mod('dinero_show_single_post_tags',true) != false) {?>
              <div class="single-post-tags mt-3">
                <i class="fas fa-tags mr-2"></i><?php echo get_the_tag_list('<p>',', ','</p>'); ?>
              </div>
            <?php }?>
          </div>
          <div class="col-lg-5 col-md-12">
            <div class="share-icons mt-3">
              <span><?php echo esc_html_e('Share this post','dinero'); ?></span>
              <a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" class="m-1" target="_blank"><i class="fab fa-facebook-f" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Facebook', 'dinero' ); ?></span></a>
              <a href="https://twitter.com/share?url=<?php the_permalink(); ?>" class="m-1" target="_blank"><i class="fab fa-twitter" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Twitter', 'dinero' ); ?></span></a>
              <a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>" class="m-1" target="_blank"><i class="fab fa-linkedin-in" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Linkedin', 'dinero' ); ?></span></a>
              <a href="http://www.instagram.com/submit?url=<?php the_permalink(); ?>" class="m-1" target="_blank"><i class="fab fa-instagram"></i><span class="screen-reader-text"><?php esc_html_e( 'Instagram', 'dinero' ); ?></span></a>
            </div>
          </div>
        </div>
        <hr>
      </div>
      <div class="clearfix"></div>
    </div>
  </div>
</article>