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

get_header();
?>

<main id="primary">
    <?php if (get_theme_mod('pixel_charity_nonprofit_banner_section_on_off_setting', false)) { ?>
        <section id="main-banner-wrap" class="py-5">
            <div class="container">
                <div id="banner-area">
                    <div class="main-banner-content-box text-center">
                        <?php
                            $pixel_charity_nonprofit_banner_heading = get_theme_mod( 'pixel_charity_nonprofit_banner_heading', '' );
                            if ( ! empty( $pixel_charity_nonprofit_banner_heading ) ) { ?>
                            <h3 id="myHeading" class="myHeading"><?php echo esc_html( $pixel_charity_nonprofit_banner_heading ); ?></h3>
                        <?php } ?>
                        <?php
                            $pixel_charity_nonprofit_banner_content = get_theme_mod( 'pixel_charity_nonprofit_banner_content', '' );
                            if ( ! empty( $pixel_charity_nonprofit_banner_content ) ) { ?>
                            <p><?php echo esc_html( $pixel_charity_nonprofit_banner_content ); ?></p>
                        <?php } ?>
                        <?php
                            $pixel_charity_nonprofit_banner_btn1 = get_theme_mod( 'pixel_charity_nonprofit_banner_btn1', '' );
                            $pixel_charity_nonprofit_banner_button_link1 = get_theme_mod( 'pixel_charity_nonprofit_banner_button_link1', '' );
                            if ( ! empty( $pixel_charity_nonprofit_banner_btn1 ) ) { ?>
                            <a class="mr-2" href="<?php echo esc_url( $pixel_charity_nonprofit_banner_button_link1 ); ?>"><?php echo esc_html( $pixel_charity_nonprofit_banner_btn1 ); ?><i class="fas fa-arrow-right ml-2"></i></a>
                        <?php } ?>
                        <?php
                            $pixel_charity_nonprofit_banner_btn2 = get_theme_mod( 'pixel_charity_nonprofit_banner_btn2', '' );
                            $pixel_charity_nonprofit_banner_button_link2 = get_theme_mod( 'pixel_charity_nonprofit_banner_button_link2', '' );
                            if ( ! empty( $pixel_charity_nonprofit_banner_btn2 ) ) { ?>
                            <a class="banner_btn2 mt-3 mt-md-0" href="<?php echo esc_url( $pixel_charity_nonprofit_banner_button_link2 ); ?>"><?php echo esc_html( $pixel_charity_nonprofit_banner_btn2 ); ?><i class="fas fa-arrow-right ml-2"></i></a>
                        <?php } ?>
                    </div>
                    <div class="owl-carousel owl-theme">
                        <?php
                            $pixel_charity_nonprofit_banner = get_theme_mod( 'pixel_charity_nonprofit_slider');
                            for ( $i = 1; $i <= $pixel_charity_nonprofit_banner; $i++ ){ ?>
                            <div class="item">
                                <div class="main-banner-inner-box mt-5">
                                    <?php
                                    $pixel_charity_nonprofit_banner_image = get_theme_mod( 'pixel_charity_nonprofit_banner_image'.$i, '' );
                                    if ( ! empty( $pixel_charity_nonprofit_banner_image ) ) { ?>
                                        <img src="<?php echo esc_url( $pixel_charity_nonprofit_banner_image ); ?>">
                                    <?php } ?>
                                </div>
                            </div>
                        <?php }?>
                    </div>
                </div>
            </div>
        </section>
    <?php } ?>

    <?php if (get_theme_mod('pixel_charity_nonprofit_services_section_on_off_setting', false)) { ?>
        <section class="services py-5">
            <div class="container">
                <div class="row">
                    <div class="col-lg-4 col-md-12 align-self-center">
                        <div class="donate-images">
                            <?php
                                $pixel_charity_nonprofit_donate_image_1 = get_theme_mod( 'pixel_charity_nonprofit_donate_image_1', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_image_1 ) ) { ?>
                                    <img class="max-height" src="<?php echo esc_url( $pixel_charity_nonprofit_donate_image_1 ); ?>">
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_image_2 = get_theme_mod( 'pixel_charity_nonprofit_donate_image_2', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_image_2 ) ) { ?>
                                    <img src="<?php echo esc_url( $pixel_charity_nonprofit_donate_image_2 ); ?>">
                            <?php } ?>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-12 align-self-center">
                        <div class="donation-content-box text-center mb-4 mb-md-0 my-md-4">
                            <?php
                                $pixel_charity_nonprofit_donate_heading = get_theme_mod( 'pixel_charity_nonprofit_donate_heading', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_heading ) ) { ?>
                                <h3><?php echo esc_html( $pixel_charity_nonprofit_donate_heading ); ?></h3>
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_extra_heading = get_theme_mod( 'pixel_charity_nonprofit_donate_extra_heading', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_extra_heading ) ) { ?>
                                <h4><?php echo esc_html( $pixel_charity_nonprofit_donate_extra_heading ); ?></h4>
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_location = get_theme_mod( 'pixel_charity_nonprofit_donate_location', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_location ) ) { ?>
                                <p><?php echo esc_html( $pixel_charity_nonprofit_donate_location ); ?></p>
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_timing = get_theme_mod( 'pixel_charity_nonprofit_donate_timing', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_timing ) ) { ?>
                                <p><?php echo esc_html( $pixel_charity_nonprofit_donate_timing ); ?></p>
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_opening = get_theme_mod( 'pixel_charity_nonprofit_donate_opening', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_opening ) ) { ?>
                                <p><?php echo esc_html( $pixel_charity_nonprofit_donate_opening ); ?></p>
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_minimum_donation = get_theme_mod( 'pixel_charity_nonprofit_donate_minimum_donation', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_minimum_donation ) ) { ?>
                                <p><strong><?php esc_html_e('Minimum Donation:','pixel-charity-nonprofit'); ?></strong> <?php echo esc_html( $pixel_charity_nonprofit_donate_minimum_donation ); ?></p>
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_starting_amount = get_theme_mod( 'pixel_charity_nonprofit_donate_starting_amount', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_starting_amount ) ) { ?>
                                <p><strong><?php esc_html_e('For Global Supporters:','pixel-charity-nonprofit'); ?></strong> <?php echo esc_html( $pixel_charity_nonprofit_donate_starting_amount ); ?></p>
                            <?php } ?>
                             <?php
                                $pixel_charity_nonprofit_donate_btn2 = get_theme_mod( 'pixel_charity_nonprofit_donate_btn2', '' );
                                $pixel_charity_nonprofit_donate_button_link2 = get_theme_mod( 'pixel_charity_nonprofit_donate_button_link2', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_btn2 ) ) { ?>
                                <a class="donate_btn2" href="<?php echo esc_url( $pixel_charity_nonprofit_donate_button_link2 ); ?>"><?php echo esc_html( $pixel_charity_nonprofit_donate_btn2 ); ?><i class="fas fa-arrow-right ml-2"></i></a>
                            <?php } ?>
                        </div>
                    </div>
                     <div class="col-lg-4 col-md-12 align-self-center">
                        <div class="donate-images">
                            <?php
                                $pixel_charity_nonprofit_donate_image_3 = get_theme_mod( 'pixel_charity_nonprofit_donate_image_3', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_image_3 ) ) { ?>
                                    <img src="<?php echo esc_url( $pixel_charity_nonprofit_donate_image_3 ); ?>">
                            <?php } ?>
                            <?php
                                $pixel_charity_nonprofit_donate_image_4 = get_theme_mod( 'pixel_charity_nonprofit_donate_image_4', '' );
                                if ( ! empty( $pixel_charity_nonprofit_donate_image_4 ) ) { ?>
                                    <img class="max-height" src="<?php echo esc_url( $pixel_charity_nonprofit_donate_image_4 ); ?>">
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    <?php } ?>
</main>

<?php
get_footer();