<?php
/**
   * The template for Single page.
   *
   *
   * @package   igor WordPress Theme
   * @copyright Copyright (C) 2016, OrdaSoft
   * @license    http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License v2 or later
   * @author      AUTHOR <www.ordasoft.com>
   * igor is distributed under the terms of the GNU GPL
*/
  $sidebar_left = false;
if (is_active_sidebar( 'sidebar_left' ) ) {
    $sidebar_left = true;
}

igor_header();
?>
<div id="single" class="single-main">
    <div class="single-content container-fluid">

        <div class="row">
            <?php if (is_active_sidebar( 'sidebar_left' ) ) : ?>
            <div class="widgets col-lg-3 col-md-3 col-sm-4 col-xs-12">
                <article id="sidebar-left" class="sidebar">
                    <?php  dynamic_sidebar('sidebar_left'); ?>
                </article>
            </div>
            <?php endif; ?>

            <div class="<?php if($sidebar_left) :
                echo ('col-lg-9 col-md-9 col-sm-8 col-xs-12');
                else :
                echo('col-lg-12 col-md-12 col-sm-12 col-xs-12');
                endif; ?>">
                    <?php if ( have_posts() ) : ?>
                    <?php while ( have_posts() ) : the_post();  ?>
                        <?php   get_template_part( 'template-parts/content', get_post_format() );

                        endwhile; ?>
                    <?php if ( comments_open() || get_comments_number() ) {
                        comments_template();
                            } ?>
                    <?php igor_post_nav();

                     else :

                        get_template_part( 'template-parts/content', 'none' );

                     endif; ?>
            </div>

        </div>

    </div>
</div><!-- #main -->
<?php get_footer(); ?>