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

get_header();
?>

<main id="primary">

    <?php if (get_theme_mod('pixel_photography_banner_section_on_off_setting', false)) { ?>
        <section id="main-banner-wrap">
            <div class="row">
                <div class="col-lg-6 col-md-12">
                    <div id="banner-area">
                        <div class="owl-carousel owl-theme">
                            <?php
                                $pixel_photography_banner = get_theme_mod( 'pixel_photography_slider');
                                for ( $i = 1; $i <= $pixel_photography_banner; $i++ ){ ?>
                                <div class="item">
                                    <div class="main-banner-inner-box">
                                        <?php
                                        $pixel_photography_banner_image = get_theme_mod( 'pixel_photography_banner_image'.$i, '' );
                                        if ( ! empty( $pixel_photography_banner_image ) ) { ?>
                                            <img src="<?php echo esc_url( $pixel_photography_banner_image ); ?>">
                                        <?php } ?>
                                    </div>
                                    <div class="main-banner-content-box">
                                        <?php
                                            $pixel_photography_banner_short_heading = get_theme_mod( 'pixel_photography_banner_short_heading'.$i, '' );
                                            if ( ! empty( $pixel_photography_banner_short_heading ) ) { ?>
                                            <p><?php echo esc_html( $pixel_photography_banner_short_heading ); ?></p>
                                        <?php } ?>
                                        <?php
                                            $pixel_photography_banner_heading = get_theme_mod( 'pixel_photography_banner_heading'.$i, '' );
                                            $pixel_photography_banner_button_link = get_theme_mod( 'pixel_photography_banner_button_link'.$i, '' );
                                            if ( ! empty( $pixel_photography_banner_heading ) ) { ?>
                                            <h3><a href="<?php echo esc_url( $pixel_photography_banner_button_link ); ?>"><?php echo esc_html( $pixel_photography_banner_heading ); ?></a></h3>
                                        <?php } ?>
                                    </div>
                                </div>
                            <?php }?>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 col-md-12 scroll-services mt-5 mt-lg-0">
                    <div class="row">
                        <?php
                            $pixel_photography_services = get_theme_mod( 'pixel_photography_services');
                            for ( $i = 1; $i <= $pixel_photography_services; $i++ ){ ?>
                            <div class="col-lg-6 col-md-6">
                                <div class="banner-right-area mb-4">
                                    <?php
                                        $pixel_photography_services_image = get_theme_mod( 'pixel_photography_services_image'.$i, '' );
                                        if ( ! empty( $pixel_photography_services_image ) ) { ?>
                                            <img src="<?php echo esc_url( $pixel_photography_services_image ); ?>">
                                    <?php } ?>
                                    <div class="banner-right-content">
                                        <?php
                                            $pixel_photography_services_date = get_theme_mod( 'pixel_photography_services_date'.$i, '' );
                                            if ( ! empty( $pixel_photography_services_date ) ) { ?>
                                            <p class="mb-0"><?php echo esc_html( $pixel_photography_services_date ); ?></p>
                                        <?php } ?>
                                        <?php
                                            $pixel_photography_services_box_heading = get_theme_mod( 'pixel_photography_services_box_heading'.$i, '' );
                                            $pixel_photography_banner_services_link = get_theme_mod( 'pixel_photography_banner_services_link'.$i, '' );
                                            if ( ! empty( $pixel_photography_services_box_heading ) ) { ?>
                                            <h4 class="mb-0"><a href="<?php echo esc_url( $pixel_photography_banner_services_link ); ?>"><?php echo esc_html( $pixel_photography_services_box_heading ); ?></a></h4>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        <?php }?>
                    </div>
                </div>
            </div>
        </section>
    <?php } ?>

    <?php if (get_theme_mod('pixel_photography_category_section_on_off_setting', false)) { ?>
        <section class="category py-5">
            <div class="container">
                <?php
                    $pixel_photography_category_short_heading = get_theme_mod( 'pixel_photography_category_short_heading', '' );
                    if ( ! empty( $pixel_photography_category_short_heading ) ) { ?>
                    <p class="mb-0 short-heading"><?php echo esc_html( $pixel_photography_category_short_heading ); ?></p>
                <?php } ?>
                <?php
                    $pixel_photography_category_heading = get_theme_mod( 'pixel_photography_category_heading', '' );
                    if ( ! empty( $pixel_photography_category_heading ) ) { ?>
                    <h3><?php echo esc_html( $pixel_photography_category_heading ); ?></h3>
                <?php } ?>
                <div class="row">
                    <?php
                        $pixel_photography_category = get_theme_mod( 'pixel_photography_category');
                        for ( $i = 1; $i <= $pixel_photography_category; $i++ ){ ?>
                        <div class="col-lg-4 col-md-6">
                            <div class="inner-box mb-5">
                                <?php
                                    $pixel_photography_category_image = get_theme_mod( 'pixel_photography_category_image'.$i, '' );
                                    if ( ! empty( $pixel_photography_category_image ) ) { ?>
                                        <img src="<?php echo esc_url( $pixel_photography_category_image ); ?>">
                                <?php } ?>
                                <div class="inner-box-text">
                                    <?php
                                        $pixel_photography_category_box_heading = get_theme_mod( 'pixel_photography_category_box_heading'.$i, '' );
                                        $pixel_photography_banner_category_link = get_theme_mod( 'pixel_photography_banner_category_link'.$i, '#' );
                                        if ( ! empty( $pixel_photography_category_box_heading ) || ! empty( $pixel_photography_banner_category_link ) ) { ?>
                                        <h4 class="mb-0"><a href="<?php echo esc_url( $pixel_photography_banner_category_link ); ?>"><?php echo esc_html( $pixel_photography_category_box_heading ); ?></a></h4>
                                    <?php } ?>
                                </div>
                            </div>
                        </div>
                    <?php }?>
                </div>
        </section>
    <?php } ?>

</main>

<?php
get_footer();