<?php
/**
 * Template Name: Custom Home Page
 */
get_header();

?>
<!-- banner section -->
<main id="maincontent" role="main">
  <?php if(get_theme_mod('vw_bakers_show_hide_banner',true) || get_theme_mod('vw_bakers_responsive_banner_hide',true)) { ?>
    <section id="banner" class="position-relative wow bounceInDown delay-1000 mb-5" data-wow-duration="3s">
      <div class="container">
        <div class="row">
          <div class="col-xl-6 col-lg-6 col-md-6 col-12 align-self-center">
            <div class="inner_carousel text-start">
              <div class="banner-content">
                <div class="position-relative">
                  <?php if(get_theme_mod('vw_bakers_banner_small_text') != '') {?>
                    <p class="small-title text-capitalize mb-1 ms-2"><?php echo esc_html(get_theme_mod('vw_bakers_banner_small_text')) ?></p>
                  <?php }?>
                </div>
                <?php if(get_theme_mod('vw_bakers_banner_title') != '') {?>
                  <h1 class="banner-title mb-3 text-capitalize"><?php echo esc_html(get_theme_mod('vw_bakers_banner_title')) ?></h1>
                <?php }?>
                <?php if(get_theme_mod('vw_bakers_banner_para_text') != '') {?>
                  <p class="banner-para"><?php echo esc_html(get_theme_mod('vw_bakers_banner_para_text')) ?></p>
                <?php }?>
                <?php if ( get_theme_mod('vw_bakers_shop_button_label') != '' ) {?>
                  <div class ="shop-btn mt-4">
                    <a href="<?php echo esc_url(get_theme_mod('vw_bakers_shop_button_url',false));?>" class="text-capitalize"><?php echo esc_html(get_theme_mod('vw_bakers_shop_button_label'));?><span class="screen-reader-text"><?php echo esc_html(get_theme_mod('vw_bakers_shop_button_label'));?></span>
                    </a>
                  </div>
                <?php }?>
              </div>
            </div>
          </div>
          <div class="col-xl-6 col-lg-6 col-md-6 col-12 align-self-center">
            <div class="featured-images-wrapper">
              <?php for ($vw_bakers_j = 1; $vw_bakers_j <= 3; $vw_bakers_j++) { ?>
                <?php if ( get_theme_mod('vw_bakers_featured_image_sec' . $vw_bakers_j) != '' ) {?>
                  <img class="featured-img" src="<?php echo esc_url(get_theme_mod('vw_bakers_featured_image_sec' . $vw_bakers_j)); ?>" alt="" title="#slidecaption">
                <?php }?>
              <?php } ?>
            </div>
          </div>
        </div>
      </div>
      <div class="clearfix"></div>
    </section>
  <?php }?>
  <?php do_action( 'vw_bakers_after_banner' ); ?>

  <!-- Our Chefs Section -->
  <?php if (get_theme_mod('vw_bakers_hide_show_chefs_section', true)) {?>
    <section id="chefs-section" class="py-5 wow bounceInRight delay-1000" data-wow-duration="3s">
      <div class="container">
        <div class="about-text text-left mb-5">
          <div class="row">
            <div class="col-xl-9 col-lg-9 col-md-8 col-12 align-self-center">
              <?php if(get_theme_mod('vw_bakers_section_text') != ''){ ?>
                <p class="chefs-text mb-1 text-capitalize"><?php echo esc_html(get_theme_mod('vw_bakers_section_text')); ?></p>
              <?php } ?>
              <?php if(get_theme_mod('vw_bakers_section_heading') != ''){ ?>
                <h2 class="chefs-title text-capitalize mb-3"><?php echo esc_html(get_theme_mod('vw_bakers_section_heading')); ?></h2>
              <?php } ?>
            </div>
          </div>
        </div>
        <div class="row">
          <?php for ($vw_bakers_i = 1; $vw_bakers_i <= 4; $vw_bakers_i++) { ?>
            <div class="col-xl-3 col-lg-3 col-md-6 col-sm-6 col-12 text-center mb-5 pb-3">
              <?php if ( get_theme_mod('vw_bakers_chefs_image_sec' . $vw_bakers_i) != '' ) {?>
                <div class="chef-box position-relative">
                  <img class="chefs-img" src="<?php echo esc_url(get_theme_mod('vw_bakers_chefs_image_sec'. $vw_bakers_i)); ?>" alt="" title="#chefs">
                </div>
              <?php } ?>
              <?php if (get_theme_mod('vw_bakers_chefs_name' . $vw_bakers_i) != '') { ?>
                <p class="chefs-text mb-1 mt-2 text-capitalize"><?php echo esc_html(get_theme_mod('vw_bakers_chefs_name'. $vw_bakers_i)); ?></p>
              <?php } ?>
              <div class="social-icons mt-2">
                <?php if ( is_active_sidebar( 'social-widget-' . $vw_bakers_i ) ) : ?>
                  <?php dynamic_sidebar('social-widget-' . $vw_bakers_i); ?>
                <?php endif; ?>
              </div>
            </div>
          <?php } ?>
        </div>
      </div>
    </section>
  <?php }?>

  <div id="content-vw" class="entry-content">
    <div class="container">
      <?php while (have_posts()) : the_post(); ?>
        <?php the_content(); ?>
      <?php endwhile; // end of the loop. 
      ?>
    </div>
  </div>
</main>

<?php get_footer(); ?> 