templates/galilea/base.html.twig line 1

  1. <!DOCTYPE html>
  2. {% if '/_sulu_preview' in app.request.requesturi %}
  3.     {% set class = 'preview' %}
  4. {% else %}
  5.     {% set class = 'no-preview' %}
  6. {% endif %}
  7. <html lang="{{ app.request.locale|split('_')[0] }}" class="{{ class }}">
  8. <head>
  9.     <meta charset="UTF-8">
  10.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12.     <link rel="icon" type="image/png" href="{{ asset('/img/galilea/favicon-96x96.png') }}" sizes="96x96" />
  13.     <link rel="icon" type="image/svg+xml" href="{{ asset('/img/galilea/favicon.svg') }}" />
  14.     <link rel="shortcut icon" href="{{ asset('/img/galilea/favicon.ico') }}" />
  15.     <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('/img/galilea/apple-touch-icon.png') }}">
  16.     <link rel="manifest" href="{{ asset('/img/galilea/site.webmanifest') }}" />
  17.     {% if app.environment == 'prod' %}
  18.     <script id="usercentrics-cmp" src="https://web.cmp.usercentrics.eu/ui/loader.js"
  19.             data-settings-id="VCNPls3nbhqecF" async></script>
  20.     {% else %}
  21.     <script id="usercentrics-cmp" src="https://web.cmp.usercentrics.eu/ui/loader.js"
  22.             data-draft="true" data-settings-id="VCNPls3nbhqecF" async></script>
  23.     {% endif %}
  24.     <link rel="preconnect" href="//web.cmp.usercentrics.eu">
  25.     <link rel="preconnect" href="//api.usercentrics.eu">
  26.     <link rel="preload" href="//web.cmp.usercentrics.eu/ui/loader.js" as="script">
  27.     {#    <link rel="manifest" href="/site.webmanifest"> #}
  28.     {# OG Image Default #}
  29.     {% set socialMedia = sulu_snippet_load_by_area('social_media') %}
  30.     {% if socialMedia is not empty and socialMedia['content'] is not empty %}
  31.         {% set defaultOG = socialMedia['content'] %}
  32.         {% if defaultOG['ogImageUrlGlobal'] is not empty %}
  33.             {% set ogImage = defaultOG['ogImageUrlGlobal'] %}
  34.             {% set basePath = app.request.schemeAndHttpHost %}
  35.             {% set ogImagePath = basePath ~  ogImage|thumbnailUrl('320x') %}
  36.         {% endif %}
  37.     {% endif %}
  38.     {# OG Image for specific page #}
  39.     {% if extension is not empty and extension['opengraph'] is not empty %}
  40.         {% set opengraph = extension['opengraph'] %}
  41.         {% if opengraph['ogImageTitle'] is not empty %}
  42.             <meta property="og:title" content="{{ opengraph['ogImageTitle'] }}"/>
  43.         {% endif %}
  44.         {% if opengraph['ogImageDescription'] is not empty %}
  45.             <meta property="og:description" content="{{ opengraph['ogImageDescription'] }}"/>
  46.         {% endif %}
  47.         {% if opengraph['ogImageUrl'] is not empty and opengraph['ogImageUrl']['id'] is not empty %}
  48.             {# Image must be loaded separately #}
  49.             {% set ogImageMedia = sulu_resolve_media(opengraph['ogImageUrl']['id'], app.request.locale|split('_')[0]) %}
  50.             {% if ogImageMedia is not empty %}
  51.                 {% set basePath = app.request.schemeAndHttpHost %}
  52.                 {% set ogImagePath = basePath ~  ogImageMedia|thumbnailUrl('320x') %}
  53.             {% endif %}
  54.         {% endif %}
  55.         {% if opengraph['ogVideoUrl'] is not empty and opengraph['ogVideoUrl']['id'] is not empty %}
  56.             {# Video must be loaded separately #}
  57.             {% set ogVideoMedia = sulu_resolve_media(opengraph['ogVideoUrl']['id'], app.request.locale|split('_')[0]) %}
  58.             {% if ogImageMedia is not empty %}
  59.                 {% set basePath = app.request.schemeAndHttpHost %}
  60.                 {% set ogVideoPath = basePath ~ ogVideoMedia.url %}
  61.             {% endif %}
  62.         {% endif %}
  63.     {% endif %}
  64.     {# OG Video available --> use OG Video #}
  65.     {# Otherwise if OG Image available --> use OG Image #}
  66.     {% if ogVideoPath is defined and ogVideoPath is not empty %}
  67.         <meta property="og:type" content="video.other">
  68.         <meta property="og:video" content="{{ ogVideoPath|replace({'?v=1': ''}) }}"/>
  69.         <meta property="og:video:url" content="{{ ogVideoPath|replace({'?v=1': ''}) }}"/>
  70.         <meta property="og:video:secure_url" content="{{ ogVideoPath|replace({'?v=1': ''}) }}"/>
  71.         <meta property="og:video:type" content="application/mp4"/>
  72.     {% elseif ogImagePath is defined and ogImagePath is not empty %}
  73.         <meta property="og:image" content="{{ ogImagePath|replace({'?v=1-0': ''}) }}"/>
  74.     {% endif %}
  75.     {% if not ogVideoPath is defined or ogVideoPath is empty %}
  76.         <meta property="og:type" content="Website">
  77.     {% endif %}
  78.     <meta name="msapplication-TileColor" content="#011bff">
  79.     <meta name="theme-color" content="#ffffff">
  80.     {% block meta %}
  81.         {% include "@SuluWebsite/Extension/seo.html.twig" with {
  82.             "seo": extension.seo|default([]),
  83.             "content": content|default([]),
  84.             "localizations": localizations|default([]),
  85.             "shadowBaseLocale": shadowBaseLocale|default(),
  86.         } %}
  87.     {% endblock %}
  88.     {% block metaSeo %}
  89.         {# ... #}
  90.     {% endblock metaSeo %}
  91.     {% block style %}
  92.     {% endblock %}
  93.     {% if app.environment == 'prod' and class != "preview" %}
  94.         <!-- Google Tag Services -->
  95.         <script type="text/plain" data-usercentrics="Google Tag Services">
  96.             const elm1 = document.createElement('script');
  97.             elm1.src = 'https://www.googletagmanager.com/gtag/js?id=G-RN6HN7R9HG';
  98.             elm1.async = true;
  99.             document.head.appendChild(elm1);
  100.             window.dataLayer = window.dataLayer || [];
  101.             function gtag(){dataLayer.push(arguments);}
  102.             gtag('js', new Date());
  103.             gtag('config', 'G-RN6HN7R9HG');
  104.         </script>
  105.         <!-- End Google Tag Services -->
  106.         <!-- ahrefs -->
  107.         <script type="text/plain" data-usercentrics="Ahrefs">
  108.             const elm2 = document.createElement('script');
  109.             elm2.src = 'https://analytics.ahrefs.com/analytics.js';
  110.             elm2.setAttribute('data-key', 'OqT0UvhinbqOL8+Op6Alxw');
  111.             elm2.async = true;
  112.             document.head.appendChild(elm2);
  113.         </script>
  114.         <!-- End ahrefs -->
  115.     {% endif %}
  116. </head>
  117. <body class="antialiased bg-brand-50 preload" :class="{'overflow-hidden': $store.header.open}" x-data>
  118. {% if class != "preview" %}
  119.     <script type="module" defer src="{{ asset('assets/galilea/main.js') }}"></script>
  120. {% endif %}
  121. {% if class == "preview" %}
  122.     <script defer src="{{ asset('assets/galilea-preview.js') }}"></script>
  123.     <script> window.disableRevealAnimations = true; </script>
  124. {% endif %}
  125. {% if app.environment == 'prod' and class != "preview" %}
  126. <!-- Google Tag Manager (noscript) -->
  127. <noscript>
  128.     <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W357BM6"
  129.             height="0" width="0" style="display:none;visibility:hidden"></iframe>
  130. </noscript>
  131. <!-- End Google Tag Manager (noscript) -->
  132. {% endif %}
  133. {% block header %}{% endblock %}
  134. <main class="relative z-10 bg-brand-50">
  135.     {% block content %}{% endblock %}
  136.     {{ include('galilea/includes/certification.html.twig') }}
  137. </main>
  138. {% block footer %}{% endblock %}
  139. {% block javascripts %}{% endblock %}
  140. </body>
  141. </html>