templates/base.html.twig line 1

Open in your IDE?
  1. {%- set urlCanonical = urlCanonical | default(app.request.uri) -%}
  2. <!DOCTYPE html>
  3. <html lang="fr">
  4.     <head>
  5.         {% if robots_tag is defined and robots_tag is not null -%}
  6.             <meta name="robots" content="{{ robots_tag }}">
  7.         {% elseif noindex is defined and noindex == true -%}
  8.             <meta name="robots" content="noindex, nofollow">
  9.         {% else -%}
  10.             <meta name="robots" content="{{ isNoIndex() ? 'noindex, nofollow' : 'index, follow' }}">
  11.         {% endif -%}
  12.         <meta charset="UTF-8">
  13.         <title>{% apply clean_whitespace %}{% apply spaceless %}{% block title %}Annuaire de l'enseignement privé{% endblock %}{% endapply %}{% endapply %}</title>
  14.         <meta name="viewport" content="width=device-width, initial-scale=1"/>
  15.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  16.         <meta name="description" content="{% apply spaceless %}{% block description %}{% endblock %}{% endapply %}"/>
  17.         <meta name="trustpilot-one-time-domain-verification-id" content="51974281-b2ee-4cb4-b89a-546e6217fa70"/>
  18.         <link rel="canonical" href="{{ urlCanonical | replace({'http://': 'https://'}) }}">
  19.         {% if urlAmp is defined and urlAmp is not empty %}
  20.             <link rel="amphtml" href="{{ urlAmp | replace({'http://': 'https://'}) }}">
  21.         {% endif -%}
  22.         <meta property="og:title" content="{% apply spaceless %}{{ block('title')  }}{% endapply %}">
  23.         <meta property="og:description" content="{% apply spaceless %}{{ block('description') }}{% endapply %}">
  24.         <meta property="og:type" content="website">
  25.         <meta property="og:image" content="{{ absolute_url(asset('build/images/logo.png')) | replace({'http://': 'https://'})  }}">
  26.         <meta property="og:url" content="{{ urlCanonical | replace({'http://': 'https://'}) }}">
  27.         <meta property="og:locale" content="fr_FR">
  28.         <meta property="og:site_name" content="L'annuaire officiel de l'enseignement privé">
  29.         <meta name="google-site-verification" content="{{ googleSiteVerification }}" />
  30.         <link rel="sitemap" href="{{ asset('sitemap.xml') }}" />
  31.         <meta name="language" content="fr">
  32.         <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
  33.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  34.         <meta name="msapplication-tap-highlight" content="no">
  35.         <meta name="format-detection" content="telephone=no">
  36.         <style type="text/css">
  37.             body, html {
  38.                 opacity: 0;
  39.                 visibility: hidden;
  40.                 transition: opacity .3s ease-in-out;
  41.             }
  42.         </style>
  43.         <link rel="apple-touch-icon" sizes="120x120" href="{{ preload(asset('apple-touch-icon.png'), {as: 'image', nopush: true}) }}">
  44.         <link rel="icon" type="image/png" sizes="32x32" href="{{ preload(asset('favicon-32x32.png'), {as: 'image', nopush: true}) }}">
  45.         <link rel="icon" type="image/png" sizes="16x16" href="{{ preload(asset('favicon-16x16.png'), {as: 'image', nopush: true}) }}">
  46.         <link rel="manifest" href="{{ asset('manifest.json') }}">
  47.         <link rel="mask-icon" href="{{ asset('safari-pinned-tab.svg') }}" color="#5bbad5">
  48.         <link rel="preconnect" href="https://fonts.googleapis.com">
  49.         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  50.         <meta name="theme-color" content="#ffffff">
  51.         <script>var cookie_notice = {"cookie_notice_position":"bottom","cookie_notice_fontfamily":"Helvetica, Arial, sans-serif","cookie_notice_textcolor":"#fff","cookie_notice_textsize":"12","cookie_notice_bgcolor":"#2184a4","cookie_notice_opacity":"1","cookie_notice_apperance":"slide","cookie_notice_accept_bgcolor":"#31b5df","cookie_notice_accept_color":"#fff","cookie_notice_accept_shape":"square","cookie_notice_accept_radius":"0"};</script>
  52.         
  53.         {% if etablissement is defined and etablissement is not null %}
  54.             {% if etablissement.isClient %}
  55.             {% set content_group = 'content_group5' %}
  56.             {% else %}
  57.             {% set content_group = 'content_group4' %}
  58.             {% endif %}
  59.             {% if etablissement.typeClient == 'internat' %}
  60.             {% set onglet = 'internat' %}
  61.             {% else %}
  62.             {% set onglet = typeOnglet(etablissement.type) %}
  63.             {% endif %}
  64.         {% endif %}
  65.         <script type="application/ld+json">{{ jsonLdWebsite() | json_encode() | raw }}</script>
  66.         {% for item in siteLdJson %}
  67.             {%- if item == 'etablissement' -%}
  68.                 <script type="application/ld+json">{{ jsonLdEtablissement(etablissement, asset('build/images/no-logo.png')) | json_encode() | raw }}</script>
  69.                 
  70.                 <!-- #formations -->
  71.                 <script type="application/ld+json">{{ jsonLdDiplomes(formations, dc, etablissement)  | raw }}</script>
  72.                 <!-- #formations# -->
  73.                 {% if etablissement.videos|length > 0 -%}
  74.                     <script type="application/ld+json">{{ jsonLdVideo(etablissement.videos[0]) | json_encode() | raw }}</script>
  75.                 {% endif %}
  76.                 {% if etablissement.diaporamas|length > 0 -%}
  77.                     <script type="application/ld+json">{{ jsonLdDiapo( etablissement.diaporamas[0].photo[0]) | json_encode() | raw }}</script>
  78.                 {% endif %}
  79.                 {% if etablissement.actualites|length > 0 -%}
  80.                 {% for actu in etablissement.actualites %}
  81.                     <script type="application/ld+json">{{ jsonLdActualite( actu ) | json_encode() | raw }}</script>
  82.                 {% endfor %}
  83.                 {% endif %}
  84.             {%- elseif item == 'offre-emploi' and offre.jsonLd -%}
  85.                 <script type="application/ld+json">{{ offre.jsonLd|raw }}</script>
  86.             {% endif -%}
  87.         {%- endfor -%}
  88.         {%- if faqs is defined and faqs | length > 0 -%}
  89.             <script type="application/ld+json">{{ jsonLdFaq( faqs ) | raw }}</script>
  90.         {% endif -%}
  91.         
  92.         {# 1. Déclaration du dataLayer #}
  93.         <script>
  94.         window.dataLayer = window.dataLayer || [];
  95.         </script>
  96.         {# 2. Les push métier (page_context, view_item, etc #}
  97.         {% block data_layer %}{% endblock %}
  98.         <!-- Google Tag Manager -->
  99.         <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  100.         new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  101.         j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  102.         'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  103.         })(window,document,'script','dataLayer','GTM-PHS7FB52');</script>
  104.         <!-- End Google Tag Manager -->
  105.     </head>
  106.     <body>
  107.         <!-- Google Tag Manager (noscript) -->
  108.         <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PHS7FB52"
  109.         height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  110.         <!-- End Google Tag Manager (noscript) -->
  111.         {# {% cache "base;header;v1" ttl(3600) %} #}
  112.         {% include '_includes/header.html.twig' %}
  113.         {# {% endcache %} #}
  114.         {% include '_includes/alerts.html.twig' %}
  115.         {% block body %}{% endblock %}
  116.         {% include '_includes/footer.html.twig' %}
  117.         {# ----- CSS ------------------------------------------------------- #}
  118.         <link rel="preload" as="font" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700" as="style" onload="this.onload=null;this.rel='stylesheet'">
  119.         <noscript><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700" rel="stylesheet"></noscript>
  120.         
  121.         {# {% for css in encore_entry_css_files('app') %}
  122.             <link rel="preload" href="{{ asset(css) }}" as="style" onload="this.onload=null;this.rel='stylesheet'"/>
  123.             <noscript><link href="{{ asset(css) }}" rel="stylesheet"></noscript>
  124.         {% endfor %} #}
  125.         {{ encore_entry_link_tags('app') }}
  126.         {% block stylesheets %}{% endblock %}
  127.         <script>
  128.             /*! loadCSS: load a CSS file asynchronously. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
  129.             !function(a) {
  130.                 "use strict";
  131.                 var b = function(b, c, d) {
  132.                     function j(a) {
  133.                         if (e.body)
  134.                             return a();
  135.                         setTimeout(function() {
  136.                             j(a)
  137.                         })
  138.                     }
  139.                     function l() {
  140.                         f.addEventListener && f.removeEventListener("load", l),
  141.                         f.media = d || "all"
  142.                     }
  143.                     var g,
  144.                         e = a.document,
  145.                         f = e.createElement("link");
  146.                     if (c)
  147.                         g = c;
  148.                     else {
  149.                         var h = (e.body || e.getElementsByTagName("head")[0]).childNodes;
  150.                         g = h[h.length - 1]
  151.                     }
  152.                     var i = e.styleSheets;
  153.                     f.rel = "stylesheet",
  154.                     f.href = b,
  155.                     f.media = "only x",
  156.                     j(function() {
  157.                         g.parentNode.insertBefore(
  158.                             f,
  159.                             c
  160.                                 ? g
  161.                                 : g.nextSibling
  162.                         )
  163.                     });
  164.                     var k = function(a) {
  165.                         for (var b = f.href, c = i.length; c--;)
  166.                             if (i[c].href === b)
  167.                                 return a();
  168.                     setTimeout(function() {
  169.                             k(a)
  170.                         })
  171.                     };
  172.                     return f.addEventListener && f.addEventListener("load", l),
  173.                     f.onloadcssdefined = k,
  174.                     k(l),
  175.                     f
  176.                 };
  177.                 "undefined" != typeof exports
  178.                     ? exports.loadCSS = b
  179.                     : a.loadCSS = b
  180.             }(
  181.                 "undefined" != typeof global
  182.                     ? global
  183.                     : this
  184.             ),
  185.             function(a) {
  186.                 if (a.loadCSS) {
  187.                     var b = loadCSS.relpreload = {};
  188.                     if (b.support = function() {
  189.                         try {
  190.                             return a.document.createElement("link").relList.supports("preload")
  191.                         } catch (a) {}
  192.                     }, b.poly = function() {
  193.                         for (var b = a.document.getElementsByTagName("link"), c = 0; c < b.length; c++) {
  194.                             var d = b[c];
  195.                             "preload" === d.rel && "style" === d.getAttribute("as") && (a.loadCSS(d.href, d), d.rel = null)
  196.                         }
  197.                     }, !b.support()) {
  198.                         b.poly();
  199.                         var c = a.setInterval(b.poly, 300);
  200.                         a.addEventListener && a.addEventListener("load", function() {
  201.                             a.clearInterval(c)
  202.                         })
  203.                     }
  204.                 }
  205.             }(this);
  206.         </script>
  207.         {# ----- Script ----------------------------------------------------- #}
  208.         {# {% for js in encore_entry_js_files('app') %}
  209.             <script src="{{ asset(js) }}" type="text/javascript" defer="defer"></script>
  210.         {% endfor %} #}
  211.         {{ encore_entry_script_tags('app') }}
  212.         
  213.         {% block javascripts %}{% endblock %}
  214.     </body>
  215. </html>