<?php
/**
 * The template for displaying all single posts.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package Luzuk Premium
 */
$luzuk_lite_single_breadcrumb_section = get_theme_mod('luzuk_lite_single_breadcrumb_section', '1');
$luzuk_lite_single_tags_section = get_theme_mod('luzuk_lite_single_tags_section', '1');
$luzuk_lite_authorbox_section = get_theme_mod('luzuk_lite_authorbox_section', '1');
$luzuk_lite_relatedposts_section = get_theme_mod('luzuk_lite_relatedposts_section', '1');

get_header(); ?> 
 <?php $image = wp_get_attachment_url( get_post_thumbnail_id($post->ID));?>

<div class="dinero-page-main"> 
<header class="page-main-header" 
  <?php
    if(get_theme_mod('featured_img_on_off') != 'on' ){
  ?>

 <?php  if (!empty($image)) : ?>
  style="background: url('<?php echo esc_url($image); ?>'); background-repeat: no-repeat; background-size:cover;
   height: <?php echo esc_attr(get_theme_mod('dinero_single_post_image_height','300')) ?>px;
  "
  <?php endif ?> 

 <?php } ?>

  >
 <?php
    if(get_theme_mod('page_title_on_off') != 'on' ){
  ?>
   <div class="<?php if(get_theme_mod('dinero_inner_page_width','Box Width') == 'Box Width'){ ?>container <?php } elseif(get_theme_mod('dinero_inner_page_width','Box Width') == 'Full Width'){ ?> container-fluid <?php }?>" >
        <?php the_title( '<h1 class="ht-main-title wow zoomIn">', '</h1>' ); ?>
        <div class="clearfix"></div>
    </div>
 <?php } ?>    
      <?php
    if(get_theme_mod('breadcrumb_on_off') != 'on' ){
  ?>
        <div class="breadcrumbbox wow zoomIn">
            <div class="<?php if(get_theme_mod('dinero_inner_page_width','Box Width') == 'Box Width'){ ?>container <?php } elseif(get_theme_mod('dinero_inner_page_width','Box Width') == 'Full Width'){ ?> container-fluid <?php }?>" >
                <div class='button'><?php luzuk_lite_the_breadcrumb(); ?></div>
                <!--  <?php //luzuk_lite_the_breadcrumb(); ?> -->
            </div>
        </div>
 <?php } ?> 
</header><!-- .entry-header -->
<div class="dinero-innerpage-overlay"></div>
</div>
<main id="innerpage-box">
   <div class="<?php if(get_theme_mod('dinero_inner_page_width','Box Width') == 'Box Width'){ ?>container <?php } elseif(get_theme_mod('dinero_inner_page_width','Box Width') == 'Full Width'){ ?> container-fluid <?php }?>" >
        <div class="inner_contentbox">
        <div id="content-box" class="innerpage-whitebox">

        <?php if (get_theme_mod('luzuk__blogspost_layout') == '1' ) { ?>

            <div class="col-md-3">
              <div id="secondary" class="widget-area">
                <?php  dynamic_sidebar('luzuk-blog-sidebar'); ?>
              </div>
            </div>

        <article class="article col-md-9">       
                <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                <div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
                    <div class="single_post">
                        <div class="blog-info-area"> 

                            <?php if (get_theme_mod('dinero_single_show_author',true) != false || get_theme_mod('dinero_single_show_date',true) != false || get_theme_mod('dinero_single_show_time',true) != false || get_theme_mod('dinero_single_show_category',true) != false || get_theme_mod('dinero_single_show_comments',true) != false || get_theme_mod('dinero_single_show_tags',true) != false){ ?>
                            <div class="metabox"> 
                              <?php if (get_theme_mod('dinero_single_show_author',true) != false){ ?>
                               <div class="blog-author">by <?php echo get_the_author(); ?> 
                              </div>
                              <?php }?>
                              <?php if (get_theme_mod('dinero_single_show_date',true) != false){ ?>
                                <span> <?php echo get_the_date( 'j F, Y' ); ?></span>
                              <?php }?>
                               <?php if (get_theme_mod('dinero_single_show_time',true) != false){ ?>
                                <div class="blog-time"><?php echo the_time( 'g:i a' ) ?></div>
                              <?php }?>
                               <?php if (get_theme_mod('dinero_single_show_category',true) != false){ ?>
                                <div class="blog-category"> 
                                  <span><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></span>
                                </div>
                              <?php }?>
                              <?php if (get_theme_mod('dinero_single_show_comments',true) != false){ ?>
                                  <div class="blog-comment"><?php comments_template( '', true ); ?></div>
                              <?php }?>
                                <?php if (get_theme_mod('dinero_single_show_tags',true) != false){ ?>
                                  <div class="blog-tags"><?php
                                          if( $tags = get_the_tags() ) {
                                            foreach( $tags as $content_tag ) {
                                              $sep = ( $content_tag === end( $tags ) ) ? '' : ' ';
                                              echo '<a href="' . esc_url(get_term_link( $content_tag, $content_tag->taxonomy )) . '" class="ml-2 mb-2">' . esc_html($content_tag->name) . '</a>' . esc_html($sep);
                                            }
                                          } ?>
                      
                                    </div>
                              <?php }?>
                            </div>
                          <?php }?>                         
                        </div>

                          <?php if(get_theme_mod('single_blog_socials_on_off') != 'on' ){ ?>

                        <div class="socialMedia">
                          <ul>
                            <li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
                            <li><a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=<?php the_title();?>&source=<?php the_title();?>" target="_blank" class="site-button sharp"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
                            
                            <li><a href="https://twitter.com/share?url=<?php the_permalink();?>&amp;text=<?php the_title();?>" class="site-button sharp" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
                            <li><a href="http://www.digg.com/submit?url=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-digg" aria-hidden="true"></i></a></li>
                            <li class="share-button"><a href="#" class="site-button sharp"><i class="fa fa-share-alt"></i></a></li>
                          </ul>
                            <div class="clearfix"></div>
                        </div>
                    <?php } ?>
                       
                       <!-- Start Content -->
                       <div id="content" class="post-single-content box mark-links">
                        <?php the_content(); ?>

                     
                        
                        <?php if($luzuk_lite_single_tags_section == '1') { ?>
                            <!-- Start Tags -->
                            <div class="tags"><?php the_tags('<span class="tagtext">'.__('Tags','Luzuk Premium').':</span>',', ') ?></div>
                            <!-- End Tags -->
                        <?php } ?>
                    </div><!-- End Content -->    
                    </div>
                </div>
            <?php endwhile; ?>
        </article>

<?php } else if (get_theme_mod('luzuk__blogspost_layout') == '0' ) {?>

            <article class="article col-md-9">       
                <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                <div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
                    <div class="single_post">
                       <div class="blog-info-area"> 

                            <?php if (get_theme_mod('dinero_single_show_author',true) != false || get_theme_mod('dinero_single_show_date',true) != false || get_theme_mod('dinero_single_show_time',true) != false || get_theme_mod('dinero_single_show_category',true) != false || get_theme_mod('dinero_single_show_comments',true) != false || get_theme_mod('dinero_single_show_tags',true) != false){ ?>
                            <div class="metabox"> 
                              <?php if (get_theme_mod('dinero_single_show_author',true) != false){ ?>
                               <div class="blog-author">by <?php echo get_the_author(); ?> 
                              </div>
                              <?php }?>
                              <?php if (get_theme_mod('dinero_single_show_date',true) != false){ ?>
                                <span> <?php echo get_the_date( 'j F, Y' ); ?></span>
                              <?php }?>
                               <?php if (get_theme_mod('dinero_single_show_time',true) != false){ ?>
                                <div class="blog-time"><?php echo the_time( 'g:i a' ) ?></div>
                              <?php }?>
                               <?php if (get_theme_mod('dinero_single_show_category',true) != false){ ?>
                                <div class="blog-category"> 
                                  <span><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></span>
                                </div>
                              <?php }?>
                              <?php if (get_theme_mod('dinero_single_show_comments',true) != false){ ?>
                                  <div class="blog-comment"><?php comments_template( '', true ); ?></div>
                              <?php }?>
                                <?php if (get_theme_mod('dinero_single_show_tags',true) != false){ ?>
                                   <div class="blog-tags"><?php
                                          if( $tags = get_the_tags() ) {
                                            foreach( $tags as $content_tag ) {
                                              $sep = ( $content_tag === end( $tags ) ) ? '' : ' ';
                                              echo '<a href="' . esc_url(get_term_link( $content_tag, $content_tag->taxonomy )) . '" class="ml-2 mb-2">' . esc_html($content_tag->name) . '</a>' . esc_html($sep);
                                            }
                                          } ?>
                      
                                    </div>
                              <?php }?>
                            </div>
                          <?php }?>                         
                        </div>

                          <?php if(get_theme_mod('single_blog_socials_on_off') != 'on' ){ ?>

                        <div class="socialMedia">
                          <ul>
                            <li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
                            <li><a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=<?php the_title();?>&source=<?php the_title();?>" target="_blank" class="site-button sharp"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
                            
                            <li><a href="https://twitter.com/share?url=<?php the_permalink();?>&amp;text=<?php the_title();?>" class="site-button sharp" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
                            <li><a href="http://www.digg.com/submit?url=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-digg" aria-hidden="true"></i></a></li>
                            <li class="share-button"><a href="#" class="site-button sharp"><i class="fa fa-share-alt"></i></a></li>
                          </ul>
                            <div class="clearfix"></div>
                        </div>
                    <?php } ?>
                       
                       <!-- Start Content -->
                       <div id="content" class="post-single-content box mark-links">
                        <?php the_content(); ?>                  
                        
                       
                    </div><!-- End Content -->    
                    </div>
                </div>
            <?php endwhile; ?>
        </article>
<?php } if (get_theme_mod('luzuk__blogspost_layout') == '2' ) { ?>

   <article class="article col-md-9">       
                <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                <div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
                    <div class="single_post">
                        <div class="blog-info-area"> 

                            <?php if (get_theme_mod('dinero_single_show_author',true) != false || get_theme_mod('dinero_single_show_date',true) != false || get_theme_mod('dinero_single_show_time',true) != false || get_theme_mod('dinero_single_show_category',true) != false || get_theme_mod('dinero_single_show_comments',true) != false || get_theme_mod('dinero_single_show_tags',true) != false){ ?>
                            <div class="metabox"> 
                              <?php if (get_theme_mod('dinero_single_show_author',true) != false){ ?>
                               <div class="blog-author">by <?php echo get_the_author(); ?> 
                              </div>
                              <?php }?>
                              <?php if (get_theme_mod('dinero_single_show_date',true) != false){ ?>
                                <span> <?php echo get_the_date( 'j F, Y' ); ?></span>
                              <?php }?>
                               <?php if (get_theme_mod('dinero_single_show_time',true) != false){ ?>
                                <div class="blog-time"><?php echo the_time( 'g:i a' ) ?></div>
                              <?php }?>
                               <?php if (get_theme_mod('dinero_single_show_category',true) != false){ ?>
                                <div class="blog-category"> 
                                  <span><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></span>
                                </div>
                              <?php }?>
                              <?php if (get_theme_mod('dinero_single_show_comments',true) != false){ ?>
                                  <div class="blog-comment"><?php comments_template( '', true ); ?></div>
                              <?php }?>
                                <?php if (get_theme_mod('dinero_single_show_tags',true) != false){ ?>
                                   <div class="blog-tags"><?php
                                          if( $tags = get_the_tags() ) {
                                            foreach( $tags as $content_tag ) {
                                              $sep = ( $content_tag === end( $tags ) ) ? '' : ' ';
                                              echo '<a href="' . esc_url(get_term_link( $content_tag, $content_tag->taxonomy )) . '" class="ml-2 mb-2">' . esc_html($content_tag->name) . '</a>' . esc_html($sep);
                                            }
                                          } ?>
                      
                                    </div>
                              <?php }?>
                            </div>
                          <?php }?>                         
                        </div>

                          <?php if(get_theme_mod('single_blog_socials_on_off') != 'on' ){ ?>

                        <div class="socialMedia">
                          <ul>
                            <li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
                            <li><a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=<?php the_title();?>&source=<?php the_title();?>" target="_blank" class="site-button sharp"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
                            
                            <li><a href="https://twitter.com/share?url=<?php the_permalink();?>&amp;text=<?php the_title();?>" class="site-button sharp" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
                            <li><a href="http://www.digg.com/submit?url=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-digg" aria-hidden="true"></i></a></li>
                            <li class="share-button"><a href="#" class="site-button sharp"><i class="fa fa-share-alt"></i></a></li>
                          </ul>
                            <div class="clearfix"></div>
                        </div>
                    <?php } ?>
                       
                       <!-- Start Content -->
                       <div id="content" class="post-single-content box mark-links">
                        <?php the_content(); ?>

                     
                        
                        <?php if($luzuk_lite_single_tags_section == '1') { ?>
                            <!-- Start Tags -->
                            <div class="tags"><?php the_tags('<span class="tagtext">'.__('Tags','Luzuk Premium').':</span>',', ') ?></div>
                            <!-- End Tags -->
                        <?php } ?>
                    </div><!-- End Content -->    
                    </div>
                </div>
            <?php endwhile; ?>
        </article>

    <div class="col-md-3">
      <div id="secondary" class="widget-area">
        <?php dynamic_sidebar('luzuk-blog-sidebar'); ?>
      </div>
    </div>


<?php } ?> 

           
        <!-- End Article -->
        <!-- Start Sidebar -->
        <?php // get_sidebar(); ?>
        <!-- End Sidebar -->
    </div>
    <div class="clearfix"></div>
</div>
  <div class="clearfix"></div>
</div>
</main>
<?php get_footer(); ?>
