<?php
require_once "common/front_header.php";

require_once "include/db_handler.php";
$db = new DbHandler();
?>

<link rel="stylesheet" type="text/css" href="front_assets/css/elastislide.css"/>
<link rel="stylesheet" type="text/css" href="front_assets/css/custom.css"/>
<script src="front_assets/js/modernizr.custom.17475.js"></script>

<section>
    <div class="">
        <img src="assets/img/woman.jpg" alt="" class="img-fluid">
    </div>
</section>
<section>

    <?php
    $query = "SELECT * FROM tbl_about ORDER By id DESC LIMIT 1";
    $response = $db->getAboutMe($query);
    ?>

    <div class="container">
        <div class="row">
            <div class="col-12 col-md-12">
                <div class="titles py-4">About Queenter</div>
                <?php foreach ($response as $about) : ?>
                    <p class="card-text">
                        <?php echo $about['description']; ?>
                    </p>
                <?php endforeach; ?>
            </div>
            <!--<div class="col-12 col-md-4 mt-5">
                <div class="card">
                    <img src="images/inspiration.jpg" class="card-img-top" alt="...">
                    <div class="card-body">
                        <div class="titles py-4">Direction</div>
                        <p class="card-text">"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
                            tempor incididunt ut labore et dolore magna aliqua. </p>
                    </div>
                </div>
            </div>
            <div class="col-12 col-md-4 mt-5">
                <div class="card">
                    <img src="images/inspiration.jpg" class="card-img-top" alt="...">
                    <div class="card-body">
                        <div class="titles py-4">Direction</div>
                        <p class="card-text">"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
                            tempor incididunt ut labore et dolore magna aliqua. </p>
                    </div>
                </div>
            </div>
            <div class="col-12 col-md-4 mt-5">
                <div class="card">
                    <img src="images/inspiration.jpg" class="card-img-top" alt="...">
                    <div class="card-body">
                        <div class="titles py-4">Goal</div>
                        <p class="card-text">"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
                            tempor incididunt ut labore et dolore magna aliqua. </p>
                    </div>
                </div>
            </div>-->
        </div>
    </div>
</section>
<section>
    <div class="container">
        <div class="row">
            <div class="col-12 col-md-12 mt-5">
                <div class="titles py-4">Gallery</div>
                <div class="fixed-bar">
                    <?php
                    $query = "SELECT * FROM tbl_images ORDER BY dateCreated DESC LIMIT 18";
                    $response = $db->getAllGalleries($query);
                    ?>

                    <!-- Elastislide Carousel -->
                    <ul id="carousel" class="elastislide-list">
                        <?php foreach ($response as $event) : ?>
                            <li><a href="front_assets/img/gallery/<?php echo $event['image1']; ?>"><img
                                            src="front_assets/img/gallery/<?php echo $event['image1']; ?>"
                                            alt="image01"/></a></li>
                            <li><a href="front_assets/img/gallery/<?php echo $event['image2']; ?>"><img
                                            src="front_assets/img/gallery/<?php echo $event['image2']; ?>"
                                            alt="image01"/></a></li>
                            <li><a href="front_assets/img/gallery/<?php echo $event['image3']; ?>"><img
                                            src="front_assets/img/gallery/<?php echo $event['image3']; ?>"
                                            alt="image01"/></a></li>
                            <li><a href="front_assets/img/gallery/<?php echo $event['image4']; ?>"><img
                                            src="front_assets/img/gallery/<?php echo $event['image4']; ?>"
                                            alt="image01"/></a></li>
                            <li><a href="front_assets/img/gallery/<?php echo $event['image5']; ?>"><img
                                            src="front_assets/img/gallery/<?php echo $event['image5']; ?>"
                                            alt="image01"/></a></li>
                            <li><a href="front_assets/img/gallery/<?php echo $event['image6']; ?>"><img
                                            src="front_assets/img/gallery/<?php echo $event['image6']; ?>"
                                            alt="image01"/></a></li>
                        <?php endforeach; ?>
                    </ul>
                    <!-- End Elastislide Carousel -->
                </div>
            </div>
        </div>
</section>

<?php
require_once "common/front_footer.php";
?>


<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
        crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
        integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
        crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
        integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
        crossorigin="anonymous"></script>
<script type="text/javascript" src="front_assets/js/jquerypp.custom.js"></script>
<script type="text/javascript" src="front_assets/js/jquery.elastislide.js"></script>
<script type="text/javascript">

    $('#carousel').elastislide({
        minItems: 2
    });

</script>
<script>
    $(function () {
        var nua = navigator.userAgent
        var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
        if (isAndroid) {
            $('select.form-control').removeClass('form-control').css('width', '100%')
        }
    })
</script>
</body>
</html>