{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace ot=Opentalent\OtTemplating\ViewHelpers}

<f:render partial="Modern/BackToTop" />
<f:render partial="Modern/Modals" arguments="{_all}" />
<f:render partial="Classic/MetaSocial"/>

<f:comment><!-- Get the footer page' uid if the page is found --></f:comment>
<v:variable.set value="{ot:getPageUid(slug: '/footer')}" name="footerPageUid"/>

<footer class="footer footer-topbar theme-bg">
    <div class="footer-line-1">
        <div class="copyright">
            <div class="container">
                <div class="row">
                    <div class="col-xl-6 col-md-6">
                        <div class="footer-text">
                            <p> &copy;<span id="copyright"> <script>document.getElementById('copyright').appendChild(document.createTextNode(new Date().getFullYear()))</script></span> - <a href="{ot:rootPage.getUri()}"> {settings.structureName} </a> - Tous droits réservés</p>
                        </div>
                    </div>

                    <div class="col-xl-6 col-md-6">
                        <div class="footer-social">
                            <ul class="text-left text-md-right footer-menu">

                                <li class="list-inline-item brand-free">
                                    <a href="https://opentalent.fr/"
                                       title="Opentalent"
                                       class="reseau-opentalent"
                                       data-toggle="modal"
                                       data-target="#opentalentModal">
                                        Opentalent
                                    </a>
                                </li>

                                <f:if condition="{footerPageUid} > 0">
                                    <v:menu as="footerMenu" pageUid="{ot:getPageUid(slug: '/footer')}">
                                        <f:for each="{footerMenu}" as="footerMenuItem">
                                            <li class="list-inline-item">
                                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                                <f:link.page pageUid="{footerMenuItem.uid}"
                                                             title="{footerMenuItem.linktext}">
                                                    {footerMenuItem.linktext}
                                                </f:link.page>
                                            </li>
                                        </f:for>
                                    </v:menu>
                                </f:if>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <f:if condition="{settings.structureFacebook} != '' || {settings.structureTwitter} != '' || {settings.structureInstagram} != ''">
        <div class="footer-line-2">
            <ul>
                <li>
                    <f:translate key="find-us-on"/>:
                </li>
                <f:if condition="{settings.structureFacebook} != ''">
                    <li class="social-logo">
                        <a href="{ot:utilities.absoluteUrl(url: settings.structureFacebook)}" target="_blank">
                            <i class="fa fa-facebook"></i> Facebook
                        </a>
                    </li>
                </f:if>

                <f:if condition="{settings.structureTwitter} != ''">
                    <li class="social-logo">
                        <a href="{ot:utilities.absoluteUrl(url: settings.structureTwitter)}" target="_blank">
                            <i class="fa fa-twitter"></i> Twitter
                        </a>
                    </li>
                </f:if>

                <f:if condition="{settings.structureInstagram} != ''">
                    <li class="social-logo">
                        <a href="{ot:utilities.absoluteUrl(url: settings.structureInstagram)}" target="_blank">
                            <i class="fa fa-instagram"></i> Instagram
                        </a>
                    </li>
                </f:if>

                <f:if condition="{settings.structureYoutube} != ''">
                    <li class="social-logo">
                        <a href="{ot:utilities.absoluteUrl(url: settings.structureYoutube)}" target="_blank">
                            <i class="fa fa-youtube"></i> Youtube
                        </a>
                    </li>
                </f:if>
            </ul>
        </div>
    </f:if>
</footer>
