<?php
/*
Template Name: Full-width layout
*/

get_header();
?>
<div class="ct-main-body">
<?php
    if( is_front_page() ) :
        get_template_part( 'template-parts/home/ct', 'slider' );
        get_template_part( 'template-parts/home/ct', 'introduction' );
        get_template_part( 'template-parts/home/ct', 'services' );
        get_template_part( 'template-parts/home/ct', 'team-members' );
        get_template_part( 'template-parts/home/ct', 'features' );
        get_template_part( 'template-parts/home/ct', 'testimonials' );
        get_template_part( 'template-parts/home/ct', 'editor' );

    else :
?>
        <?php
            $prime_business_cols = 'nine';
            if ( !is_active_sidebar( 'prime-business-page-sidebar' ) ) {
                $prime_business_cols = 'twelve';
            }
        ?>

        <div class="u-full-width">
            <div class="row">
                <div class="<?php echo esc_attr( $prime_business_cols ); ?> columns">
                    <?php
                        if ( have_posts() ) {

                            // Load posts loop.
                            while ( have_posts() ) {
                                the_post();
                                get_template_part( 'template-parts/content/content', 'page' );

                                // If comments are open or we have at least one comment, load up the comment template.
                                if ( comments_open() || get_comments_number() ) :
                                    comments_template();
                                endif;
                            }

                        } else {

                            // If no content, include the "No posts found" template.
                            get_template_part( 'template-parts/content/content', 'none' );

                        }
                    ?>
                </div><!-- /.nine columns -->
                <?php get_sidebar(); ?>
            </div><!-- /.row -->
        </div><!-- /.container -->
    <?php endif; ?>
    </div><!-- /.ct-main-body -->
<?php
get_footer();
