templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ (app.request.locale == 'ua') ? 'uk' : app.request.locale }}" translate="no">
  3.     <head>
  4.         <!-- Google Tag Manager -->
  5.         <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  6.                     new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  7.                 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  8.                 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  9.             })(window,document,'script','dataLayer','GTM-MX685C');
  10.         </script>
  11.         <!-- End Google Tag Manager -->
  12.         <!-- Alpaca layer -->
  13.         <!--script>
  14.             (function () {
  15.                 window['alpacaLayer'] = window['alpacaLayer'] || [];
  16.                 var el = document.createElement('script');
  17.                 el.async = true;
  18.                 el.src = 'https://alpaca.otpusk.com/static/dist/main.js';
  19.                 document.head.appendChild(el);
  20.             })();
  21.         </script-->
  22.         <!-- End Alpaca layer -->
  23.         {% set market = app.session.get('market') %}
  24.         {% set locale = app.request.locale %}
  25.         {% set siteUrl = getenv('SITE_URL_'~locale|upper) %}
  26.         {% set route = app.request.attributes.get('_route') %}
  27.         {% block meta %}
  28.             <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  29.             <meta http-equiv='Content-Language' content='{{ (locale == 'ua') ? 'uk_UA' : 'ru_UA' }}'/>
  30.             <meta name="google" content="notranslate">
  31.             <title>{{ seo.title ?? ((locale == 'ua') ? 'Otpusk.ua' : 'Отпуск.com')}}</title>
  32.             <meta name="description" content="{{ seo.description ?? ((locale == 'ua') ? 'Otpusk.ua' : 'Отпуск.com') }}">
  33.             <meta name="keywords" content="{{ seo.keywords ?? ((locale == 'ua') ? 'Otpusk.ua' : 'Отпуск.com') }}">
  34.             <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  35.             <meta property="og:site_name" content="{{ ((locale == 'ua') ? 'Otpusk.ua' : 'Отпуск.com') }}" />
  36.             <meta property="og:type" content="website" />
  37.             <meta property="og:title" content="{{ seo.title ?? ((locale == 'ua') ? 'Otpusk.ua' : 'Отпуск.com')}}" />
  38.             <meta property="og:description" content="{{ seo.description ?? ((locale == 'ua') ? 'Otpusk.ua' : 'Отпуск.com')}}" />
  39.             <meta property="og:url" content="{{ siteUrl }}{% if route == 'app_hotel' %}{{ path('app_hotel', { hotelId: hotel.i, hotelSlug: hotel.h }) }}{% else %}{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}{% endif %}" />
  40.             <meta property="og:image" content="https://www.otpusk.com/static/img/preview-otpusk.jpg"/>
  41.             <meta name="twitter:card" content="summary_large_image" />
  42.             {% if (market.code == 'ua') %}
  43.                 <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('img/favicons/rebranding/apple-touch-icon.png') }}">
  44.                 <link rel="icon" type="image/png" sizes="96x96" href="{{ asset('img/favicons/rebranding/favicon-96x96.png') }}">
  45.                 <link rel="icon" type="image/svg+xml" href="{{ asset('img/favicons/rebranding/favicon.svg') }}">
  46.                 <link rel="icon" type="image/x-icon" href="{{ asset('img/favicons/rebranding/favicon.ico') }}">
  47.             {% else %}
  48.                 <link rel="apple-touch-icon" href="https://www.otpusk.com/static/img/favicon.png" />
  49.                 <link rel="icon" href="https://www.otpusk.com/static/img/favicon.png" />
  50.                 <link rel="shortcut icon" href="https://www.otpusk.com/static/img/favicon.png" />
  51.             {% endif %}
  52.             {% if route == 'app_hotel' %}
  53.                 {% set alternatePath = path('app_hotel', { hotelId: hotel.i, hotelSlug: hotel.h }) %}
  54.             {% else %}
  55.                 {% set alternatePath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
  56.             {% endif %}
  57.             {% if route == 'app_selection' %}
  58.                 {% if 'Ukraine' in selection.getMarketsName %}
  59.                     <link rel='alternate' hreflang='ru-UA' href='https://www.otpusk.com{{ alternatePath }}' />
  60.                     <link rel='alternate' hreflang='uk-UA' href='https://www.otpusk.ua{{ alternatePath }}' />
  61.                 {% endif %}
  62.                 {% if 'Moldova' in selection.getMarketsName %}
  63.                     <link rel='alternate' hreflang='ru-MD' href='https://otpusk.md{{ alternatePath }}' />
  64.                 {% endif %}
  65.                 {% if 'Latvia' in selection.getMarketsName %}
  66.                     <link rel='alternate' hreflang='lv-LV' href='https://travelon.lv{{ alternatePath }}' />
  67.                     <link rel='alternate' hreflang='ru-LV' href='https://ru.travelon.lv{{ alternatePath }}' />
  68.                 {% endif %}
  69.                 {% if 'Lithuania' in selection.getMarketsName %}
  70.                     <link rel='alternate' hreflang='lt-LT' href='https://travelon.lt{{ alternatePath }}' />
  71.                     <link rel='alternate' hreflang='ru-LT' href='https://ru.travelon.lt{{ alternatePath }}' />
  72.                 {% endif %}
  73.             {% else %}
  74.                 <link rel='alternate' hreflang='ru-UA' href='https://www.otpusk.com{{ alternatePath }}' />
  75.                 <link rel='alternate' hreflang='uk-UA' href='https://www.otpusk.ua{{ alternatePath }}' />
  76.                 <link rel='alternate' hreflang='ru-MD' href='https://otpusk.md{{ alternatePath }}' />
  77.                 <link rel='alternate' hreflang='lv-LV' href='https://travelon.lv{{ alternatePath }}' />
  78.                 <link rel='alternate' hreflang='ru-LV' href='https://ru.travelon.lv{{ alternatePath }}' />
  79.                 <link rel='alternate' hreflang='lt-LT' href='https://travelon.lt{{ alternatePath }}' />
  80.                 <link rel='alternate' hreflang='ru-LT' href='https://ru.travelon.lt{{ alternatePath }}' />
  81.             {% endif %}
  82.             {% if route == 'app_hotel' %}
  83.                 <link rel="canonical" href="{{ siteUrl }}{{ path('app_hotel', { hotelId: hotel.i, hotelSlug: hotel.h }) }}" />
  84.             {% else %}
  85.                 <link rel="canonical" href="{{ siteUrl }}{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" />
  86.             {% endif %}
  87.             {% if departureCity is defined and departureCity.id is defined and departureCity.id == 1544 %}
  88.                 <meta name="robots" content="noindex, nofollow">
  89.             {% endif %}
  90.         {% endblock %}
  91.         {% block stylesheets %}
  92.             <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-proxima-nova@1.0.1/style.css" type="text/css">
  93.             <link rel="stylesheet" href="{{ asset('css/reset-styles.css') }}??v=26-01-2024-1" type="text/css">
  94.             <link rel="stylesheet" href="{{ asset('css/swiper.css') }}??v=26-01-2024-1" type="text/css">
  95.             <link rel="stylesheet" href="{{ asset('css/icons.css') }}??v=26-01-2024-1" type="text/css">
  96.             <link rel="stylesheet" href="{{ asset('css/header.css') }}??v=26-01-2024-1" type="text/css">
  97.             <link rel="stylesheet" href="{{ asset('css/footer.css') }}??v=26-01-2024-1" type="text/css">
  98.         {% endblock %}
  99.         {% block javascripts %}
  100. {#            <script src="https://code.jquery.com/jquery-3.2.1.min.js?v=05-10-2022-1" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>#}
  101.             <script src="{{ asset('js/jquery-3.2.1.min.js') }}"></script>
  102.             <script type="text/javascript" src="{{ asset('js/swiper.min.js') }}?v=05-10-2022-1"></script>
  103.             <script src="{{ asset('js/header.js') }}?v=05-10-2022-1"></script>
  104.         {% endblock %}
  105.         {% block ldjson %}
  106.             {% include 'geo/parts/ldjson.html.twig' %}
  107.         {% endblock %}
  108.         {% include 'geo/parts/amplitude.html.twig' %}
  109.     </head>
  110.     <body style="margin-top: 0 !important;" data-market="{{ market.code }}" data-locale="{{ locale }}">
  111.         <!-- Google Tag Manager (noscript) -->
  112.         <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MX685C" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  113.         <!-- End Google Tag Manager (noscript) -->
  114. {#        <div class="covid-19__container">#}
  115. {#            <div class="covid-19__wrapper">#}
  116. {#                <h3 class="covid-19__title">COVID-19:</h3>#}
  117. {#                <a class="covid-19__link" href="/info/covid-19/">{{ 'Правила посещения стран'|trans }}</a>#}
  118. {#            </div>#}
  119. {#        </div>#}
  120.         {% if route not in ['app_search', 'app_tour', 'app_selection', 'app_countries', 'acc_oauth_login'] %}
  121.             <div id="otp_root"></div>
  122.         {% endif %}
  123.         <div class="layout src-containers-layouts-Layout-styles__otpusk {% if route in ['app_search', 'app_tour', 'app_selection', 'app_countries'] %}smallHeader{% endif %}">
  124.             <div class="prefooter-container">
  125.                 <div class="src-components-molecules-BlurWindow-styles__window"></div>
  126.                 {% if route != 'acc_oauth_login' %}
  127.                     {% include 'geo/parts/header.html.twig' %}
  128.                 {% endif %}
  129.                 {% if route in ['app_search', 'app_tour', 'app_selection', 'app_countries'] %}
  130.                     <div id="otp_root"></div>
  131.                 {% endif %}
  132.                 <div class="slider-check"></div>
  133.                 <div class="mobile-check"></div>
  134.                 {% block body %}{% endblock %}
  135.                 <div class="go-up_container">
  136.                     <button>
  137.                         <i class="icon icon-16px i16-control-1"></i>
  138.                         {{ 'Наверх'|trans }}
  139.                     </button>
  140.                 </div>
  141.             </div>
  142.             {% if route != 'acc_oauth_login' %}
  143.                 {% include 'geo/parts/footer.html.twig' %}
  144.             {% endif %}
  145.         </div>
  146.         {% block javascriptsReact %}
  147.             {% if route in ['app_country', 'app_city', 'app_country_search', 'app_city_search', 'app_country_search_season', 'app_city_search_season', 'app_country_search_departure_city', 'app_city_search_departure_city', 'app_country_cities', 'app_country_cities_rubric'] %}
  148.                 <script>
  149.                     var externalFormData = {
  150.                         country: '{{ countryId }}',
  151.                         city: null,
  152.                         departure: '{% if page.departureCity is defined and page.departureCity is not null %}{{ page.departureCity }}{% else %}1544{% endif %}',
  153.                         dates: null
  154.                     };
  155.                     {% if route in ['app_city_search', 'app_city_search_season', 'app_city_search_departure_city'] %}
  156.                         externalFormData.city = '{{ cityId }}';
  157.                     {% endif %}
  158.                     {% if route in ['app_country_search_season', 'app_city_search_season'] %}
  159.                         externalFormData.dates = {
  160.                             from: '{{ dates.from }}.{{ "now"|date("Y") }}',
  161.                             to: '{{ dates.to }}.{{ "now"|date("Y") }}'
  162.                         }
  163.                     {% endif %}
  164.                     {% if route in ['app_country_search_departure_city', 'app_city_search_departure_city'] %}
  165.                         externalFormData.departure = '{{ departureCity.id }}';
  166.                     {% endif %}
  167.                 </script>
  168.             {% endif %}
  169.             <script>
  170.                 var __CHEETAH_APP_CONFIG__ = {
  171.                     access_token: '{{ market.apiTokenFront }}',
  172.                     locale: '{{ locale }}',
  173.                     currency: '{{ market.currency.code }}',
  174.                     adMarketId: '{{ market.advertisingSystemId }}'
  175.                 }
  176.             </script>
  177.             <script src="{{ app.request.getBaseURL() }}/static/cheetah/latest/init.js" type="text/javascript" id="cheetahinit"></script>
  178.             <script>
  179.                 $(document).ready(function() {
  180.                     setTimeout(function () {
  181.                         $('#otp_search_form').addClass('loaded');
  182.                     },1000);
  183.                 });
  184.             </script>
  185.         {% endblock %}
  186.         <script>
  187.             var host = "{{ app.request.getHttpHost() }}";
  188.             var marketName = "{{ market.name|lower }}";
  189.         </script>
  190.         <script src="{{ asset('js/locale.js') }}"></script>
  191.     </body>
  192. </html>