<?php
    $aData = getFooterData();
    // dbe($aData);
?>
        <footer id="main-footer">
            <section class="newspaper hidden-xs">
                <div class="container">
<?php if(!empty($aData['ad-placement']['ad'])): ?>
                    <div class="ad-placement <?php echo($aData['ad-placement']['class']); ?>">
                        <?php echo($aData['ad-placement']['ad']); ?>                    </div>
<?php endif; ?>
                    <div class="find-newspaper">
<?php if(!empty($aData['newspaper']['numericUrl'])): ?>
                        <a href="<?php echo($aData['newspaper']['numericUrl']); ?>" class="col-xs-12 col-sm-6" target="_blank">
                            <figure>
                                <img src="<?php echo themosis_assets().'/img/btn/btn-consultJournal_numerique.svg'; ?>" alt="Journal numérique" class="js_replaceSvgImg">
                                <figcaption>
                                    Consulter le <strong>journal numérique</strong>
                                </figcaption>
                            </figure>
                        </a>
<?php endif; ?>
<?php if(!empty($aData['newspaper']['paperUrl'])): ?>
                        <a href="<?php echo($aData['newspaper']['paperUrl']); ?>" class="col-xs-12 col-sm-6">
                            <figure>
                                <img src="<?php echo themosis_assets().'/img/btn/btn-consultJournal_papier.svg'; ?>" alt="Journal papier" class="js_replaceSvgImg">
                                <figcaption>
                                    Trouver le <strong>journal papier</strong>
                                </figcaption>
                            </figure>
                        </a>
<?php endif; ?>
                    </div>
                </div>
            </section>
            <section class="town-members">
                <div class="container">
                    <h1>
                        <?php echo($aData['townMembers']['title']); ?>                        <span><?php echo($aData['townMembers']['subtitle']); ?></span>
                    </h1>
                    <p class="towns"><?php echo($aData['townMembers']['towns_HTML']); ?></p>
                    <p class="towns"> <img src="http://www.journal-farandole.com//content/uploads/2016/10/logo-soleil-fm-e1477646877560.png" alt="Soleil FM" title="Notre partenaire Soleil FM"> </p>
                </div>
            </section>
            <footer class="frieze-separator-pink-bottom">
                <div class="container">
<?php foreach($aData['menu'] as $aMenu): ?>
                    <ul class="col-sm-4 hidden-xs">
                        <h2><?php echo($aMenu['parent']['title']); ?></h2>
<?php foreach($aMenu['children'] as $aItem): ?>
                        <li><a href="<?php echo($aItem['url']); ?>"><?php echo($aItem['title']); ?></a></li>
<?php endforeach; ?>
                    </ul>
<?php endforeach; ?>
                    <p class="copyright col-xs-12">
                        &copy; Journal Farandole / Conception et réalisation : <a href="http://canopee.cc" target="_blank">Canopée</a>
                    </p>
                </div>
            </footer>
        </footer>
        <?php wp_footer(); ?>
    </body>
</html>
