<?php echo $__env->make('header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<main id="main-content">
<?php if(!empty($adPlacement)): ?>
    <div class="ad-placement ad-banner">
        <div class="container">
            <?php echo($adPlacement); ?>        </div>
    </div>
<?php endif; ?>
    <div class="navigation">
        <div class="container">
            <a href="javascript:history.back()" class="back-link">&lt; Retour</a>
            <div class="hierarchy">
<?php foreach($hierarchy as $link): ?>
                <a href="<?php echo($link['url']); ?>"><?php echo($link['label']); ?></a>
<?php endforeach; ?>
            </div>
        </div>
    </div>
    <article>
        <div class="container">
            <main class="content col-md-8">
                <h1 class="leaf-title-blue purple"><?php echo($event['title']); ?></h1>
                <div class="article-datas">
<?php if(!empty($event['type'])): ?>
                    <p class="type"><?php echo($event['type']); ?></p>
<?php endif; ?>
<?php if(!empty($event['date'])): ?>
                    <p class="date">
                        <span class="icon-pictos_periode"></span>
                        <?php echo($event['date']); ?>                    </p>
<?php endif; ?>
<?php if(!empty($event['place'])): ?>
                    <p class="place">
                        <span class="icon-pictos_localisation"></span>
                        <?php echo($event['place']); ?>                    </p>
<?php endif; ?>
<?php if(!empty($event['infosAccess'])): ?>
                    <p class="place">
                        <?php echo($event['infosAccess']); ?>                    </p>
<?php endif; ?>
<?php if(!empty($event['category'])): ?>
                    <p class="category" data-color="<?php echo($event['category']['color']); ?>">
                        <a href="<?php echo($event['category']['url']); ?>"><?php echo($event['category']['title']); ?></a>
                    </p>
<?php endif; ?>
                    <div class="social-networks">
                        <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo($event['href']); ?>" target="_blank"><span class="icon-pictos_partageFacebook"></span></a>
                        <a href="https://twitter.com/home?status=<?php echo($event['href']); ?>" target="_blank"><span class="icon-pictos_partageTwitter"></span></a>
                        <a href="https://plus.google.com/share?url=<?php echo($event['href']); ?>" target="_blank"><span class="icon-pictos_partageGoogle"></span></a>
                        <a href="javascript:window.print()"><span class="icon-pictos_imprimer"></span></a>
                    </div>
                </div>
<?php if(!empty($event['img_HTML'])): ?>
                <figure class="hidden-md hidden-lg">
                    <?php echo($event['img_HTML']); ?>
<?php if(!empty($event['img_caption'])): ?>
                    <figcaption><?php echo($event['img_caption']); ?></figcaption>
<?php endif; ?>

<?php if(!empty($event['img_copyright'])): ?>
                    <div class="imgcopyright" style="text-align: right; background-color: #ffffff; font-size: 14px;">
                        <?php echo($event['img_copyright']); ?>                    </div>
<?php endif; ?>
                </figure>
<?php endif; ?>
                <div class="article-content"><?php echo($event['content']); ?></div>
                <div class="show-more hidden-md hidden-lg">
                    <button class="show-more">Lire la suite</button>
                </div>
<?php if(!empty($event['parent'])): ?>
                <div class="parent-event hidden-xs hidden-sm col-sm-12">
                    <div class="row">
                        <div class="parent-label">Cet événement est au programme de</div>
<?php if(!empty($event['parent']['img_HTML'])): ?>
                        <figure class="frieze-rounded-white-right">
                            <a class="row">
                                <?php echo($event['parent']['img_HTML']); ?>                            </a>
                        </figure>
<?php endif; ?>
                        <div class="parent-content">
                            <p class="type"><?php echo($event['parent']['type']); ?></p>
                            <h2><a href="<?php echo($event['parent']['href']); ?>"><?php echo($event['parent']['title']); ?></a></h2>
                            <p class="date"><?php echo($event['parent']['date']); ?></p>
                            <p class="content"><?php echo($event['parent']['content']); ?></p>
                        </div>
                    </div>
                </div>
<?php endif; ?>
            </main>
            <aside class="col-md-4">
                <figure class="hidden-xs hidden-sm frieze-rounded-white-left">
                    <?php echo($event['img_HTML']); ?>
<?php if(!empty($event['img_caption'])): ?>
                    <figcaption><?php echo($event['img_caption']); ?></figcaption>
<?php endif; ?>

<?php if(!empty($event['img_copyright'])): ?>
                    <div class="imgcopyright" style="text-align: right; background-color: #ffffff; font-size: 14px;">
                        <?php echo($event['img_copyright']); ?>                    </div>
<?php endif; ?>
                </figure>
<?php if(!empty($event['infos'])): ?>
                <div class="practical-infos col-xs-12">
                    <h1 class="leaf-title-white white hidden-xs">Infos pratiques</h1>
                    <div class="links">
<?php foreach($event['infos'] as $aInfo): ?>
<?php if($aInfo['type'] === 'phone'): ?>
                        <a href="tel:<?php echo($aInfo['value']); ?>" class="phone">
                            <span class="label hidden-md hidden-lg">Appeler</span>
                            <span class="icon-pictos_telephone"></span><?php echo($aInfo['value']); ?>                        </a>
<?php endif; ?>
<?php if($aInfo['type'] === 'fax'): ?>
                        <a href="tel:<?php echo($aInfo['value']); ?>" class="phone">
                            <span class="label hidden-md hidden-lg">Fax</span>
                            <span class="icon-pictos_fax"></span><?php echo($aInfo['value']); ?>                        </a>
<?php endif; ?>
<?php if($aInfo['type'] === 'mobile'): ?>
                        <a href="tel:<?php echo($aInfo['value']); ?>" class="mobile">
                            <span class="label hidden-md hidden-lg">Appeler</span>
                            <span class="icon-pictos_mobile"></span><?php echo($aInfo['value']); ?>                        </a>
<?php endif; ?>
<?php if($aInfo['type'] === 'mail'): ?>
                        <a href="mailto:<?php echo($aInfo['value']); ?>" class="mail">
                            <span class="label hidden-md hidden-lg">Contacter par mail</span>
                            <span class="icon-pictos_mail"></span><?php echo($aInfo['value']); ?>                        </a>
<?php endif; ?>
<?php if($aInfo['type'] === 'url'): ?>
                        <a href="<?php echo($aInfo['value']); ?>" target="_blank" class="website">
                            <span class="label hidden-md hidden-lg">Visiter le site web</span>
                            <span class="icon-pictos_web"></span><?php echo($aInfo['value']); ?>                        </a>
<?php endif; ?>
<?php endforeach; ?>
<?php if(!empty($event['place'])): ?>
<?php if(!empty($event['maps'])): ?>
                        <a href="https://www.google.com/maps/search/?api=1&query=<?php echo($event['maps']['lat']); ?>+<?php echo($event['maps']['lng']); ?>" target="_blank" class="maps hidden-md hidden-lg">
                            <span class="label hidden-md hidden-lg">Afficher sur Google Map</span>
                            <span class="icon-pictos_localisation"></span><?php echo($event['place']); ?>                        </a>
<?php endif; ?>
<?php endif; ?>
                    </div>
                </div>
<?php endif; ?>
<?php if(!empty($event['ad-placement'])): ?>
                <div class="ad-placement ad-banner col-xs-12">
                    <?php echo($event['ad-placement']); ?>                </div>
<?php endif; ?>
            </aside>
        </div>
<?php if(!empty($event['maps'])): ?>
        <section class="map-location" id="map-location">
            <div id="map"></div>
            <script>
                var aCenter = {
                    lat: <?php echo($event['maps']['lat']); ?>,
                    lng: <?php echo($event['maps']['lng']); ?>,
                }
            </script>
            <script sync defer
                    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBZuHgq7w0kPEc2mEXoULwpRGhF1kWaiqI&callback=initMapSingleEvenement">
            </script>
        </section>
<?php endif; ?>
    </article>
<?php if(!empty($discoverNow['events'])): ?>
    <section class="discover-now discover-near frieze-separator-purple-top">
        <div class="container">
            <h1 class="leaf-title-blue white">à découvrir à proximité</h1>
            <div class="event-container row js_draggable">
<?php foreach($discoverNow['events'] as $aEvent): ?>
                <article class="col-md-3">
                    <div>
                        <figure>
                            <a href="<?php echo($aEvent['href']); ?>">
                                <?php echo($aEvent['img_HTML']); ?>                            </a>
                        </figure>
                        <div class="event-infos frieze-rounded-white-top">
                            <?php if(!empty($aEvent['type'])): ?>
                                    <p class="type"><?php echo($aEvent['type']); ?></p>
<?php endif; ?>
                                    <h1><a href="<?php echo($aEvent['href']); ?>"><?php echo($aEvent['title']); ?></a></h1>
<?php if(!empty($aEvent['date'])): ?>
                                    <p class="date"><?php echo($aEvent['date']); ?></p>
<?php endif; ?>
<?php if(!empty($aEvent['category']['title'])): ?>
                                    <p class="category" data-color="<?php echo($aEvent['category']['color']); ?>">
                                        <a href="<?php echo($aEvent['category']['url']); ?>"><?php echo($aEvent['category']['title']); ?></a>
                                    </p>
<?php endif; ?>
<?php if(!empty($aEvent['place']['title'])): ?>
                                    <p class="place">
                                        <a href="<?php echo($aEvent['place']['url']); ?>">
                                            <span class="icon-pictos_localisation"></span>
                                            <?php echo($aEvent['place']['title']); ?>                                        </a>
                                    </p>
<?php endif; ?>
                        </div>
                    </div>
                </article>
<?php endforeach; ?>
            </div>
            <div class="all_events">
                <a href="<?php echo($discoverNow['button']['href']); ?>" type="button"><?php echo($discoverNow['button']['label']); ?></a>
            </div>
        </div>
    </section>
<?php endif; ?>
    <section class="culture-heritage hidden-xs hidden-sm">
        <div class="container">
            <h1 class="leaf-title-orange grey">Culture et patrimoine</h1>
            <section class="report col-sm-7">
                <h1>Reportages</h1>
                <div class="article-container">
<?php foreach($cultureHeritage['reports']['articles'] as $iArticle): ?>
                    <article>
                        <figure class="frieze-rounded-white-right">
                            <a href="<?php echo($iArticle['href']); ?>">
                                <?php echo($iArticle['img_HTML']); ?>                            </a>
                        </figure>
                        <div class="article-infos">
                            <h1>
                                <a href="<?php echo($iArticle['href']); ?>">
                                    <?php echo($iArticle['title']); ?>                                </a>
                            </h1>
<?php if(!empty($iArticle['category'])): ?>
                            <p class="category" data-color="<?php echo($iArticle['category']['color']); ?>">
                                <a href="<?php echo($iArticle['category']['url']); ?>"><?php echo($iArticle['category']['title']); ?></a>
                            </p>
<?php endif; ?>
<?php if(!empty($iArticle['place']['title'])): ?>
                            <p class="place">
                                <a href="<?php echo($iArticle['place']['url']); ?>">
                                    <span class="icon-pictos_localisation"></span>
                                    <?php echo($iArticle['place']['title']); ?>                                </a>
                            </p>
<?php endif; ?>
                        </div>
                    </article>
<?php if(!empty($iArticle['clearfix'])): ?>
                    <div class="clearfix"></div>
<?php endif; ?>
<?php endforeach; ?>
                </div>
                <div class="clearfix"></div>
                <div class="all_articles">
                    <a href="<?php echo($cultureHeritage['reports']['buttonUrl']); ?>" type="button">Tous nos dossiers</a>
                </div>
            </section>
            <section class="whats-new col-sm-5">
                <h1>Quoi de neuf ?</h1>
                <div class="article-container">
<?php foreach($cultureHeritage['whatsNew']['articles'] as $iArticle): ?>
                    <article>
                        <figure class="frieze-rounded-white-right">
                            <a href="<?php echo($iArticle['href']); ?>">
                                <?php echo($iArticle['img_HTML']); ?>                            </a>
                        </figure>
                        <div class="article-infos">
                            <h1>
                                <a href="<?php echo($iArticle['href']); ?>">
                                    <?php echo($iArticle['title']); ?>                                </a>
                            </h1>
<?php if(!empty($iArticle['date'])): ?>
                            <p class="date"><?php echo($iArticle['date']); ?></p>
<?php endif; ?>
<?php if(!empty($iArticle['place']['title'])): ?>
                            <p class="place">
                                <a href="<?php echo($iArticle['place']['url']); ?>">
                                    <span class="icon-pictos_localisation"></span>
                                    <?php echo($iArticle['place']['title']); ?>                                </a>
                            </p>
<?php endif; ?>
                        </div>
                    </article>
<?php if(!empty($iArticle['clearfix'])): ?>
                    <div class="clearfix"></div>
<?php endif; ?>
<?php endforeach; ?>
                </div>
                <div class="clearfix"></div>
                <div class="all_articles">
                    <a href="<?php echo($cultureHeritage['whatsNew']['buttonUrl']); ?>" type="button">Toutes les actus</a>
                </div>
            </section>
        </div>
    </section>
<?php if(!empty($cultureHeritage['ad-placement']['ad'])): ?>
    <section class="ad-placement <?php echo($cultureHeritage['ad-placement']['class']); ?>">
        <?php echo($cultureHeritage['ad-placement']['ad']); ?>    </section>
<?php endif; ?>
<?php if(!empty($localProducts)): ?>
    <section class="local-products frieze-separator-white-bottom">
        <div class="container">
            <h1 class="leaf-title-green">Ils font vivre le territoire</h1>
            <div class="articles-container row js_draggable" id="articles-container">
<?php foreach($localProducts['articles'] as $aArticle): ?>
                <article class="col-md-4">
                    <div>
                        <figure>
                            <a href="<?php echo($aArticle['href']); ?>">
                                <?php echo($aArticle['img_HTML']); ?>                            </a>
                        </figure>
                        <div class="article-datas frieze-rounded-white-top">
                            <h1><a href="<?php echo($aArticle['href']); ?>"><?php echo($aArticle['title']); ?></a></h1>
                            <p class="article-content"><?php echo($aArticle['excerpt']); ?></p>
<?php if(!empty($aArticle['category'])): ?>
                            <p class="category" data-color="<?php echo($aArticle['category']['color']); ?>">
                                <a href="<?php echo($aArticle['category']['url']); ?>"><?php echo($aArticle['category']['title']); ?></a>
                            </p>
<?php endif; ?>
<?php if(!empty($aArticle['place']['title'])): ?>
                            <p class="place">
                                <a href="<?php echo($aArticle['place']['url']); ?>">
                                    <span class="icon-pictos_localisation"></span>
                                    <?php echo($aArticle['place']['title']); ?>                                </a>
                            </p>
<?php endif; ?>
                        </div>
                    </div>
                </article>
<?php endforeach; ?>
            </div>
            <div class="all_articles">
                <a href="<?php echo($localProducts['button_URL']); ?>" type="button">Tous les animateurs de territoire</a>
            </div>
        </div>
    </section>
<?php endif; ?>
</main>

<?php echo $__env->make('footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
