<!-- Gallery -->
<!-- Content -->
<div id="top"></div>
<div id="content"> 

    <!-- BLOG -->
    <section id="blog" class="blog padding-top-80 padding-bottom-80"> 
        <!-- TITTLE -->
        <div class="container"> 
            <!-- MAIN HEADING -->
            <div class="heading-block style-4 text-center margin-bottom-50 animate fadeInUp" data-wow-delay="0.4s">
                <h2>Galerie</h2>
            </div>
            <?php if (!$gallery) { ?>
                <div class="row">
                    <br><br><br><br>
                    <h2>Aucune galerie disponible pour le moment.</h2>
                    <br><br><br><br><br><br><br><br><br><br><br><br>
                </div>

            <?php } else { ?>
                <input type='hidden' id='current_page' />
                <input type='hidden' id='show_per_page' />
                <div class="row" id="album"> 
                    <?php
                    foreach ($gallery as $album) {
                        ?>
                        <!-- BLOG POST -->
                        <div class="col-md-4 animate fadeInLeft" data-wow-delay="0.4s">
                            <article class="blog-post">
                                <div class="post-img"><figure class="effect-apollo"> <a href="<?= site_url('galerie/album/' . $album['id'] . '-' . $album['title']) ?>" ><img src="<?= $album['image']['full_url_path'] ?>" alt="Ferchichi Seifeddine : <?= $album['title'] ?>"> </a></figure></div>

                                <!-- BLOG DETAIL --> 
                                <a href="<?= site_url('galerie/album/' . $album['id'] . '-' . $album['title']) ?>" class="tittle-post"> <?= $album['title'] ?> <div class="fb-like" data-href="<?= site_url('galerie/album/' . $album['id'] . '-' . $album['title']) ?>" data-layout="button_count" data-action="like" data-size="small" data-show-faces="true" data-share="false"></div></a> 
                                <ul class="post-info">
                                    <li><i class="fa fa-camera-retro" aria-hidden="true"></i> Par <span class="text-color-primary">F.Seif</span> </li>
                                    <li> <i class="fa fa-map-marker"></i><?= $album['address'] ?> </li>
                                    <li> <span class="date font-crimson"><?= date('d', strtotime($album['date'])); ?> <?= $months[date('n', strtotime($album['date']))] ?></span> </li>
                                </ul>
                                <p class="desc-album"><?= substr($album['description'], 0, 95) . '...' ?></p>
                                <a href="<?= site_url('galerie/album/' . $album['id'] . '-' . $album['title']) ?>" class="btn gray-border margin-top-10 text-normal">voir l'album</a> </article>
                        </div>
                        <?php
                    }
                    ?>
                </div>
                <!--======= PAGINATION =========-->
                <div id='page_navigation' class="pagination"></div>
            <?php } ?>
        </div>
        
    </section>

</div>

<!-- End Content --> 

