templates/_parts/header/header.html.twig line 1

Open in your IDE?
  1. {% set class = class|default("") %}
  2. {% set typeClass = get_hero_type() %}
  3. {% set isIndex = isIndex|default(false) %}
  4. <header class="header {{ class }} {{ typeClass }}" data-header>
  5.     <div class="header__container" data-header-container>
  6.         <div class="header__inner" data-header-inner>
  7.             <div class="header__content grid-block container container_spacer">
  8.                 <div class="header__left">
  9.                     <div class="header__hamburger-wrap">
  10.                         {% include '_parts/header/hamburger.html.twig' with {
  11.                             class: 'header__hamburger',
  12.                         } %}
  13.                         {% include '_parts/header/header-choose-apart-link.html.twig' with {
  14.                             class: 'header__choose-apart-link header__choose-apart-link_left'
  15.                         } %}
  16.                     </div>
  17.                     {% if view_settings() is has_image('imageName') %}
  18.                         <a href="{% if not isIndex %}{{ url('main:index') }}{% else %}javascript:void(0);{% endif %}"
  19.                            title="Главная"
  20.                            class="header__logo"
  21.                         >
  22.                             {% include '_parts/image/adaptive-image.html.twig' with {
  23.                                 object: view_settings(),
  24.                                 field: 'imageFile',
  25.                                 size: 'logo_thumb',
  26.                                 alt: 'Логотип',
  27.                                 class: 'header__image',
  28.                                 classPicture: 'header__picture',
  29.                             } %}
  30.                         </a>
  31.                     {% endif %}
  32.                     {% if view_settings() is has_image('imageWhiteName') %}
  33.                         <a href="{% if not isIndex %}{{ url('main:index') }}{% else %}javascript:void(0);{% endif %}"
  34.                            title="Главная"
  35.                            class="header__logo header__logo_white"
  36.                         >
  37.                             {% include '_parts/image/adaptive-image.html.twig' with {
  38.                                 object: view_settings(),
  39.                                 field: 'imageWhiteFile',
  40.                                 size: 'logo_thumb',
  41.                                 alt: 'Логотип',
  42.                                 class: 'header__image',
  43.                                 classPicture: 'header__picture',
  44.                             } %}
  45.                         </a>
  46.                     {% endif %}
  47.                 </div>
  48.                 <div class="header__right">
  49.                     {% include '_parts/header/header-choose-apart-link-iconless.html.twig' with {
  50.                         class: 'header__choose-apart-link header__choose-apart-link_right'
  51.                     } %}
  52.                     {% if settings().phone %}
  53.                         <a href="tel:{{ settings().phone|tel }}" class="header__phone text__body"
  54.                            data-goal-yandex-click="{{ settings().clickPhoneGoal }}"
  55.                            data-goal-vk-click="{{ settings().clickPhoneGoal }}"
  56.                         >
  57.                             {{ settings().phone }}
  58.                         </a>
  59.                     {% endif %}
  60.                     <a href="{{ path('request:recall_modal') }}"
  61.                        title="Заказать звонок"
  62.                        class="header__modal header__modal_title link link_accent"
  63.                        data-modal
  64.                        data-goal-yandex-submit="{{ settings().successGoal }}"
  65.                        data-goal-yandex-click="{{ settings().clickFormGoal }}"
  66.                        data-goal-vk-submit="{{ settings().successGoal }}"
  67.                        data-goal-vk-click="{{ settings().clickFormGoal }}"
  68.                     >
  69.                         <span class="link__inner">
  70.                             <span class="link__title-wrap">
  71.                                 <span class="link__title">
  72.                                     Заказать звонок
  73.                                 </span>
  74.                                 <span class="link__title link__title_duplicate">
  75.                                     Заказать звонок
  76.                                 </span>
  77.                             </span>
  78.                             <span class="link__arrow">
  79.                                 {% include '_parts/icons/arrow-mini.svg' %}
  80.                             </span>
  81.                         </span>
  82.                     </a>
  83.                     <a href="{{ path('request:recall_modal') }}"
  84.                        title="Заказать звонок"
  85.                        class="header__modal header__modal_icon"
  86.                        data-modal
  87.                        data-goal-yandex-submit="{{ settings().successGoal }}"
  88.                        data-goal-yandex-click="{{ settings().clickFormGoal }}"
  89.                        data-goal-vk-submit="{{ settings().successGoal }}"
  90.                        data-goal-vk-click="{{ settings().clickFormGoal }}"
  91.                     >
  92.                         <span class="header__modal-icon">
  93.                             {{ source('_parts/icons/phone.svg') }}
  94.                         </span>
  95.                     </a>
  96.                 </div>
  97.             </div>
  98.             {% include '_parts/header/_drop-menu.html.twig' with {
  99.                 class: 'header__drop-menu'
  100.             } %}
  101.         </div>
  102.     </div>
  103. </header>