templates/layout.html.twig line 5

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 accountUrl = is_user_advertiser(app.user) ? path('account') : path('account.favourites.profiles') %}
  6. {% set months = {
  7.     "January": "Январь",
  8.     "February": "Февраль",
  9.     "March": "Март",
  10.     "April": "Апрель",
  11.     "May": "Май",
  12.     "June": "Июнь",
  13.     "July": "Июль",
  14.     "August": "Август",
  15.     "September": "Сентябрь",
  16.     "October": "Октябрь",
  17.     "November": "Ноябрь",
  18.     "December": "Декабрь"
  19. } %}
  20. <head>
  21.     <meta charset="utf-8">
  22.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  23.     <meta content="" name="author"/>
  24.     <meta name="HandheldFriendly" content="true"/>
  25.     <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
  26.     <title>{% apply spaceless %}{%- block title -%}{% endblock %}{% endapply %}</title>
  27.     {% block metaDescription %}
  28.         <meta name="description" content="{{ seo_description() }}">
  29.     {% endblock %}
  30.     {% block metaKeywords %}{% endblock %}
  31.     {% block metaRobots %}{% endblock %}
  32.     {% block stylesheet %}
  33.         {{ encore_entry_link_tags("styles/main-public", null, 'basicConfig') }}
  34.     {% endblock %}
  35.     <link rel="shortcut icon" href="{{ asset('assets/images/favicon/favicon.ico','basicConfig') }}">
  36.     <link rel="apple-touch-icon" sizes="180x180"
  37.           href="{{ asset('assets/images/favicon/apple-touch-icon.png','basicConfig') }}">
  38.     <link rel="icon" type="image/png" sizes="32x32"
  39.           href="{{ asset('assets/images/favicon/favicon-32x32.png','basicConfig') }}">
  40.     <link rel="icon" type="image/png" sizes="16x16"
  41.           href="{{ asset('assets/images/favicon/favicon-16x16.png','basicConfig') }}">
  42.     <meta name="msapplication-TileColor" content="#897956">
  43.     <meta name="theme-color" content="#897956">
  44.     <meta name="apple-mobile-web-app-title" content="Dosug 7/24"/>
  45.     <meta name="application-name" content="Dosug 7/24"/>
  46.     <meta name="robots" content="noarchive">
  47.     {% block preconnect %}
  48.         {%- if responsive_media_base_url is defined -%}
  49.             <link rel="preconnect" href="{{ responsive_media_base_url|replace({'responsive': 'assets'}) }}" />
  50.             <link rel="preconnect" href="{{ responsive_media_base_url }}" />
  51.         {%- endif -%}
  52.         <link rel="preconnect" href="https://mc.yandex.ru">
  53.         <link rel="preconnect" href="https://www.googletagmanager.com">
  54.     {% endblock %}
  55.     {% block canonical %}<link rel="canonical" href="{{ canonical_url() }}">{% endblock %}
  56.     {% set crawlerGoogleDetect = app.request.headers.get('X-Detected-Crawler') == 'google' or app.request.host matches '/^g[a-z0-9]+\./' %}
  57.     {% if ym_tracker_id %}
  58.         <!-- Yandex.Metrika counter -->
  59.         <script type="text/javascript" >
  60.             (function (d, w, c) {
  61.                 (w[c] = w[c] || []).push(function() {
  62.                     try {
  63.                         w.yaCounter{{ ym_tracker_id }} = new Ya.Metrika({
  64.                             id:{{ ym_tracker_id }},
  65.                             clickmap:true,
  66.                             trackLinks:true,
  67.                             accurateTrackBounce:true
  68.                         });
  69.                     } catch(e) { }
  70.                 });
  71.                 var n = d.getElementsByTagName("script")[0],
  72.                     s = d.createElement("script"),
  73.                     f = function () { n.parentNode.insertBefore(s, n); };
  74.                 s.type = "text/javascript";
  75.                 s.async = true;
  76.                 s.src = "https://mc.yandex.ru/metrika/watch.js";
  77.                 if (w.opera == "[object Opera]") {
  78.                     d.addEventListener("DOMContentLoaded", f, false);
  79.                 } else { f(); }
  80.             })(document, window, "yandex_metrika_callbacks");
  81.         </script>
  82.         <noscript><div><img src="https://mc.yandex.ru/watch/{{ ym_tracker_id }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  83.         <!-- /Yandex.Metrika counter -->
  84.     {% endif %}
  85.     {% if ga_tracker_id and crawlerGoogleDetect %}
  86.         <!-- Google tag (gtag.js) -->
  87.         <script async src="https://www.googletagmanager.com/gtag/js?id={{ga_tracker_id}}"></script>
  88.         <script>
  89.             window.dataLayer = window.dataLayer || [];
  90.             function gtag(){dataLayer.push(arguments);}
  91.             gtag('js', new Date());
  92.             gtag('config', '{{ga_tracker_id}}');
  93.         </script>
  94.     {% endif %}
  95. </head>
  96. {% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
  97. <body data-lang="{{ app.request.locale }}" data-page="{% block name_page %}index{% endblock %}"
  98.       data-site="spb"{% if is_granted('ROLE_USER') %} data-login="true"{% endif %}
  99.         {% block account_page %}data-account="false"{% endblock %}
  100.       class="{% block bodyClasses %}{% endblock %}">
  101. <div class="wrapper{% block wrapper_class %}{% endblock %}">
  102.     {% block modals %}
  103.         {% include 'components/modals.html.twig' %}
  104.     {% endblock %}
  105.     {% block header %}
  106.         {% include 'components/header.html.twig' %}
  107.     {% endblock %}
  108.     {% block grid %}{% endblock %}
  109.     {% block footer %}
  110.         {% include 'components/footer.html.twig' %}
  111.     {% endblock %}
  112. </div>
  113.  {% block javascripts %}
  114.     {{ encore_entry_script_tags('scripts/bootstrap_theme', null, 'basicConfig') }}
  115.     {{ encore_entry_script_tags('scripts/new_ui', null, 'basicConfig') }}
  116.     {{ encore_entry_script_tags('scripts/index', null, 'basicConfig') }}
  117.     {% include 'components/profile_ctr.js.twig' %}
  118. {% endblock %}
  119. </body>
  120. </html>