templates/layout.html.twig line 29

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.locale }}">
  3. {% set city = app.request.attributes.get('city', default_city()) %}
  4. {% set metro = app.request.attributes.get('station') ? app.request.attributes.get('station').name|trans : '' %}
  5. {% set months = {
  6.     "January": "Январь",
  7.     "February": "Февраль",
  8.     "March": "Март",
  9.     "April": "Апрель",
  10.     "May": "Май",
  11.     "June": "Июнь",
  12.     "July": "Июль",
  13.     "August": "Август",
  14.     "September": "Сентябрь",
  15.     "October": "Октябрь",
  16.     "November": "Ноябрь",
  17.     "December": "Декабрь"
  18. } %}
  19. {% set view = 'public' %}
  20. {% set alternateLang = city.countryCode == "RU" ? 'ru' :
  21.                        city.countryCode == "UA" ? 'ua' : '' %}
  22. <head>
  23.     <meta charset="utf-8">
  24.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  25.     <meta content="Стрелочки24" name="author"/>
  26.     <meta name="HandheldFriendly" content="true"/>
  27.     <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
  28.     <title>{% apply spaceless %}{% block title %}{% endblock %}{% endapply %}</title>
  29.     {% block metaDescription %}
  30.         <meta name="description" content="">
  31.     {% endblock %}
  32.     {% block metaKeywords %}{% endblock %}
  33.     {% block metaRobots %}{% endblock %}
  34.     {% block stylesheet %}
  35.         {{ encore_entry_link_tags("styles/public", null, 'basicConfig') }}
  36.         {{ encore_entry_link_tags('scripts/index', null, 'basicConfig') }}
  37.     {% endblock %}
  38.     <meta name="robots" content="noarchive">
  39.     <!-- Icons -->
  40.     <link rel="icon" href="{{ asset('assets/images/favicon/favicon.ico')}}" type="image/x-icon">
  41.     <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/images/favicon/apple-touch-icon.png')}}" type="image/png">
  42.     <link rel="manifest" href="{{ asset('assets/images/favicon/manifest.json')}}">
  43.     {% block canonical %}<link rel="canonical" href="{{ canonical_url() }}">{% endblock %}
  44.     {# {% if alternateLang != '' %}<link rel="alternate" href="{{ canonical_url() }}">{% endif %} #}
  45.     {% set crawlerGoogleDetect = app.request.headers.get('X-Detected-Crawler') == 'google' or app.request.host matches '/^g[a-z0-9]+\./' %}
  46.     {% if ym_tracker_id %}
  47.         <!-- Yandex.Metrika counter -->
  48.         <script type="text/javascript" >
  49.             (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
  50.                 m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
  51.             (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
  52.             ym({{ ym_tracker_id }}, "init", {
  53.                 clickmap:true,
  54.                 trackLinks:true,
  55.                 accurateTrackBounce:true
  56.             });
  57.         </script>
  58.         <noscript><div><img src="https://mc.yandex.ru/watch/{{ ym_tracker_id }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  59.         <!-- /Yandex.Metrika counter -->
  60.     {% endif %}
  61.     {% if ga_tracker_id and crawlerGoogleDetect %}
  62.         <!-- Global site tag (gtag.js) - Google Analytics -->
  63.         <script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_tracker_id }}"></script>
  64.         <script>
  65.             window.dataLayer = window.dataLayer || [];
  66.             function gtag(){dataLayer.push(arguments);}
  67.             gtag('js', new Date());
  68.             gtag('config', '{{ ga_tracker_id }}');
  69.         </script>
  70.     {% endif %}
  71.     {% block alternate %}{% endblock %}
  72. </head>
  73. {% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
  74. <body data-current-page="{% block name_page %}index{% endblock %}"
  75.       data-id="strelki"{% if is_granted('ROLE_USER') %} data-login="true"{% endif %}
  76.         {% block account_page %}data-kab="false"{% endblock %}
  77.         data-svg-path="{{ asset('assets/images/icons/svg-library.svg') }}"
  78.       class="{% block bodyClasses %}{% endblock %}">
  79. <div class="wrapper">
  80.     {% block header %}
  81.         {% include 'components/header.html.twig' %}
  82.     {% endblock %}
  83.     {% block grid %}{% endblock %}
  84.     {% block footer %}
  85.         {% include 'components/footer.html.twig' %}
  86.     {% endblock %}
  87. </div>
  88. {% block modals %}
  89.     {% include 'components/modals.html.twig' %}
  90. {% endblock %}
  91. {% block javascripts %}
  92.     {{ encore_entry_script_tags('scripts/scripts_bootstrap', null, 'basicConfig') }}
  93.     {{ encore_entry_script_tags('scripts/scripts_main', null, 'basicConfig') }}
  94.     {{ encore_entry_script_tags('scripts/index', null, 'basicConfig') }}
  95.     {% include 'components/profile_ctr.js.twig' %}
  96. {% endblock %}
  97. </body>
  98. </html>