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.         {# {% for css in encore_entry_css_files('styles/main-public', 'basicConfig') %}
  35.         <link rel="preload"
  36.             href="{{ asset(css) }}"
  37.             as="style"
  38.             onload="this.onload=null;this.rel='stylesheet'">
  39.         <noscript>
  40.             <link rel="stylesheet" href="{{ asset(css) }}">
  41.         </noscript>
  42.     {% endfor %} #}
  43.     {% endblock %}
  44.     <link rel="shortcut icon" href="{{ asset('assets/images/favicon/favicon.ico','basicConfig') }}">
  45.     <link rel="apple-touch-icon" sizes="180x180"
  46.           href="{{ asset('assets/images/favicon/apple-touch-icon.png','basicConfig') }}">
  47.     <link rel="icon" type="image/png" sizes="32x32"
  48.           href="{{ asset('assets/images/favicon/favicon-32x32.png','basicConfig') }}">
  49.     <link rel="icon" type="image/png" sizes="16x16"
  50.           href="{{ asset('assets/images/favicon/favicon-16x16.png','basicConfig') }}">
  51.     <meta name="msapplication-TileColor" content="#897956">
  52.     <meta name="theme-color" content="#897956">
  53.     <meta name="apple-mobile-web-app-title" content="Dosug 7/24"/>
  54.     <meta name="application-name" content="Dosug 7/24"/>
  55.     <meta name="yandex" content="noarchive">
  56.     {% block preconnect %}
  57.         {%- if responsive_media_base_url is defined -%}
  58.             <link rel="preconnect" href="{{ responsive_media_base_url|replace({'responsive': 'assets'}) }}" />
  59.             <link rel="preconnect" href="{{ responsive_media_base_url }}" />
  60.         {%- endif -%}
  61.         <link rel="preconnect" href="https://mc.yandex.ru">
  62.         <link rel="preconnect" href="https://www.googletagmanager.com">
  63.     {% endblock %}
  64.     {% block canonical %}<link rel="canonical" href="{{ canonical_url() }}">{% endblock %}
  65.     {% set crawlerGoogleDetect = app.request.headers.get('X-Detected-Crawler') == 'google' or app.request.host matches '/^g[a-z0-9]+\./' %}
  66.     {% if ym_tracker_id %}
  67.         <!-- Yandex.Metrika counter -->
  68.         <script type="text/javascript" >
  69.             (function (d, w, c) {
  70.                 (w[c] = w[c] || []).push(function() {
  71.                     try {
  72.                         w.yaCounter{{ ym_tracker_id }} = new Ya.Metrika({
  73.                             id:{{ ym_tracker_id }},
  74.                             clickmap:true,
  75.                             trackLinks:true,
  76.                             accurateTrackBounce:true
  77.                         });
  78.                     } catch(e) { }
  79.                 });
  80.                 var n = d.getElementsByTagName("script")[0],
  81.                     s = d.createElement("script"),
  82.                     f = function () { n.parentNode.insertBefore(s, n); };
  83.                 s.type = "text/javascript";
  84.                 s.async = true;
  85.                 s.src = "https://mc.yandex.ru/metrika/watch.js";
  86.                 if (w.opera == "[object Opera]") {
  87.                     d.addEventListener("DOMContentLoaded", f, false);
  88.                 } else { f(); }
  89.             })(document, window, "yandex_metrika_callbacks");
  90.         </script>
  91.         <noscript><div><img src="https://mc.yandex.ru/watch/{{ ym_tracker_id }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  92.         <!-- /Yandex.Metrika counter -->
  93.     {% endif %}
  94.     {% if ga_tracker_id and crawlerGoogleDetect %}
  95.         <!-- Google tag (gtag.js) -->
  96.         <script async src="https://www.googletagmanager.com/gtag/js?id={{ga_tracker_id}}"></script>
  97.         <script>
  98.             window.dataLayer = window.dataLayer || [];
  99.             function gtag(){dataLayer.push(arguments);}
  100.             gtag('js', new Date());
  101.             gtag('config', '{{ga_tracker_id}}');
  102.         </script>
  103.     {% endif %}
  104. </head>
  105. {% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
  106. <body data-lang="{{ app.request.locale }}" data-page="{% block name_page %}index{% endblock %}"
  107.       data-site="spb"{% if is_granted('ROLE_USER') %} data-login="true"{% endif %}
  108.         {% block account_page %}data-account="false"{% endblock %}
  109.       class="{% block bodyClasses %}{% endblock %}">
  110. <div class="wrapper{% block wrapper_class %}{% endblock %}">
  111.     {% block modals %}
  112.         {% include 'components/modals.html.twig' %}
  113.     {% endblock %}
  114.     {% block header %}
  115.         {% include 'components/header.html.twig' %}
  116.     {% endblock %}
  117.     {% block grid %}{% endblock %}
  118.     {% block footer %}
  119.         {% include 'components/footer.html.twig' %}
  120.     {% endblock %}
  121. </div>
  122.  {% block javascripts %}
  123.     {{ encore_entry_script_tags('scripts/bootstrap_theme', null, 'basicConfig') }}
  124.     {{ encore_entry_script_tags('scripts/new_ui', null, 'basicConfig') }}
  125.     {{ encore_entry_script_tags('scripts/index', null, 'basicConfig') }}
  126.     {% include 'components/profile_ctr.js.twig' %}
  127. {% endblock %}
  128. </body>
  129. </html>