templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
  7.         <title>{% block title %}{{ nom_normalise }}{% endblock %}</title>
  8.         <meta name="description" content="{% block metadescription %}{% endblock %}">
  9.         {% set currentPathSeo = url(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}
  10.         <link rel="canonical" href="{{ currentPathSeo }}">
  11.         <meta property="og:locale" content="fr_FR">
  12.         <meta property="og:type" content="website">
  13.         <meta property="og:title" content="{% block nomsite %}{{ nom_normalise }}{% endblock %}">
  14.         <meta property="og:description" content="{% block metadescriptionogg %}{% endblock %}">
  15.         <meta property="og:url" content="{{ currentPathSeo }}">
  16.         <meta property="og:site_name" content="{{ nom_normalise }}">
  17.         {% block stylesheets %}
  18.             {{ encore_entry_link_tags('appFront') }}
  19.             <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.1/cookieconsent.min.css" integrity="sha512-LQ97camar/lOliT/MqjcQs5kWgy6Qz/cCRzzRzUCfv0fotsCTC9ZHXaPQmJV8Xu/PVALfJZ7BDezl5lW3/qBxg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  20.             {# Si besoin, on applique du CCS spécifique si User est connecté #}
  21.             {#{% if is_granted('ROLE_USER') %}#}
  22.             {% if 1 == 1 %}
  23.                 {{ encore_entry_link_tags('frontifConnected') }}
  24.             {% endif %}
  25.         {% endblock %}
  26.         {% block javascripts %}
  27.             {{ encore_entry_script_tags('appFront') }}
  28.             <script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.1/cookieconsent.min.js" integrity="sha512-yXXqOFjdjHNH1GND+1EO0jbvvebABpzGKD66djnUfiKlYME5HGMUJHoCaeE4D5PTG2YsSJf6dwqyUUvQvS0vaA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  29.             <script>
  30.                 ( function() {
  31.                     //Cookies
  32.                     window.addEventListener('load', function(){
  33.                         window.cookieconsent.initialise({
  34.                             revokeBtn: "<div class='cc-revoke'></div>",
  35.                             type: "opt-in",
  36.                             position: "bottom-left",
  37.                             theme: "edgeless",
  38.                             palette: {
  39.                                 popup: {
  40.                                     background: "rgb(0,0,0)",
  41.                                     text: "#ffffff"
  42.                                 },
  43.                                 button: {
  44.                                     background: "rgb(247,101,26)",
  45.                                     text: "#ffffff"
  46.                                 }
  47.                             },
  48.                             content: {
  49.                                 message: "Ce site utilise des cookies pour vous garantir la meilleure expérience utilisateur",
  50.                                 link: "Voir plus",
  51.                                 allow: "Autoriser",
  52.                                 deny: "Refuser",
  53.                                 href: "{{ url_site_dgs }}/Politique-de-confidentialite"
  54.                             },
  55.                             onInitialise: function(status) {
  56.                                 //if(status == cookieconsent.status.allow) myScripts();
  57.                             },
  58.                             onStatusChange: function(status) {
  59.                                 //if (this.hasConsented()) myScripts();
  60.                             }
  61.                         })
  62.                     });
  63.                     function myScripts() {
  64.                         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  65.                             (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  66.                             m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  67.                         })(window,document,'script','https://www.googletagmanager.com/gtag/js?id={{ ga_tracking }}','ga');
  68.                         window.dataLayer = window.dataLayer || [];
  69.                         function gtag(){dataLayer.push(arguments);}
  70.                         gtag('js', new Date());
  71.                         gtag('config', '{{ ga_tracking }}');
  72.                     }
  73.                     myScripts();
  74.                 }() );
  75.             </script>
  76.             {# Si besoin, on applique du JS spécifique si User est connecté #}
  77.             {#{% if is_granted('ROLE_USER') %}#}
  78.             {% if 1 == 1 %}
  79.                 {{ encore_entry_script_tags('frontifConnected') }}
  80.             {% endif %}
  81.         {% endblock %}
  82.     </head>
  83.     <body id="frontDGS" class="grid-x">
  84.         {# Nav Header #}
  85.         {{ render(controller('App\\Controller\\PublicController::navHeaderRender')) }}
  86.         {% block body %}{% endblock %}
  87.         {# Footer #}
  88.         {% include './public/footer/footer.html.twig' %}
  89.     </body>
  90. </html>