<?php echo $__env->make('header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<main id="main-content" class="<?php echo($search['color']); ?>">
    <section class="titles">
        <div class="container">
            <h1 class="leaf-title-white white"><?php echo($search['title']); ?></h1>
            <form action="">
                <select id="city" name="city" class="selectpicker" title="Où ça ?" data-live-search="true" multiple data-max-options="1">
<?php foreach($search['form']['towns'] as $city): ?>
                    <option value="<?php echo($city['id']); ?>" <?php echo($city['selected']); ?>><?php echo($city['title']); ?></option>
<?php endforeach; ?>
                </select>
                <select id="thematic" name="thematic" class="selectpicker" title="Thématique" multiple data-max-options="1">
<?php foreach($search['form']['thematic'] as $thematic): ?>
                    <option value="<?php echo($thematic['id']); ?>" <?php echo($thematic['selected']); ?>><?php echo($thematic['title']); ?></option>
<?php endforeach; ?>
                </select>
                <div class="search-keywords">
                    <input id="keywords" name="keywords" type="text" placeholder="Mots clés" value="<?php echo($search['form']['keywords']); ?>">
                </div>
                <input type="hidden" id="activepage" name="activepage" value="<?php echo($search['form']['activePage']); ?>">
                <input type="hidden" id="id_heading" name="id_heading" value="<?php echo($search['id_heading']); ?>">
                <input type="submit" value="Rechercher">
                <?php wp_nonce_field('ajax-nonce', 'security'); ?>
            </form>
        </div>
    </section>
    <section class="content frieze-separator-white-top">
        <div class="container">
            <section class="results col-md-8">
                <div class="loader">
                    <img src="<?php echo(themosis_assets().'/img/loader/loader_white_'.$search['color'].'.gif'); ?>" alt="Chargement...">
                </div>
                <p class="label-results"></p>
                <div class="articles-container col-xs-12">
                    Aucun résultat trouvé
                </div>
                <div class="pagination"></div>
            </section>
<?php if(!empty($discoverToday['events'])): ?>
            <aside class="discover-today hidden-xs col-md-4">
                <h1 class="leaf-title-orange white">A découvrir aujourd'hui</h1>
                <div class="event-container">
<?php foreach($discoverToday['events'] as $aEvent): ?>
                    <article class="col-sm-6 col-md-12">
                        <figure class="frieze-rounded-purple-right">
                            <a href="<?php echo($aEvent['href']); ?>">
                                <?php echo($aEvent['img_HTML']); ?>                            </a>
                        </figure>
                        <div class="event-infos">
<?php if(!empty($aEvent['type'])): ?>
                            <p class="type"><?php echo($aEvent['type']); ?></p>
<?php endif; ?>
<?php if(!empty($aEvent['title'])): ?>
                            <h1><a href="<?php echo($aEvent['href']); ?>"><?php echo($aEvent['title']); ?></a></h1>
<?php endif; ?>
<?php if(!empty($aEvent['place'])): ?>
                            <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>
                    </article>
                    <div class="clearfix"></div>
<?php endforeach; ?>
                    <div class="all_events">
                        <a href="<?php echo($discoverToday['button']['href']); ?>" type="button">Tous les événements du jour</a>
                    </div>
                </div>
            </aside>
<?php endif; ?>
        </div>
    </section>
</main>

<?php echo $__env->make('footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>