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

<f:render partial="Classic/MetaSocial"/>

<footer id="footer">
    <ul class="footer-navbar">

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

        <f:if condition="{footerPageUid} > 0">
            <f:then>
                <v:menu as="footerMenu" pageUid="{ot:getPageUid(slug: '/footer')}">
                    <f:for each="{footerMenu}" as="footerMenuItem">
                        <li>
                            <f:link.page pageUid="{footerMenuItem.uid}"
                                         title="{footerMenuItem.linktext}">
                                {footerMenuItem.linktext}
                            </f:link.page>
                        </li>
                    </f:for>
                </v:menu>
            </f:then>
        </f:if>

        <f:if condition="{settings.structureFacebook} != ''">
            <li class="social-logo">
                <a href="{ot:utilities.absoluteUrl(url: settings.structureFacebook)}" target="_blank">
                    <i class="fab fa-facebook" style="color: #f2f2f2"></i>
                </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="fab fa-twitter" style="color: #f2f2f2"></i>
                </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="fab fa-instagram-square" style="color: #f2f2f2"></i>
                </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="fab fa-youtube" style="color: #f2f2f2"></i>
                </a>
            </li>
        </f:if>
    </ul>

    <div class="logo-ot">
        <a href="{ot:request.getOtEnvVar(argument: 'WEBSITE')}" target="_blank" title="Opentalent">
            <f:image src="EXT:ot_templating/Resources/Public/media/logo-opentalent.png" height="40" />
        </a>
    </div>
</footer>
