Forráskód Böngészése

add the social links to modern footer

Olivier Massot 4 éve
szülő
commit
227a7392d9

+ 0 - 48
ot_templating/Classes/ViewHelpers/Social/FacebookShareUri.php

@@ -1,48 +0,0 @@
-<?php
-
-namespace Opentalent\OtTemplating\ViewHelpers\Social;
-
-use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
-
-/**
- * Returns the uri for a link that will share this page on Facebook
- *
- *     {namespace ot=Opentalent\OtTemplating\ViewHelpers}
- *
- *     {ot:social.facebookShareUri()}
- *
- * @package Opentalent\OtTemplating\ViewHelpers
- */
-class FacebookShareUri
-{
-
-    /**
-     * -- This method is expected by Fluid --
-     * Declares the viewhelper's parameters
-     */
-    public function initializeArguments()
-    {
-    }
-
-    /**
-     * -- This method is expected by Fluid --
-     * Renders the content as html
-     *
-     * @param array $arguments
-     * @param Closure $renderChildrenClosure
-     * @param RenderingContextInterface $renderingContext
-     * @return int|null
-     */
-    public static function renderStatic(
-        array $arguments,
-        Closure $renderChildrenClosure,
-        RenderingContextInterface $renderingContext
-    ) {
-        $page = $GLOBALS['TSFE']->getAttribute('page');
-
-
-        return "http://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.la-francaise.com%2Ffr%2Fnous-connaitre%2Fles-actualites%2Fdetail%2Fconfirmation-du-biais-dovish-de-la-fed-des-taux-plus-eleves-pas-d-inquietude%2F&t=Confirmation%20du%20biais%20dovish%20de%20la%20FED%20%3A%20des%20taux%20plus%20%C3%A9lev%C3%A9s%20%3F%20Pas%20d%27inqui%C3%A9tude%20!%20-%20Groupe%20La%20Fran%C3%A7aise";
-    }
-
-
-}

+ 6 - 0
ot_templating/Resources/Private/Language/locallang.xlf

@@ -352,6 +352,12 @@
 			<trans-unit id="missing_page">
 				<source>Page introuvable</source>
 			</trans-unit>
+			<trans-unit id="share-on">
+				<source>Partager sur</source>
+			</trans-unit>
+			<trans-unit id="find-us-on">
+				<source>Retrouvez-nous sur</source>
+			</trans-unit>
 
 			<!-- Email template -->
 			<trans-unit id="hello">

+ 69 - 35
ot_templating/Resources/Private/Partials/Modern/Footer.html

@@ -8,46 +8,80 @@
 <v:variable.set value="{ot:getPageUid(slug: '/footer')}" name="footerPageUid"/>
 
 <footer class="footer footer-topbar theme-bg">
-    <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 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>
 
-                <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="#"
-                                   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 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="#"
+                                       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>
+            </ul>
+        </div>
+    </f:if>
 </footer>

+ 45 - 2
ot_templating/Resources/Public/assets/Modern/style/custom.css

@@ -111,7 +111,7 @@
         justify-content: flex-end;
     }
 
-    .social-bar {
+    .topbar .social-bar {
         display: flex;
         flex-direction: row;
         margin: 0 16px;
@@ -119,7 +119,7 @@
         position: relative;
     }
 
-    .social-logo {
+    .topbar .social-logo {
         height: 20px;
         width: 20px;
         font-size: 20px;
@@ -584,6 +584,49 @@
         padding-top: 0 !important;
     }
 
+    .footer {
+        display: flex;
+        flex-direction: column;
+        padding-bottom: 10px;
+    }
+
+    .footer .footer-line-1 .copyright {
+        padding-bottom: 0 !important;
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+    }
+
+    .footer .footer-line-2 {
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        height: 36px;
+        align-items: center;
+        color: #FFFFFF;
+        font-size: 14px;
+        padding-bottom: 10px;
+    }
+
+    .footer .footer-line-2 ul {
+        list-style: none;
+        display: flex;
+        flex-direction: row;
+    }
+
+    .footer .footer-line-2 ul .social-logo {
+        margin: 0 6px;
+        padding: 0 6px;
+    }
+
+    .footer .footer-line-2 ul .social-logo a {
+        color: #f2f2f2;
+    }
+
+    .footer .footer-line-2 ul .social-logo a * {
+        margin: 0 3px;
+    }
+
 /*------------------------
     Breadcrumb
 ------------------------*/