<?php 
/**
 * The template for displaying Home Page Main(Blog Main).
 * @package New BlogBell
 */
$enabled_sections = new_blogbell_get_sections();
$homepage_design_layout     = new_blogbell_get_option( 'homepage_design_layout_options' );
if ($homepage_design_layout == 'home-main'): ?>
    <?php
        if( is_array( $enabled_sections ) ) { 
            foreach( $enabled_sections as $section ) { ?>
                <?php if( $section['id'] == 'slider' ) { ?>
                    <?php $disable_slider_section = new_blogbell_get_option( 'disable_slider_section' );
                    $slider_lite_dark_bg = new_blogbell_get_option( 'slider_lite_dark_background' );
                    if( true ==$disable_slider_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section <?php echo esc_attr($slider_lite_dark_bg) ?>">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'highlights' ) { ?>
                    <?php $disable_highlights_section = new_blogbell_get_option( 'disable_highlights_section' );
                    $highlights_lite_dark_bg = new_blogbell_get_option( 'highlights_lite_dark_background' );
                    if( true ==$disable_highlights_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section <?php echo esc_attr($highlights_lite_dark_bg) ?>">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'recent' ) { ?>
                    <?php $disable_recent_section = new_blogbell_get_option( 'disable_recent_section' ); 
                    $recent_lite_dark_background = new_blogbell_get_option( 'recent_lite_dark_background' );
                    if( true ==$disable_recent_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section <?php echo esc_attr($recent_lite_dark_background) ?>">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'popular' ) { ?>
                    <?php $disable_popular_section = new_blogbell_get_option( 'disable_popular_section' );
                    if( true ==$disable_popular_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'editorpick' ) { ?>
                    <?php $disable_editorpick_section = new_blogbell_get_option( 'disable_editorpick_section' );
                    if( true ==$disable_editorpick_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'categorynews' ) { ?>
                        <?php $disable_categorynews_section = new_blogbell_get_option( 'disable_categorynews_section' );
                         if( true ==$disable_categorynews_section): ?>
                            <?php   $number_of_categorynews_column = new_blogbell_get_option('number_of_categorynews_column'); ?>
                            <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section col-<?php echo esc_attr($number_of_categorynews_column); ?>">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </section>
                    <?php endif; ?>
                <?php } elseif( $section['id'] == 'trending' ) { ?>
                    <?php $disable_trending_section = new_blogbell_get_option( 'disable_trending_section' );
                    if( true ==$disable_trending_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'gallery' ) { ?>
                    <?php $disable_gallery_section = new_blogbell_get_option( 'disable_gallery_section' );
                    $gallery_lite_dark_background = new_blogbell_get_option( 'gallery_lite_dark_background' );
                    if( true ==$disable_gallery_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section <?php echo esc_attr($gallery_lite_dark_background) ?>">
                            
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            
                        </section> 
                <?php endif; ?>
                <?php } elseif( $section['id'] == 'featuredpost' ) { ?>
                    <?php $disable_featuredpost_section = new_blogbell_get_option( 'disable_featuredpost_section' );
                    $featuredpost_lite_dark_background = new_blogbell_get_option( 'featuredpost_lite_dark_background' );
                    if( true ==$disable_featuredpost_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] ); ?>" class="relative page-section <?php echo esc_attr($featuredpost_lite_dark_background) ?>">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section> 
                <?php endif; ?> 
                <?php } elseif( $section['id'] == 'shopproduct' ) { ?>
                    <?php $disable_shopproduct_section = new_blogbell_get_option( 'disable_shopproduct_section' );
                    if( true ==$disable_shopproduct_section): ?>
                        <section id="<?php echo esc_attr( $section['id'] );  ?>" class="relative page-section" >   
                            
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            
                        </section>
                <?php endif; ?> 
                <?php } elseif( $section['id'] == 'fixheight' ) { ?>
                    <?php $disable_fixheight_section = new_blogbell_get_option( 'disable_fixheight_section' );
                    if( true ==$disable_fixheight_section): 
                         $background_fixheight_section = new_blogbell_get_option( 'background_fixheight_section' );?>
                        <section id="<?php echo esc_attr( $section['id'] );  ?>" class="relative page-section">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section>
                <?php endif; ?>   
                <?php } elseif( $section['id'] == 'mustread' ) { ?>
                    <?php $disable_mustread_section = new_blogbell_get_option( 'disable_mustread_section' );
                    if( true ==$disable_mustread_section): 
                         $background_contact_section = new_blogbell_get_option( 'background_contact_section' );?>
                        <section id="<?php echo esc_attr( $section['id'] );  ?>" class="relative page-section">
                            <div class="wrapper">
                                <?php get_template_part( 'inc/sections/section', esc_attr( $section['id'] ) ); ?>
                            </div>
                        </section>
                <?php endif; ?> 
                <?php } ?>
            <?php } ?>
        <?php } ?>
<?php endif ?>