templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.locale|split('_')[0] }}">
  3.     {% set locale = app.request.locale %}
  4.     {% set snippets = sulu_snippet_load_by_area('footer') %}
  5.     {% set snippet_contact = sulu_snippet_load_by_area('contact') %}
  6.     {% set contact_off = 0 %}
  7.     {% set ressource_off = 0 %}
  8.     <head>
  9.         <link rel="preload" href="{{ asset('build/website/fonts/YWFT_Ultramagnetic_Rough_Bold_One.otf') }}" as="font" type="font/otf" crossorigin>
  10.         <link rel="preload" href="{{ asset('build/website/fonts/Barlow-Medium.ttf') }}" as="font" type="font/ttf" crossorigin>
  11.         <link rel="preload" href="{{ asset('build/website/fonts/Barlow-Regular.ttf') }}" as="font" type="font/ttf" crossorigin>
  12.         <link rel="preload" href="{{ asset('build/website/fonts/Barlow-SemiBold.ttf') }}" as="font" type="font/ttf" crossorigin>
  13.         <link rel="preload" href="{{ asset('build/website/fonts/Barlow-Black.ttf') }}" as="font" type="font/ttf" crossorigin>
  14.         {% include "css/base-critical-css.html.twig" %}
  15.         <meta charset="utf-8">
  16.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  17.         <meta name="viewport" content="width=device-width, initial-scale=1"> {% block title %}{% endblock %}
  18.         {% block meta %}
  19.             {% include "@SuluWebsite/Extension/seo.html.twig" with {
  20.             "seo": extension.seo|default([]),
  21.             "content": content|default([]),
  22.             "localizations": localizations|default([]),
  23.             "shadowBaseLocale": shadowBaseLocale|default(),
  24.             "defaultLocale": app.request.locale
  25.         } %}
  26.         {% endblock %}
  27.         {% block style %}
  28.             {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'app'} %}
  29.             {% for file in encore_entry_css_files('print') %}
  30.                 <link rel="stylesheet" href="{{ asset(file) }}" type="text/css" crossorigin="anonymous" media="print">
  31.             {% endfor %}
  32.             {% if "registration" in app.request.requestUri
  33.             or "profile" in app.request.requestUri
  34.             or "password" in app.request.requestUri
  35.             or "confirmation" in app.request.requestUri %}
  36.                 {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'profile_css'} %}
  37.             {% endif %}
  38.             {% if "registration" in app.request.requestUri
  39.             or "password" in app.request.requestUri
  40.             or "confirmation" in app.request.requestUri %}
  41.                 {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'registration_css'} %}
  42.             {% endif %}
  43.             <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" type="image/x-icon">
  44.             <link rel="icon" sizes="16x16 32x32" href="{{ asset('favicon-16x16.png') }}">
  45.             <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('apple-touch-icon.png') }}">
  46.             <link rel="icon" type="image/png" sizes="192x192" href="{{ asset('android-chrome-192x192.png') }}">
  47.             <link rel="icon" type="image/png" sizes="512x512" href="{{ asset('android-chrome-512x512.png') }}">
  48.             <link rel="manifest" href="{{ asset('site.webmanifest') }}">
  49.         {% endblock %}
  50.     </head>
  51.     <body>
  52.         {{ source('iconset/iconset.html.twig') }}
  53.         {% include "search-popin.html.twig" %}
  54.         <span id="backToTopButton" class="bgblue jcc aic dflex"><img src="/resources/img/up-arrow-icon.svg" alt="Remonter en haut de la page" width="18" height="20"></span>
  55.         <header class="sticky">
  56.             {% block header %}
  57.                 {% include 'header.html.twig' %}
  58.             {% endblock %}
  59.         </header>
  60.         <main class="prelative">
  61.             {% block content %}{% endblock %}
  62.         </main>
  63.         {% if app.request.pathInfo == "/fr/contact/contactez-nous" %}
  64.             {% set contact_off = 1 %}
  65.         {% endif %}
  66.         {% if app.request.pathInfo == "/fr/contact/proposez-une-ressource" %}
  67.             {% set ressource_off = 1 %}
  68.         {% endif %}
  69.         {% include "contact_snippet.html.twig"  with {'contact_off': contact_off, 'ressource_off': ressource_off} %}
  70.         {% block footer %}
  71.             {% include 'footer.html.twig' %}
  72.         {% endblock %}
  73.         {% block javascripts %}
  74.             {% for file in encore_entry_js_files('app') %}
  75.                 <script src="{{ asset(file) }}" defer="defer"></script>
  76.             {% endfor %}
  77.             <script>
  78.                 {% if snippets.content.email is defined %}const pEmail = document.querySelector('#pqna-email');let email = atob('{{ snippets.content.email|base64_encode }}');pEmail.innerText = email;pEmail.href = `mailto:${email}`;{% endif %}{% if snippets.content.numero is defined and not null %}const pPhone = document.querySelector('#pqna-phone');let phone = atob('{{ snippets.content.numero|base64_encode }}');pPhone.innerText = phone;let hrefTel = phone.replace(/[\s.-]/g, "");pPhone.href = `tel:${hrefTel}`;{% endif %}
  79.             </script>
  80.             <!-- Matomo -->
  81.             <script>
  82.             var _paq = window._paq = window._paq || [];
  83.             / tracker methods like "setCustomDimension" should be called before "trackPageView" /
  84.             _paq.push(['trackPageView']);
  85.             _paq.push(['enableLinkTracking']);
  86.             (function() {
  87.             var u="//matomopqna.fr/";
  88.             _paq.push(['setTrackerUrl', u+'matomo.php']);
  89.             _paq.push(['setSiteId', '1']);
  90.             var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  91.             g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  92.             })();
  93.             </script>
  94.             <!-- End Matomo Code -->
  95.         {% endblock %}
  96.     </body>
  97. </html>