<?php

/**
 * @package dance-studio-lite
 */
get_header();
$dance_studio_lite_custom_sidebar_homepage_layout = get_theme_mod('dance_studio_lite_custom_sidebar_homepage_layout', 'singleleft');
$csscovers = 'col-md-8 col-lg-8 col-sm-12';
?>

<style>
<?php

    if( $dance_studio_lite_custom_sidebar_homepage_layout == 'singleright' && (is_home() || is_front_page())){
        echo '#sidebar { float:right !important; }'; 
    }
?>
</style>


<?php 
    if($dance_studio_lite_custom_sidebar_homepage_layout == 'sitefull' && (is_home() || is_front_page())){
        $csscovers = "col-md-12 col-lg-12 col-sm-12";
    }elseif(!is_home() || !is_front_page()) {
        $csscovers = "col-md-8 col-lg-8 col-sm-12";
    }
?>

<div class="container" id="contentdiv">
    <div class="container-fluid page_content row">
    <?php 
        if(($dance_studio_lite_custom_sidebar_homepage_layout != 'nosidebar' && $dance_studio_lite_custom_sidebar_homepage_layout != 'sitefull') && (is_home() || is_front_page())){
           ?>
           <div class="col-md-4 col-lg-4 col-sm-12" id="sidebar">
                <?php get_sidebar(); ?>
            </div><!--col-md-4-->
           <?php
        }elseif(!is_home() || !is_front_page()) {
            ?>
            <div class="col-md-4 col-lg-4 col-sm-12" id="sidebar">
                 <?php get_sidebar(); ?>
             </div><!--col-md-4-->
            <?php
        } 
    ?>
        
        <div class="site-main  <?php echo esc_attr($csscovers); ?>">
            <div class="blog-post">
                <?php
                if (have_posts()) :

                    while (have_posts()) : the_post();
                        get_template_part('template', 'content');
                ?>
                <?php
                    endwhile;
                    the_posts_pagination();
                endif;
                ?>
            </div><!-- blog-post -->
        </div><!--site-main -->
        <div class="clearfix"></div>
    </div><!-- site-aligner -->

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