<?php
/**
 * Template Name: Home Page
 */

get_header();
?>

    <?php 
    $pizza_parlor_main_slider_wrap = absint(get_theme_mod('pizza_parlor_enable_slider', 0));
    if($pizza_parlor_main_slider_wrap == 1){ 
    ?>

    <section id="main-slider-wrap">
        <div class="owl-carousel">
            <?php for ($pizza_parlor_i=1; $pizza_parlor_i <= 3; $pizza_parlor_i++) { ?>
                <?php if ( get_theme_mod('pizza_parlor_slider_image'.$pizza_parlor_i) ||  get_theme_mod('pizza_parlor_slider_short_heading'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_heading'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_text'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button1_text'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button1_link'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button2_link'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button2_text'.$pizza_parlor_i) ) : ?>
                    <div class="main-slider-inner-box">
                        <?php if ( get_theme_mod('pizza_parlor_slider_image'.$pizza_parlor_i) ) : ?>
                            <img src="<?php echo esc_url( get_theme_mod('pizza_parlor_slider_image'.$pizza_parlor_i) ); ?>">
                        <?php else : ?>
                            <div class="image-box"></div>
                        <?php endif; ?>
                        <?php if ( get_theme_mod('pizza_parlor_slider_short_heading'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_heading'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_text'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button1_text'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button1_link'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button2_link'.$pizza_parlor_i) || get_theme_mod('pizza_parlor_slider_button2_text'.$pizza_parlor_i) ) : ?>
                            <div class="main-slider-content-box">
                                <div class="slider-content">
                                    <?php if ( get_theme_mod('pizza_parlor_slider_short_heading'.$pizza_parlor_i) ) : ?><h4><?php echo esc_html( get_theme_mod('pizza_parlor_slider_short_heading'.$pizza_parlor_i) ); ?></h4><?php endif; ?>
                                    <?php if ( get_theme_mod('pizza_parlor_slider_heading'.$pizza_parlor_i) ) : ?><h3><?php echo esc_html( get_theme_mod('pizza_parlor_slider_heading'.$pizza_parlor_i) ); ?></h3><?php endif; ?>
                                </div>
                                <?php if ( get_theme_mod('pizza_parlor_slider_text'.$pizza_parlor_i) ) : ?><h6><?php echo esc_html( get_theme_mod('pizza_parlor_slider_text'.$pizza_parlor_i) ); ?></h6><?php endif; ?>
                                <div class="main-slider-button">
                                    <?php if ( get_theme_mod('pizza_parlor_slider_button1_link'.$pizza_parlor_i) ||  get_theme_mod('pizza_parlor_slider_button1_text'.$pizza_parlor_i )) : ?><a href="<?php echo esc_url( get_theme_mod('pizza_parlor_slider_button1_link'.$pizza_parlor_i) ); ?>"><?php echo esc_html( get_theme_mod('pizza_parlor_slider_button1_text'.$pizza_parlor_i) ); ?></a><?php endif; ?>
                                </div>
                            </div>
                        <?php endif; ?>
                    </div>
                <?php endif; ?>
            <?php } ?>
        </div>
    </section>

    <?php } ?>

    <?php 
    $pizza_parlor_main_expert_wrap = absint(get_theme_mod('pizza_parlor_enable_project', 0));
    if($pizza_parlor_main_expert_wrap == 1){ 
    ?>
    <div id="primary">
        <section id="main-expert-wrap">
            <div class="container">
                <div class="flex-row">
                    <div class="tabs">
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab1') ) : ?><div class="tab text-green-600" data-tab="tab1"><?php if ( get_theme_mod('pizza_parlor_project_image_tab1') ) : ?><img src="<?php echo esc_url( get_theme_mod('pizza_parlor_project_image_tab1') ); ?>"><?php endif; ?></div><?php endif; ?>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab2') ) : ?><div class="tab text-green-600" data-tab="tab2"><?php if ( get_theme_mod('pizza_parlor_project_image_tab2') ) : ?><img src="<?php echo esc_url( get_theme_mod('pizza_parlor_project_image_tab2') ); ?>"><?php endif; ?></div><?php endif; ?>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab3') ) : ?><div class="tab text-green-600" data-tab="tab3"><?php if ( get_theme_mod('pizza_parlor_project_image_tab3') ) : ?><img src="<?php echo esc_url( get_theme_mod('pizza_parlor_project_image_tab3') ); ?>"><?php endif; ?></div><?php endif; ?>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab4') ) : ?><div class="tab text-green-600" data-tab="tab4"><?php if ( get_theme_mod('pizza_parlor_project_image_tab4') ) : ?><img src="<?php echo esc_url( get_theme_mod('pizza_parlor_project_image_tab4') ); ?>"><?php endif; ?></div><?php endif; ?>
                    </div>
                    <div class="content-box">
                        <div class="main-expert-heading">
                            <?php if ( get_theme_mod('pizza_parlor_project_short_heading') ) : ?><h4><?php echo esc_html( get_theme_mod('pizza_parlor_project_short_heading') ); ?></h4><?php endif; ?>
                            <?php if ( get_theme_mod('pizza_parlor_project_heading') ) : ?><h3><?php echo esc_html( get_theme_mod('pizza_parlor_project_heading') ); ?></h3><?php endif; ?>
                        </div>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab1') ) { ?>
                        <div id="tab1" class="content"> 
                            <div class="tab-content mt-4">
                                <div class="rel-post-wrapp">
                                    <div class="box rel-card-item">
                                        <div class="box-content">
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_heading_tab1') ) : ?><h4><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_heading_tab1') ); ?></h4><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_designation_tab1') ) : ?><h6><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_designation_tab1') ); ?></h6><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_text_tab1') ) : ?><p><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_text_tab1') ); ?></p><?php endif; ?>
                                            <div class="social-links">
                                                <?php
                                                    pizza_parlor_social_menu();
                                                ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php } ?>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab2') ) { ?>
                        <div id="tab2" class="content">
                            <div class="tab-content mt-4">
                                 <div class="rel-post-wrapp">
                                    <div class="box rel-card-item">
                                        <div class="box-content">
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_heading_tab2') ) : ?><h4><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_heading_tab2') ); ?></h4><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_designation_tab2') ) : ?><h6><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_designation_tab2') ); ?></h6><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_text_tab2') ) : ?><p class="text"><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_text_tab2') ); ?></p><?php endif; ?>
                                            <div class="social-links">
                                                <?php
                                                    pizza_parlor_social_menu_1();
                                                ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php } ?>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab3') ) { ?>
                        <div id="tab3" class="content">
                            <div class="tab-content mt-4">
                                 <div class="rel-post-wrapp">
                                    <div class="box rel-card-item">
                                        <div class="box-content">
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_heading_tab_3') ) : ?><h4><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_heading_tab_3') ); ?></h4><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_designation_tab_3') ) : ?><h6><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_designation_tab_3') ); ?></h6><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_text_tab_3') ) : ?><p class="text"><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_text_tab_3') ); ?></p><?php endif; ?>
                                            <div class="social-links">
                                                <?php
                                                    pizza_parlor_social_menu_2();
                                                ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php } ?>
                        <?php if ( get_theme_mod('pizza_parlor_project_image_tab4') ) { ?>
                        <div id="tab4" class="content">
                            <div class="tab-content mt-4">
                                 <div class="rel-post-wrapp">
                                    <div class="box rel-card-item">
                                        <div class="box-content">
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_heading_tab_4') ) : ?><h4><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_heading_tab_4') ); ?></h4><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_designation_tab_4') ) : ?><h6><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_designation_tab_4') ); ?></h6><?php endif; ?>
                                            <?php if ( get_theme_mod('pizza_parlor_project_box_text_tab_4') ) : ?><p class="text"><?php echo esc_html( get_theme_mod('pizza_parlor_project_box_text_tab_4') ); ?></p><?php endif; ?>
                                            <div class="social-links">
                                                <?php
                                                    pizza_parlor_social_menu_3();
                                                ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <?php } ?>

<?php
get_footer();