templates/layout.html.twig line 70

Open in your IDE?
  1. {% if document.getTitle() is defined and document.getTitle() is not empty %}
  2.     {% do pimcore_head_title().set(document.getTitle()) %}
  3. {% else %}
  4.     {% do pimcore_head_title().set('BMW Timmermanns') %}
  5. {% endif %}
  6. {% set brandStyles = document.getProperty('brandStyles') | default('none') %}
  7. {{ pimcore_head_script() }}
  8. <!DOCTYPE html>
  9. <html lang="de">
  10. <head>
  11.     <meta charset="UTF-8">
  12.     {{ pimcore_head_title() }}
  13.     <meta name="viewport" content="width=device-width, initial-scale=1">
  14.     {% if document.getProperty('nocookiebanner') != true %}
  15.         {{ include('Includes/cookiebot.html.twig') }}
  16.         {{ include('Includes/tracking_google_tag_manager.html.twig') }}
  17.     {% endif %}
  18.     <link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon/apple-touch-icon.png">
  19.     <link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">
  20.     <link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
  21.     <link rel="manifest" href="/assets/img/favicon/site.webmanifest">
  22.     <link rel="mask-icon" href="/assets/img/favicon/safari-pinned-tab.svg" color="#00528E">
  23.     <link rel="shortcut icon" href="/assets/img/favicon/favicon.ico">
  24.     <meta name="msapplication-TileColor" content="#00528E">
  25.     <meta name="msapplication-config" content="/assets/img/favicon/browserconfig.xml">
  26.     <meta name="theme-color" content="#ffffff">
  27.     <link rel="stylesheet" href="/assets/css/main.css?v=69232de{% include 'jenkins-build-no.txt' ignore missing %}">
  28.     {% if brandStyles == 'Mini' %}
  29.         <link rel="stylesheet" href="/assets/css/mini-additions.css">
  30.     {% endif %}
  31.     {% if editmode %}
  32.         <style>
  33.             [data-name='header'] {
  34.                 z-index: 1300;
  35.             }
  36.             .pimcore_editable_areablock[name='header'] > .pimcore_block_plus,
  37.             .pimcore_editable_areablock[name='header'] > .pimcore_block_options {
  38.                 position: relative;
  39.                 z-index: 100;
  40.             }
  41.         </style>
  42.     {% endif %}
  43.     <style>
  44.         nav.locations-nav ul {
  45.             display: flex;
  46.             gap: 4.625rem;
  47.             margin: 0;
  48.         }
  49.         .skip-link {
  50.             position: absolute;
  51.             left: -999px;
  52.             background: #000;
  53.             color: #fff;
  54.             padding: 8px 16px;
  55.             z-index: 1000;
  56.         }
  57.         .skip-link:focus {
  58.             left: 0;
  59.         }
  60.     </style>
  61. </head>
  62. <body>
  63. <a href="#main-content" class="skip-link">Zum Inhalt springen</a>
  64. <header>
  65.     {% include '@FormBuilder/common/redirect-flash-message.html.twig' %}
  66.     {% include "./partials/_main-navigation.html.twig" with { 'brandStyles' : brandStyles } %}
  67.     {{ pimcore_inc('/shared/includes/quick-access-bar') }}
  68.     {{ pimcore_areablock('header', {
  69.         'allowed': ['keyvisual','calendar-overview'],
  70.         'limits': {'keyvisual': 1},
  71.         'class': 'position-relative',
  72.         'reload': true
  73.     }) }}
  74. </header>
  75. <main id="main-content">
  76.     {{ block('content') }}
  77. </main>
  78. {% set showBasicFooter = document.getProperty('showBasicFooter') %}
  79. {% if showBasicFooter %}
  80.     {{ pimcore_inc('/shared/includes/footer-basic') }}
  81. {% else %}
  82.     {{ pimcore_inc('/shared/includes/footer') }}
  83. {% endif %}
  84. {{ include('Includes/contact_forms.html.twig') }}
  85. <script src="https://timmermanns.de/assets/js/app.js"></script>
  86. <script>
  87.     /* Do things after DOM has fully loaded */
  88.     let readyLayout = (callback) => {
  89.         if (document.readyState !== 'loading') callback();
  90.         else document.addEventListener('DOMContentLoaded', callback);
  91.     };
  92.     const openCheck = (dialog) => {
  93.         if (!dialog.open) {
  94.             dialog.showModal();
  95.         }
  96.     };
  97.     readyLayout(() => {
  98.         let contactForm = document.querySelector('form#contact_form');
  99.         let contactFormName = contactForm.getAttribute('name');
  100.         let contactFormUrlField = contactFormName + '_url';
  101.         let contactFormSourceContextField = contactFormName + '_source_context';
  102.         let contactFormDealerdeskTypeField = contactFormName + '_dealerdeskType';
  103.         const dialog = document.getElementById('modal-iframe-zoho');
  104.         document.getElementById(contactFormUrlField).value = window.location.href;
  105.         document.getElementById(contactFormDealerdeskTypeField).value = 'CASE'; // Default value
  106.         contactForm.setAttribute('action', '//' + window.location.hostname);
  107.         const contactFormError = document.querySelector('form#contact_form .is-invalid');
  108.         const contactFormSuccess = document.querySelector('form#contact_form .alert.alert-success');
  109.         const qaLinkButtons = document.querySelectorAll(`[id^="qa-link-"]`);
  110.         const contactFormRow = document.querySelectorAll('form#contact_form .formbuilder-row')
  111.         const mandatoryDescription = document.querySelector('dialog .mandatory-description')
  112.         qaLinkButtons.forEach(btn => {
  113.             btn.addEventListener("click", function (e) {
  114.                 if (contactFormSuccess) {
  115.                     contactFormSuccess.remove();
  116.                 }
  117.                 mandatoryDescription.style.display = 'block';
  118.                 contactFormRow.forEach(row => {
  119.                     row.style.display = 'block';
  120.                 });
  121.             });
  122.         });
  123.         if (contactFormError) {
  124.             openCheck(dialog);
  125.             const contactFormErrorBadge = document.querySelectorAll('form#contact_form .form-error-icon.badge');
  126.             contactFormErrorBadge.forEach(error => {
  127.                 error.remove();
  128.             });
  129.         } else if (contactFormSuccess) {
  130.             openCheck(dialog);
  131.             mandatoryDescription.style.display = 'none';
  132.             contactFormRow.forEach(row => {
  133.                 row.style.display = 'none';
  134.             });
  135.         }
  136.     });
  137. </script>
  138. </body>
  139. </html>