templates/layout.html.twig line 1

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.     <!-- Icons -->
  39.     <link rel="icon" href="{{ asset('assets/images/favicon/favicon.ico')}}" type="image/x-icon">
  40.     <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/images/favicon/apple-touch-icon.png')}}" type="image/png">
  41.     <link rel="manifest" href="{{ asset('assets/images/favicon/manifest.json')}}">
  42.     {% block canonical %}<link rel="canonical" href="{{ canonical_url() }}">{% endblock %}
  43.     {# {% if alternateLang != '' %}<link rel="alternate" href="{{ canonical_url() }}">{% endif %} #}
  44.     {% set crawlerGoogleDetect = app.request.headers.get('X-Detected-Crawler') == 'google' or app.request.host matches '/^g[a-z0-9]+\./' %}
  45.     {% if ym_tracker_id %}
  46.         <!-- Yandex.Metrika counter -->
  47.         <script type="text/javascript" >
  48.             (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
  49.                 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)})
  50.             (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
  51.             ym({{ ym_tracker_id }}, "init", {
  52.                 clickmap:true,
  53.                 trackLinks:true,
  54.                 accurateTrackBounce:true
  55.             });
  56.         </script>
  57.         <noscript><div><img src="https://mc.yandex.ru/watch/{{ ym_tracker_id }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  58.         <!-- /Yandex.Metrika counter -->
  59.     {% endif %}
  60.     {% if ga_tracker_id and crawlerGoogleDetect %}
  61.         <!-- Global site tag (gtag.js) - Google Analytics -->
  62.         <script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_tracker_id }}"></script>
  63.         <script>
  64.             window.dataLayer = window.dataLayer || [];
  65.             function gtag(){dataLayer.push(arguments);}
  66.             gtag('js', new Date());
  67.             gtag('config', '{{ ga_tracker_id }}');
  68.         </script>
  69.     {% endif %}
  70.     {% block alternate %}{% endblock %}
  71. </head>
  72. {% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
  73. <body data-current-page="{% block name_page %}index{% endblock %}"
  74.       data-id="strelki"{% if is_granted('ROLE_USER') %} data-login="true"{% endif %}
  75.         {% block account_page %}data-kab="false"{% endblock %}
  76.         data-svg-path="{{ asset('assets/images/icons/svg-library.svg') }}"
  77.       class="{% block bodyClasses %}{% endblock %}">
  78. <div class="wrapper">
  79.     {% block header %}
  80.         {% include 'components/header.html.twig' %}
  81.     {% endblock %}
  82.     {% block grid %}{% endblock %}
  83.     {% block footer %}
  84.         {% include 'components/footer.html.twig' %}
  85.     {% endblock %}
  86. </div>
  87. {% block modals %}
  88.     {% include 'components/modals.html.twig' %}
  89. {% endblock %}
  90. {% block javascripts %}
  91.     {{ encore_entry_script_tags('scripts/scripts_bootstrap', null, 'basicConfig') }}
  92.     {{ encore_entry_script_tags('scripts/scripts_main', null, 'basicConfig') }}
  93.     {{ encore_entry_script_tags('scripts/index', null, 'basicConfig') }}
  94.     {% include 'components/profile_ctr.js.twig' %}
  95. {% endblock %}
  96. </body>
  97. </html>