templates/base.html.twig line 1
<!DOCTYPE html>
{% if '/_sulu_preview' in app.request.requesturi %}
{% set class = 'preview' %}
{% else %}
{% set class = 'no-preview' %}
{% endif %}
<html lang="{{ app.request.locale|split('_')[0] }}" class="{{ class }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('/img/apple-touch-icon.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('/img/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('/img/favicon-16x16.png') }}">
<script id="usercentrics-cmp" src="https://app.usercentrics.eu/browser-ui/latest/loader.js"
data-version="preview" data-settings-id="rUzp4CflN" async></script>
<link rel="preconnect" href="//app.usercentrics.eu">
<link rel="preconnect" href="//api.usercentrics.eu">
<link rel="preload" href="//app.usercentrics.eu/browser-ui/latest/loader.js" as="script">
{# <link rel="manifest" href="/site.webmanifest"> #}
{# OG Image Default #}
{% set socialMedia = sulu_snippet_load_by_area('social_media') %}
{% if socialMedia is not empty and socialMedia['content'] is not empty %}
{% set defaultOG = socialMedia['content'] %}
{% if defaultOG['ogImageUrlGlobal'] is not empty %}
{% set ogImage = defaultOG['ogImageUrlGlobal'] %}
{% set basePath = app.request.schemeAndHttpHost %}
{% set ogImagePath = basePath ~ ogImage.thumbnails['320x'] %}
{% endif %}
{% endif %}
{# OG Image for specific page #}
{% if extension is not empty and extension['opengraph'] is not empty %}
{% set opengraph = extension['opengraph'] %}
{% if opengraph['ogImageTitle'] is not empty %}
<meta property="og:title" content="{{ opengraph['ogImageTitle'] }}"/>
{% endif %}
{% if opengraph['ogImageDescription'] is not empty %}
<meta property="og:description" content="{{ opengraph['ogImageDescription'] }}"/>
{% endif %}
{% if opengraph['ogImageUrl'] is not empty and opengraph['ogImageUrl']['id'] is not empty %}
{# Image must be loaded separately #}
{% set ogImageMedia = sulu_resolve_media(opengraph['ogImageUrl']['id'], app.request.locale|split('_')[0]) %}
{% if ogImageMedia is not empty %}
{% set basePath = app.request.schemeAndHttpHost %}
{% set ogImagePath = basePath ~ ogImageMedia.thumbnails['320x'] %}
{% endif %}
{% endif %}
{% if opengraph['ogVideoUrl'] is not empty and opengraph['ogVideoUrl']['id'] is not empty %}
{# Video must be loaded separately #}
{% set ogVideoMedia = sulu_resolve_media(opengraph['ogVideoUrl']['id'], app.request.locale|split('_')[0]) %}
{% if ogImageMedia is not empty %}
{% set basePath = app.request.schemeAndHttpHost %}
{% set ogVideoPath = basePath ~ ogVideoMedia.url %}
{% endif %}
{% endif %}
{% endif %}
{# OG Video available --> use OG Video #}
{# Otherwise if OG Image available --> use OG Image #}
{% if ogVideoPath is defined and ogVideoPath is not empty %}
<meta property="og:type" content="video.other">
<meta property="og:video" content="{{ ogVideoPath|replace({'?v=1': ''}) }}"/>
<meta property="og:video:url" content="{{ ogVideoPath|replace({'?v=1': ''}) }}"/>
<meta property="og:video:secure_url" content="{{ ogVideoPath|replace({'?v=1': ''}) }}"/>
<meta property="og:video:type" content="application/mp4"/>
{% elseif ogImagePath is defined and ogImagePath is not empty %}
<meta property="og:image" content="{{ ogImagePath|replace({'?v=1-0': ''}) }}"/>
{% endif %}
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
{% block meta %}
{% include "@SuluWebsite/Extension/seo.html.twig" with {
"seo": extension.seo|default([]),
"content": content|default([]),
"localizations": localizations|default([]),
"shadowBaseLocale": shadowBaseLocale|default(),
} %}
{% endblock %}
{% block metaSeo %}
{# ... #}
{% endblock metaSeo %}
{% block style %}
{% endblock %}
</head>
<body>
{% if class != "preview" %}
<script defer src="{{ asset('assets/index.js') }}"></script>
{% endif %}
{% if class == "preview" %}
<script defer src="{{ asset('assets/modal-preview.js') }}"></script>
<script> window.disableRevealAnimations = true; </script>
{% endif %}
<div class="page-wrapper" x-data="page" x-cloak>
<div class="page">
{# {{ include('/includes/header-nav.html.twig') }} #}
{% block header %}
{% endblock %}
{# <form action="{{ path('sulu_search.website_search') }}" method="GET"> #}
{# <input name="q" type="text" placeholder="Search"/> #}
{# <input type="submit" value="Go"/> #}
{# </form> #}
<main>
{% block content %}{% endblock %}
</main>
{% block footer %}
{% endblock %}
</div>
</div>
{% block javascripts %}{% endblock %}
</body>
</html>