templates/base.html.twig line 1

Open in your IDE?
  1. <html lang="{{ app.request.locale|split('_')[0] }}">
  2.     <head>
  3.         <meta charset="utf-8">
  4.         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  5.         <link rel="icon" type="image/x-icon" href="{{ asset('build/img/favicon.ico') }}">
  6.         <!-- GOOGLE ANALYTICS -->
  7.         <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-4YY0Y87SCV"></script><script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-4YY0Y87SCV'); </script> 
  8.                 <script>
  9.                         var _gaq = _gaq || [];
  10.                         _gaq.push(['_setAccount', 'UA-1099043-1']);
  11.                         _gaq.push(['_gat._anonymizeIp']);
  12.                         _gaq.push(['_trackPageview']);
  13.                         (function () {
  14.                             var ga = document.createElement('script');
  15.                             ga.type = 'text/javascript';
  16.                             ga.async = true;
  17.                             ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  18.                             var s = document.getElementsByTagName('script')[0];
  19.                             s.parentNode.insertBefore(ga, s);
  20.                         })();
  21.                 </script>
  22.         <!-- END GOOGLE ANALYTICS -->
  23.         
  24.         {% cache "block-1-js" ttl(86400) %}  {#  86400s = 1jour #}
  25.         {% endcache %}
  26.         
  27.         {% set  lang = 'fr' %}
  28.         {% if  app.request.cookies.get('lang') %}
  29.             {% set  lang =  app.request.cookies.get('lang') %}
  30.         {% endif %}
  31.        
  32.         
  33.         {% if metaTag is defined and metaTag.getTitle %}
  34.             <title>{{ metaTag.getTitle }}</title>
  35.         {% else %}
  36.             {% block title %}
  37.             <title>FUSACQ {{ dates_provider.anneeEnCours }}</title>
  38.             {% endblock %}
  39.         {% endif %}
  40.         
  41.         {% if metaTag is defined and metaTag.getDescription %}
  42.             <meta name="description" content="{{ metaTag.getDescription }}">
  43.         {% else %}
  44.             {% block description %}
  45.             {% endblock %}
  46.         {% endif %}
  47.         
  48.         {# Attention : #}
  49.         {# 1 - Page canonique unique pour chaque variante linguistique #}
  50.         {# 2 - Autocanonisation : Chaque page linguistique devrait être "canonique" pour elle-même  #}
  51.         {# 3 - Pas de page canonique vers une autre langue #}
  52.         {# 4 - Utiliser x-default correctement #}
  53.         {# 5 - La balise hreflang doit être seulement utilisée pour des pages qui ne renvoient pas à une autre page via l’attribut Canonical #}
  54.         {# https://www.ionos.fr/digitalguide/web-marketing/search-engine-marketing/hreflang-principes-et-erreurs-frequentes/ #}
  55.         
  56.         {% if metaTag is defined and metaTag.getCanonical %}
  57.             <link rel="canonical" href="//{{ metaTag.getCanonical }}">
  58.         {% else %}
  59.             {% block canonical %}
  60.             {% endblock %}
  61.         {% endif %}
  62.         
  63.         {% if metaTag is defined and metaTag.getAlternates %}
  64.             {% for alternate in metaTag.getAlternates %}
  65.             <link rel="alternate" hreflang="{{ alternate.lang }}" href="//{{ alternate.href }}">
  66.             {% endfor %}
  67.         {% else %}
  68.             {% block alternate %}
  69.             {% endblock %}
  70.         {% endif %}
  71.         
  72.         {% if metaTag is defined and metaTag.getNext %}
  73.             <link rel="next" href="//{{ metaTag.getNext }}">
  74.         {% else %}
  75.             {% block next %}
  76.             {% endblock %}
  77.         {% endif %}
  78.         
  79.         {% if metaTag is defined and metaTag.getPrev %}
  80.             <link rel="prev" href="//{{ metaTag.getPrev }}">
  81.         {% else %}
  82.             {% block prev %}
  83.             {% endblock %}
  84.         {% endif %}
  85.         
  86.         {% if metaTag is defined and metaTag.getRobots %}
  87.             <meta name="robots" content="{{ metaTag.getRobots }}">
  88.         {% else %}
  89.             {% block robots %}
  90.             {% endblock %}
  91.         {% endif %}
  92.         
  93.         
  94.         
  95.         {% if app.request is defined and app.request.hasPreviousSession %}
  96.                 {% set  dataSession = app.session.all %}
  97.                 {% if   app.session.all.codePays is defined %}
  98.                     {% set  codePays =  app.session.all.codePays %}
  99.                     {% set  codePaysWithUnderScore =  '_'~app.session.all.codePays~'_' %}
  100.                 {% else %}
  101.                     {% set  codePays = "fr" %}
  102.                     {% set  codePaysWithUnderScore = '_fr_' %}
  103.                 {% endif %}
  104.         {% else %}
  105.             {# Fallback si pas de session ouverte (ex: page d’erreur) #}
  106.             {% set codePays = 'fr' %}
  107.             {% set codePaysWithUnderScore = '_fr_' %}
  108.         {% endif %}
  109.         
  110.         
  111.         
  112.         <script type="text/javascript">
  113.             if (window.$_boServerVars === undefined) {
  114.                 window.$_boServerVars = {{ render_esi(controller('\App\\Ajax\\Controller\\BaseController::serverVariables',{"codePays": codePays})) }};
  115.             }
  116.         </script>
  117.         
  118.         
  119.         {# en mode production on cache les debug js #}
  120.         {% if app.request.server.get('APP_ENV') !="dev" %}
  121.           <script type="text/javascript">
  122.              console.log = function() {};
  123.              console.debug = function() {};
  124.           </script>
  125.         {% endif %}
  126.         {# en mode production on cache les debug js #}
  127.         
  128.         {% set acceptPubCib = true %}
  129.         {% if app.request.cookies.get('acceptPubCib') == "non" %}
  130.             {% set acceptPubCib = false %}
  131.         {% endif %}
  132.         
  133.         {% if acceptPubCib %}
  134.             <script async='async' src='https://www.googletagservices.com/tag/js/gpt.js'></script>
  135.             <script type='text/javascript'>
  136.               var googletag = googletag || {};
  137.               googletag.cmd = googletag.cmd || [];
  138.             </script>
  139.             
  140.             <script type='text/javascript'>
  141.             var gptAdSlots = [];
  142.               googletag.cmd.push(function() {
  143.                   var bannerSize = googletag.sizeMapping().
  144.                   addSize([1200, 0], [970, 90]).
  145.                   addSize([740, 0], [728, 90]).
  146.                   addSize([480, 0], [468, 60]).
  147.                   addSize([0, 0], [320, 50]).
  148.                   build();
  149.                   
  150.                   var paveSize = googletag.sizeMapping().
  151.                   addSize([1200, 0], [[300,100],[300, 250],[300,600]]).
  152.                   addSize([740, 0], []).
  153.                   addSize([480, 0], []).
  154.                   addSize([0, 0], []).
  155.                   build();
  156.                   
  157.                   gptAdSlots[0] = googletag.defineSlot('/122043898/FUSACQ_mega_banner_general', [[320, 50], [728, 90], [970, 90], [468, 60]], 'div-gpt-ad-1515517010201-0').defineSizeMapping(bannerSize).addService(googletag.pubads());
  158.                   gptAdSlots[1] = googletag.defineSlot('/122043898/FUSACQ_PAVE', [[300,100],[300, 250],[300,600]], 'div-gpt-ad-1515597594285-0').defineSizeMapping(paveSize).addService(googletag.pubads());
  159.                   googletag.pubads().enableSingleRequest();
  160.             
  161.                   googletag.pubads().setTargeting('PLS', ['RG']){% block googletag %}{% endblock %};
  162.                    
  163.                   googletag.enableServices();
  164.               });
  165.             </script> 
  166.         {% endif %}
  167.         
  168.         {% set authFrom = app.request.query.get('authFrom') %}
  169.         {% set currentRoute = app.request.get('_route') %} {# pour linstant cette variable est non utilisé #}
  170.         
  171.           {% if currentRoute =="index" %}  
  172.                 <link rel="stylesheet" href="{{ asset('build/css/lib/all_6_4_2.min.css') }}">
  173.          {% endif %}
  174.       
  175.         {% block stylesheets   %}
  176.             {% apply spaceless %}
  177.             <link rel="stylesheet" href="{{ asset('build/css/lib/bootstrap.min.css') }}">
  178.             <link rel="stylesheet" href="{{ asset('build/css/lib/jquery-ui-1.7.3.custom.css') }}">
  179.             <link rel="stylesheet" href="{{ asset('build/css/lib/animate.min.css') }}">
  180. {#             <link rel="stylesheet" href="https://www.fusacq.com/FUSACQ2020/css/custom_fusacq1.css">#}
  181.             <link rel="stylesheet" href="{{ asset('build/css/custom_fusacq.css') }}">
  182.             <link rel="stylesheet" href="{{ asset('build/css/onglets_nav.css') }}">
  183.             <link rel="preconnect" href="https://fonts.googleapis.com">
  184.             <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  185.             <link href="https://fonts.googleapis.com/css2?family=Overpass:wght@400;500;600&display=swap" rel="stylesheet">
  186.             {#<link rel="stylesheet" href="{{ asset('build/css/lib/all_6_4_2.min.css') }}">#}
  187.             <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"> -->
  188.             <script src="https://kit.fontawesome.com/ca7826b79a.js" crossorigin="anonymous"></script>
  189.             {% endapply %}
  190.         {% endblock %}
  191.     </head>
  192.     <body>
  193.         {% apply spaceless %}
  194.         {% block body  %}
  195.         {% endblock %}
  196.         {% endapply %}
  197.         <!--FIN CONTAINER -->
  198.         <!-- FOOTER -->
  199.         {{ render_esi(controller(
  200.                 'App\\Controller\\CoreController::footer',{ 'lang': lang,"codePays": codePaysWithUnderScore }
  201.             ))  | spaceless }}
  202.         <!-- FIN FOOTER -->
  203.         {% block javascripts   %}
  204.             <script src="{{ asset('build/js/lib/jquery-1.12.4.js') }}"></script>
  205.             <script src="{{ asset('build/js/lib/jquery-ui.js') }}"></script>
  206.             <script>
  207.             function testAnim(x) {
  208.                 $('#animationSandbox').removeClass().addClass(x + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  209.                     $(this).removeClass();
  210.                 });
  211.             }
  212.             $(document).ready(function () {
  213.                 $('.js--triggerAnimation').click(function (e) {
  214.                     e.preventDefault();
  215.                     var anim = $('.js--animations').val();
  216.                     testAnim(anim);
  217.                 });
  218.                 $('.js--animations').change(function () {
  219.                     var anim = $(this).val();
  220.                     testAnim(anim);
  221.                 });
  222.             });
  223.             $(function () {
  224.                 $("#slider-range").slider({
  225.                     range: true,
  226.                     min: 0,
  227.                     max: 500,
  228.                     values: [75, 300],
  229.                     slide: function (event, ui) {
  230.                         $("#amount").val("$" + ui.values[0] + " - $" + ui.values[1]);
  231.                     }
  232.                 });
  233.                 $("#amount").val("$" + $("#slider-range").slider("values", 0) +
  234.                         " - $" + $("#slider-range").slider("values", 1));
  235.             });
  236.             $(function () {
  237.                 $("#li3").click(function () {
  238.                     $(".nav-link").switchClass("nav-link", "nav-link2");
  239.                     $(".nav-link2").switchClass("nav-link2", "nav-link");
  240.                 });
  241.             });
  242.             </script>
  243.             {#    <script src="{{ asset('build/js/lib/jquery-3.3.1.slim.min.js') }}"></script> #}
  244.              <script src="{{ asset('build/js/lib/jquery-3.3.1.min.js') }}"></script>
  245.             <script src="{{ asset('build/js/lib/popper.min.js') }}"></script>
  246.             <script src="{{ asset('build/js/lib/bootstrap.min.js') }}"></script>
  247.             <script src="{{ asset('build/js/lib/jquery-ui-1.8.22.slider.min.js') }}"></script>
  248.             <script>
  249.             $(document).ready(function () {
  250.                 $("hidden").parent().remove();
  251.             });
  252.             </script>
  253.             <script>
  254.                 $(document).ready(function () {
  255.                     if (($("form#login").length == 1) && ($("div.modal div.alert-danger").length > 0)) {
  256.                         $("a.link-compte").trigger("click");
  257.                     }
  258.                     if (($("form#login").length > 1) && ($("div.modal div.alert-danger").length > 0)) {
  259.                         $("form#login:last").prepend($("div.modal div.alert-danger").clone());
  260.                         $('html, body').animate({
  261.                             scrollTop: $("form#login:last").offset().top
  262.                         }, 2000);
  263.                     }
  264.                     $("button.btn-toggle").on("click", function () {
  265.                         var classBtn = $(this).attr('class');
  266.                         if (classBtn.includes("active")) {
  267.                             $(this).siblings(" input[type='checkbox']").prop("checked", false);
  268.                         } else {
  269.                             $(this).siblings(" input[type='checkbox']").prop("checked", true);
  270.                         }
  271.                     });
  272.                     /*$("#affichageCookie").on( "click", function() {
  273.                      alert("here");
  274.                      $('#CybotCookiebotDialog').removeAttr("style");
  275.                      $('#CybotCookiebotDialog').css('display', 'flex');
  276.                      $("#CybotCookiebotDialog").addClass("CybotCookiebotDialogActive");
  277.                      });
  278.                      $('#CookiebotWidget').css('display', 'none');*/
  279.                 });
  280.             </script>
  281.         {% if authFrom %}
  282.             <script type="text/javascript"  >
  283.                 $("#Modalindex").modal("show");
  284.             </script>
  285.         {% endif %}
  286.         {% endblock %}
  287.     </body>
  288.  
  289.     {% if  app.request.host =='www.fusacq.com'   %}
  290.             <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-framework="TCFv2.2" data-cbid="679b781c-197a-42a0-be0e-18f29c98c691" data-blockingmode="auto" type="text/javascript" data-cookieconsent="marketing"></script>
  291.     {% endif %}
  292.     
  293.  
  294. </html>