{block name='snippets-maintenance'}
    {block name='snippets-maintenance-header-doctype'}<!DOCTYPE html>{/block}
    {et_isShopVersionAtLeast value="5.3.0-rc.3" assign='shopIsAtLeast53'}
    <html {block name='snippets-maintenance-header-html-attributes'}lang="{$meta_language}" itemscope {if $nSeitenTyp === $smarty.const.URLART_ARTIKEL}itemtype="https://schema.org/ItemPage"
          {elseif $nSeitenTyp === $smarty.const.URLART_KATEGORIE}itemtype="https://schema.org/CollectionPage"
          {else}itemtype="https://schema.org/WebPage"{/if}{/block}>
    {block name='snippets-maintenance-header-head'}
        <head>
            {block name='snippets-maintenance-header-head-meta'}
                <meta http-equiv="content-type" content="text/html; charset={$smarty.const.JTL_CHARSET}">
                <meta name="description" itemprop="description" content={block name='snippets-maintenance-header-head-meta-description'}"{$meta_description|truncate:1000:"":true}{/block}">
                {if !empty($meta_keywords)}
                    <meta name="keywords" itemprop="keywords" content="{block name='snippets-maintenance-header-head-meta-keywords'}{$meta_keywords|truncate:255:'':true}{/block}">
                {/if}
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="robots" content="{if $robotsContent}{$robotsContent}{elseif $bNoIndex === true  || (isset($Link) && $Link->getNoFollow() === true)}noindex{else}index, follow{/if}">

                <meta itemprop="url" content="{$cCanonicalURL}"/>
                <meta property="og:type" content="website" />
                <meta property="og:site_name" content="{$meta_title}" />
                <meta property="og:title" content="{$meta_title}" />
                <meta property="og:description" content="{$meta_description|truncate:1000:"":true}" />
                <meta property="og:url" content="{$cCanonicalURL}"/>

                {if $nSeitenTyp === $smarty.const.PAGE_ARTIKEL && !empty($Artikel->Bilder)}
                    <meta itemprop="image" content="{$Artikel->Bilder[0]->cURLGross}" />
                    <meta property="og:image" content="{$Artikel->Bilder[0]->cURLGross}">
                {elseif $nSeitenTyp === $smarty.const.PAGE_NEWSDETAIL && !empty($newsItem->getPreviewImage())}
                    <meta itemprop="image" content="{$imageBaseURL}{$newsItem->getPreviewImage()}" />
                    <meta property="og:image" content="{$imageBaseURL}{$newsItem->getPreviewImage()}" />
                {else}
                    <meta itemprop="image" content="{$ShopLogoURL}" />
                    <meta property="og:image" content="{$ShopLogoURL}" />
                {/if}

            {/block}
            <title itemprop="name">{block name='snippets-maintenance-header-head-title'}{$meta_title}{/block}</title>

            {if !empty($cCanonicalURL)}
                <link rel="canonical" href="{$cCanonicalURL}">
            {/if}

            {block name='snippets-maintenance-header-head-icons'}
                {if $shopIsAtLeast53}
                    {* The links here will be caught by the 5.3.0 FaviconFileCheckMiddleware and will generate the respective files if they do not exist *}
                    <link rel="icon" href="{$ShopURL}/favicon.ico" sizes="48x48" >
                    <link rel="icon" href="{$ShopURL}/favicon.svg" sizes="any" type="image/svg+xml">
                    <link rel="apple-touch-icon" href="{$ShopURL}/apple-touch-icon.png"/>
                    <link rel="manifest" href="{$ShopURL}/site.webmanifest" />
                    <meta name="msapplication-TileImage" content="{$ShopURL}/mstile-144x144.png">
                {else}
                    <link type="image/x-icon" href="{$shopFaviconURL}" rel="icon">
                {/if}
            {/block}

            {block name='snippets-maintenance-header-head-resources'}
                {if empty($parentTemplateDir)}
                    {$templateDir = $currentTemplateDir}
                {else}
                    {$templateDir = $parentTemplateDir}
                {/if}
                {et_isPreviewMode assign='etIsPreviewMode'}
                <style id="criticalCSS">
                    {block name='snippets-maintenance-head-resources-crit'}
                        {if !$etIsPreviewMode}
                            {if file_exists("{$currentThemeDir}css/theme-crit.css")}
                                {file_get_contents("{$currentThemeDir}css/theme-crit.css")}
                            {elseif !empty($parentTemplateDir)}
                                {file_get_contents("{$parentTemplateDir}themes/default/css/theme-crit.css")}
                            {/if}
                        {else}
                            {if file_exists("{$currentThemeDir}css/theme-crit-preview.css")}
                                {file_get_contents("{$currentThemeDir}css/theme-crit-preview.css")}
                            {elseif !empty($parentTemplateDir)}
                                {file_get_contents("{$parentTemplateDir}themes/default/css/theme-crit-preview.css")}
                            {/if}
                        {/if}
                    {/block}
                </style>
                {* css *}
                {if $Einstellungen.template.general.use_minify === 'N' || $etIsPreviewMode}
                    {foreach $cCSS_arr as $cCSS}
                        <link rel="preload" href="{$ShopURL}/{if !$etIsPreviewMode}{$cCSS}{else}{$cCSS|replace:'theme.css':'theme-preview.css'}{/if}?v={$nTemplateVersion}&ts={et_getCompilationTimestamp}" as="style"
                          onload="this.onload=null;this.rel='stylesheet'">
                    {/foreach}
                    {if isset($cPluginCss_arr)}
                        {foreach $cPluginCss_arr as $cCSS}
                            <link rel="preload" href="{$ShopURL}/{$cCSS}?v={$nTemplateVersion}" as="style"
                              onload="this.onload=null;this.rel='stylesheet'">
                        {/foreach}
                    {/if}
                    <noscript>
                        {foreach $cCSS_arr as $cCSS}
                            <link rel="stylesheet" href="{$ShopURL}/{if !$etIsPreviewMode}{$cCSS}{else}{$cCSS|replace:'theme.css':'theme-preview.css'}{/if}?v={$nTemplateVersion}&ts={et_getCompilationTimestamp}">
                        {/foreach}
                        {if isset($cPluginCss_arr)}
                            {foreach $cPluginCss_arr as $cCSS}
                                <link href="{$ShopURL}/{$cCSS}?v={$nTemplateVersion}" rel="stylesheet">
                            {/foreach}
                        {/if}
                    </noscript>
                {else}
                    <link rel="preload" href="{$ShopURL}/{$combinedCSS}{if $Einstellungen.template.general.use_minify !== 'static'}{if !empty($combinedCSS) && strpos($combinedCSS, '?') !== false}&{else}?{/if}v={$nTemplateVersion}&ts={et_getCompilationTimestamp}{/if}" as="style" onload="this.onload=null;this.rel='stylesheet'">
                    <noscript>
                        <link href="{$ShopURL}/{$combinedCSS}{if $Einstellungen.template.general.use_minify !== 'static'}{if !empty($combinedCSS) && strpos($combinedCSS, '?') !== false}&{else}?{/if}v={$nTemplateVersion}&ts={et_getCompilationTimestamp}{/if}" rel="stylesheet">
                    </noscript>
                {/if}

                {if count(JTL\Session\Frontend::getLanguages()) > 1}
                    {foreach JTL\Session\Frontend::getLanguages() as $language}
                        <link rel="alternate" hreflang="{$language->getIso639()}" href="{$language->getUrl()}">
                    {/foreach}
                {/if}
                {block name="et-maintenance-header-scripts-jquery"}
                    <script src="{$ShopURL}/{$templateDir}js/jquery-3.7.1.min.js"></script>
                {/block}
                {block name="et-maintenance-header-script-bootstrap-bundle"}
                    <script defer src="{$ShopURL}/{$templateDir}js/bootstrap.bundle.js"></script>
                {/block}
            {/block}
        </head>
    {/block}
        {block name='snippets-maintenance-content'}
        <body id="main-wrapper" class="maintenance-main-wrapper text-center-util font-size-1.5x vh-100">
            <div class="container-fluid maintenance-main">
                {block name='snippets-maintenance-content-language'}
                    <div class="row">
                        <div class="col col-12 col-md-6 offset-md-3 maintenance-main-item">
                        {strip}
                            <ul class="nav nav-dividers" style="justify-content:center;">
                                {block name='snippets-maintenance-content-include-language-dropdown'}
                                    {include file='snippets/language_dropdown.tpl' dropdownClass='mx-auto'}
                                {/block}
                            </ul>
                        {/strip}
                        </div>
                    </div>
                {/block}
                {block name='snippets-maintenance-content-maintenance'}
                     <div class="row">
                        <div class="col col-12 col-md-6 offset-md-3 maintenance-main-item">
                            {block name='snippets-maintenance-content-maintenance-logo'}
                                {if isset($ShopLogoURL)}
                                    {image src=$ShopLogoURL
                                        alt=$Einstellungen.global.global_shopname
                                        class="maintenance-main-image"
                                        style="{if strpos($ShopLogoURL, '.svg') !== false}height: 100px;{/if}"}
                                {else}
                                    <span class="h1">{$Einstellungen.global.global_shopname}</span>
                                {/if}
                            {/block}
                            {block name='snippets-maintenance-content-maintenance-heading'}
                                <h1 class="maintenance-main-heading">{lang key='maintainance'}</h1>
                            {/block}
                            {block name='snippets-maintenance-content-maintenance-notice'}
                                <div class="maintenance-main-notice">
                                    <p>{lang key='maintenanceModeActive'}</p>
                                </div>
                            {/block}
                        </div>
                    </div>
                {/block}
                {if isset($oSpezialseiten_arr[$smarty.const.LINKTYP_IMPRESSUM])}
                {block name='snippets-maintenance-content-imprint'}
                    <div id="footer" class="row flex-grow-1">
                        <div class="col col-12 col-md-6 offset-md-3 small">
                            <h2 class="mt-2">{$oSpezialseiten_arr[$smarty.const.LINKTYP_IMPRESSUM]->getTitle()}</h2>
                            <p>{$oSpezialseiten_arr[$smarty.const.LINKTYP_IMPRESSUM]->getContent()}</p>
                        </div>
                    </div>
                {/block}
                {/if}
            </div>
        </body>
        {/block}
    </html>
{/block}
