<?php

/*

  type: layout

  name: Heading Slider

  description: Heading Slider


*/

?>
<?php if (isset($slide['primaryText'])) {
    $primaryText = $slide['primaryText'];

}
if (isset($slide['secondaryText'])) {
    $secondaryText = $slide['secondaryText'];

}
if (isset($slide['url'])) {
    $url = $slide['url'];
} else {
    $url = 'javascript:;';
}
?>

<style>
    .bxSlider-heading .bx-wrapper {
        border: 0;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
        background: transparent;
        margin-bottom: 0;
    }

    .bxSlider-heading .bx-wrapper .bx-pager {
        text-align: center;
        font-size: .85em;
        font-family: Arial;
        font-weight: bold;
        color: #666;
        bottom: 40px;
    }

    .bxSlider-heading .bx-wrapper .bx-pager.bx-default-pager a {
        background: #fff;
        border: 2px solid #fff;
        width: 13px;
        height: 13px;
        -webkit-border-radius: 100%;
        -moz-border-radius: 100%;
        border-radius: 100%;
    }

    .bxSlider-heading .bx-wrapper .bx-pager.bx-default-pager a.active {
        background: transparent;
    }

    .bxSlider-heading .bx-wrapper .bx-controls-direction a {
        background: none;
        font-size: 0;
        text-indent: 0 !important;
        text-decoration: none !important;
        border: 2px solid #fff;
        height: 50px;
        width: 50px;
        display: flex;
        align-items: center;
        align-content: center;
        text-align: center;
    }

    .bxSlider-heading .bx-wrapper .bx-controls-direction a:before {
        font-family: FontAwesome;
        color: #fff;
        display: block;
        font-size: 20px;
        margin: 0 auto;
    }

    .bxSlider-heading .bx-wrapper .bx-controls-direction a.bx-next {
        right: 5%;
    }

    .bxSlider-heading .bx-wrapper .bx-controls-direction a.bx-next:before {
        content: '\f054';
    }

    .bxSlider-heading .bx-wrapper .bx-controls-direction a.bx-prev {
        left: 5%;
    }

    .bxSlider-heading .bx-wrapper .bx-controls-direction a.bx-prev:before {
        content: '\f053';
    }
</style>

<div class="bxSlider-heading">
    <div class="bxSlider">
        <?php foreach ($data as $slide) { ?>
            <a href="<?php print $url; ?>">
                <section class="section-6 d-flex background-image-holder" style="background-image: url('<?php if (isset($slide['images'][0])) { ?><?php print thumbnail($slide['images'][0], 1920, 1920); ?><?php } ?>');">
                    <div class="container align-self-end  p-t-10 p-b-100 ">
                        <div class="row">
                            <div class="col-12">
                                <div class="info-holder">
                                    <h2 class="fx-deactivate"><?php echo $primaryText; ?></h2>
                                    <p class="fx-deactivate"><?php echo $secondaryText; ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </a>
        <?php } ?>
    </div>
</div>