src/PortalBundle/Resources/views/template.html.twig line 1

Open in your IDE?
  1. {# Some pages use Bootstrap 5 #}
  2. {% set isBS5 = bs5|default(false) %}
  3. <!DOCTYPE html>
  4. <html lang="{% if app.request.locale == 'ua' %}uk-ua{% else %}ru-ua{% endif %}">
  5. <head>
  6.     {% if app.environment == 'dev' %}
  7.         <meta name="robots" content="noindex, nofollow">
  8.         <meta name="google-site-verification" content="FWJj2KVU8sswZ4I7nJAffMG7Tj8xgkCr3XX-FgBmAus" />
  9.     {% endif %}
  10.     <link rel="preconnect" href="https://www.googletagmanager.com">
  11.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  12.     <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=0">
  13.     <meta name="google-site-verification" content="VQNmMzLlDoUUKSHDh_Bno6EG39hJYE9s0beA96Dk_vM">
  14.     <meta name="facebook-domain-verification" content="zepah08oy5mc696rqnli2tv1jvovt1">
  15.     <meta charset="utf-8">
  16.     <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.ico">
  17.     <link rel="icon" type="image/png" sizes="32x32" href="/icon-32x32.png">
  18.     <link rel="icon" type="image/png" sizes="16x16" href="/icon-16x16.png">
  19.     <link rel="manifest" href="/manifest.json">
  20.     <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
  21.     <meta name="theme-color" content="#ffffff">
  22.     <meta name="google-site-verification" content="ZnHsXhGdFYfiT15Ky8MUnybMBxinpxLLyl1YX0gInAs">
  23.     <link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/portal/css/portal{{ isBS5 ? 'BS5' : '' }}.css?{{ VERSION }}">
  24.     {% block canonical %}
  25.         {% include '@DcSite/Modules/canonical.html.twig' %}
  26.     {% endblock canonical %}
  27.     {% block head %}
  28.     {% endblock head %}
  29.     {% block ogtagStatic %}
  30.         {% include '@DcSite/Modules/og-tag.html.twig' %}
  31.     {% endblock ogtagStatic %}
  32.     {% block ogtagDynamic %}
  33.     {% endblock ogtagDynamic %}
  34.     {% if INCLUDE_ANALYTICS %}
  35.         <noscript>
  36.             <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=2565496603726688&ev=PageView&noscript=1" alt="facebook">
  37.         </noscript>
  38.         {% include '@DcSite/Modules/google-tag-manager.html.twig' with { 'domain': 'vidi.ua', 'gtmIdCode': 'GTM-TK6DGWW' } %}
  39.     {% endif %}
  40. </head>
  41. <body>
  42. {% if INCLUDE_ANALYTICS %}
  43. <!-- Google Tag Manager (noscript) -->
  44. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TK6DGWW"
  45.                   height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  46. <!-- End Google Tag Manager (noscript) -->
  47. {% endif %}
  48. {% block socialPreview %}
  49. {% endblock socialPreview %}
  50. <div class="wrapper">
  51.     {# Плашка Анонс бар #}
  52.     {% include '@Portal/header-top-bar.html.twig' with {'announcementBar' : announcementBar} %}
  53.     {% include '@Portal/new-header.html.twig' %}
  54.     <main class="main">
  55.         {% include '@Core/Core/preloader.html.twig' %}
  56.         {% block content %}
  57.         {% endblock content %}
  58.     </main>
  59.     {% include '@Portal/Modules/callback-vidi.html.twig' %}
  60.     {% include '@Portal/footer.html.twig' %}
  61.     {% include '@Portal/header-canvas-left.html.twig' %}
  62.     {% include '@Portal/arrow-top-new.html.twig' %}
  63.     {% include '@DcSite/Modules/callback/widget.html.twig' %}
  64.     {% include '@DcSite/Modules/sps-popup.html.twig' %}
  65.     {% include '@My/Modules/cookies-warning.html.twig' with { 'noCookiesCSS': true } %}
  66.     {% include '@My/Modules/auth.html.twig' %}
  67.     {% include '@DcSite/Modules/vidiCoreMessageWrapper.html.twig' %}
  68. </div>
  69. <iframe style="display: none" src="{{ path('my_ios_cross_domain_auth') }}"></iframe>
  70. {% set urlResult = backLoginUrl is defined and backLoginUrl ? backLoginUrl : path('my_about_car') %}
  71. <script>
  72.     window.INCLUDE_ANALYTICS = {{ INCLUDE_ANALYTICS ? 'true' : 'false' }};
  73. </script>
  74. <script src="/dist/{{ MODE }}/portal/js/portal{{ isBS5 ? 'BS5' : '' }}.js?{{ VERSION }}"></script>
  75. <script>
  76.     window.dataLayer = window.dataLayer || [];
  77.     window.app = {
  78.         options: {
  79.             version: '{{ VERSION }}',
  80.             locale: '{{ app.request.locale }}'
  81.         },
  82.         user: {
  83.             id: {% if app.user %} {{ app.user.id }} {% else %}null{% endif %},
  84.             name: {% if app.user %} '{{ app.user.fullName }}' {% else %}null{% endif %}
  85.         }
  86.     };
  87.     $(() => {
  88.         window.core.modules.initCookies({
  89.             policyUrl: "{{ path('portal_privacy_policy') }}",
  90.             site: 'VIDI.UA',
  91.         });
  92.         window.core.modules.initAuthRegistration({
  93.             locale: "{{ app.request.locale }}",
  94.             fbAuthUrl: "{{ path('my_auth_fb_user') }}",
  95.             googleAuthUrl: "{{ path('my_auth_google_user') }}",
  96.             registerConfoirmUrl: "{{ path('my_register_confirm') }}",
  97.             profileUrl: '{{ urlResult }}',
  98.             getCodeUrl: "{{ path('my_register_get_code') }}",
  99.             resendCodeUrl: "{{ path('my_register_resend_reg_code') }}",
  100.             loginCodeUrl: "{{ path('core_register_code_login') }}",
  101.             messageRegisterSuccessTitle: "{{ 'app.message.register.success_title'|trans({},'core') }}",
  102.             messageRegisterSuccessText: "{{ 'app.message.register.success_text'|trans({},'core') }}",
  103.             messageLoginErrorPassword: "{{ 'app.message.login.error_password'|trans({}, 'core') }}",
  104.             messageLoginErrorEmail: "{{ 'app.message.login.error_email'|trans({}, 'core') }}"
  105.         });
  106.         window.core.modules.initAuthChangePhone({
  107.             locale: "{{ app.request.locale }}",
  108.             messageLoginErrorEmail: "{{ 'app.message.login.error_email'|trans({}, 'core') }}",
  109.             getCodeChangePhoneUrl: "{{ path('my_change_phone_get_code') }}",
  110.             setNewPhoneUrl: "{{ path('my_change_phone_set_phone') }}",
  111.             loginCodeUrl: "{{ path('core_register_code_login') }}",
  112.             confirmNewPhoneUrl: "{{ path('my_confirm_new_phone') }}",
  113.             profileUrl: "{{ path('my_about_car') }}"
  114.         });
  115.         window.app.message = window.core.modules.initMessage({
  116.             templateUrl: "{{ path('core_message_load_template') }}",
  117.             text: {
  118.                 btnCancel: "{{ 'app.message.cancel'|trans({},'core') }}"
  119.             }
  120.         });
  121.         window.app.http = window.core.modules.initHttp({
  122.             requestErrorText: "{{ 'app.http.server_error'|trans({},'core') }}"
  123.         });
  124.         window.Track = window.core.modules.initTrack();
  125.         window.app.preLoader = window.core.modules.initPreloader({
  126.             templateUrl: "{{ path('core_preloader_load_template') }}"
  127.         });
  128.         window.app.leadForms = window.core.modules.initLeadForms({
  129.             captchaUrl: '{{ path('base_capthcha_init') }}',
  130.             text: {
  131.                 successTitle: '{{ 'modules.sps_form_title'|trans({}, 'dc_base') }}',
  132.                 successText: '{{ 'modules.sps_form_subtitle'|trans({}, 'dc_base') }}',
  133.                 buttonText: '{{ 'pages.base.ok'|trans({}, 'dc_base') }}'
  134.             },
  135.             href: {
  136.                 buttonSuccess: null,
  137.             },
  138.         });
  139.         window.app.Favorit = window.core.modules.initFavorite({
  140.             addUrl: "{{ path('portal_add_favl') }}",
  141.             removeUrl: "{{ path('portal_remove_favl') }}"
  142.         });
  143.         window.app.Compare = window.core.modules.initCompare();
  144.         const portal = window.portal.portal || window.portal.portalBS5;
  145.         portal.init();
  146.         portal.initViDiCallback({
  147.             createCallbackUrl: '{{ path('callback_widget_create_request') }}',
  148.             getDepartmentUrl: '{{ path('callback_widget_department_vidi') }}',
  149.             getCallbackStateUrl: '{{ path('callback_widget_get_state') }}',
  150.             privacyUrl: '{{ path('portal_privacy_policy') }}',
  151.             callBackMinute: '{{ 'callback_widget.title'|trans({}, 'dc_base')|raw }}',
  152.             callBackWorkingHours: '{{ 'callback_widget.working_hours'|trans({}, 'dc_base') }}'
  153.         });
  154.     });
  155. </script>
  156.  {# Плашка Анонс бар #}
  157. <script>
  158.     document.addEventListener("DOMContentLoaded", function() {
  159.         const charityBar = document.querySelector('.charity_die');
  160.         const closeBtn = document.querySelector('.charity_btn_close');
  161.         const sessionKey = 'charityBarHidden';
  162.         if (sessionStorage.getItem(sessionKey)) {
  163.             charityBar.classList.add('charity_die_hiden');
  164.         } else {
  165.             charityBar.classList.remove('charity_die_hiden');
  166.         }
  167.         closeBtn.addEventListener('click', function() {
  168.             charityBar.classList.add('charity_die_hiden');
  169.             sessionStorage.setItem(sessionKey, 'charity_die_hiden');
  170.         });
  171.     });
  172. </script>
  173. {% if INCLUDE_ANALYTICS %}
  174.     <noscript>
  175.         <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TK6DGWW" height="0" width="0" style="display:none"></iframe>
  176.     </noscript>
  177. {% endif %}
  178. {% if app.user %}
  179. <script type="text/javascript">
  180.     window.dataLayer.push({'user_id': {{ app.user.id }}});
  181. </script>
  182. {% endif %}
  183. {% block script %}
  184. {% endblock script %}
  185. </body>
  186. </html>