{% set class = class|default('') %}
{% set item = item|default(null) %}
<li class="about-item {{ class }}" id="project-item-{{ item.id }}">
{% if item.title %}
<h2 class="about-item__title text__black-text">
{{ item.title }}
</h2>
{% endif %}
{% set itemTabs = item.tabs.toArray() %}
{% if itemTabs|length %}
{% if itemTabs|length > 1 %}
<div class="about-item__tabs tabs tabs__minor">
<ul class="about-item__tabs-list smart-tabs tabs__list" data-smart-tabs>
{% for itemTab in itemTabs %}
<li class="about-item__tab smart-tab tabs__item {% if loop.first %}_active{% endif %}">
<a href="#project-item-tab-{{ itemTab.id }}"
class="about-item__tab-link tabs__link"
data-tab-link
>
<span class="tabs__text text__small">
{{ itemTab.name }}
</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="about-item__contents">
{% for itemTab in itemTabs %}
{% set slides = itemTab.slides.toArray() %}
{# старый размер, когда они ± одинаковые #}
{% set sliderThumb = 'about_slide_thumb' %}
{% set pictureThumb = 'about_slide_thumb' %}
{# новый размер, когда они прям разные #}
{% if itemTab.verticalSlider %}
{% set sliderThumb = 'about_slide_thumb_vertical' %}
{% set pictureThumb = 'about_picture_thumb_vertical' %}
{% endif %}
<ul id="project-item-tab-{{ itemTab.id }}"
class="about-item__content smart-content
{% if loop.first %}_active{% endif %}
{% if not slides|length %}about-item__content_no-slider{% endif %}"
data-smart-content
>
<div class="about-item__description-top text__body">
{{ itemTab.descriptionTop }}
</div>
<div class="{% if itemTab.verticalSlider %}about-item__slider-wrapper{% endif %}">
{% if slides|length %}
<div class="about-item__slider{% if itemTab.verticalSlider %} about-item__slider_vertical{% endif%} swiper" data-about-slider>
<ul class="about-item__slider-list swiper-wrapper">
{% for slide in slides %}
<li class="about-item__slide swiper-slide">
{% include '_parts/image/adaptive-image.html.twig' with {
object: slide,
field: 'imageFile',
size: sliderThumb,
alt: itemTab.name,
class: 'about-item__image',
classPicture: 'about-item__picture',
} %}
</li>
{% endfor %}
</ul>
<div class="about-item__pagination pagination swiper-pagination"
data-about-slider-pagination></div>
{% if slides|length > 1 %}
{% include '_parts/nav/arrow-left.html.twig' with {
class: 'about-item__arrow-left arrow_light',
dataset: 'data-about-slider-left',
} %}
{% include '_parts/nav/arrow-right.html.twig' with {
class: 'about-item__arrow-right arrow_light',
dataset: 'data-about-slider-right',
} %}
{% endif %}
</div>
{% endif %}
{% set itemTabHasImage = itemTab is has_image('imageName') %}
<div class="{% if not itemTab.verticalSlider %}about-item__bottom {% if itemTabHasImage %}about-item__bottom_with-image{% endif %}{% else %}about-item__vertical-bottom{% endif %}">
{% if itemTabHasImage %}
<div class="about-item__single-image{% if itemTab.wideMobileImage %} about-item__single-image_wide{% endif %}">
{% include '_parts/image/adaptive-image.html.twig' with {
object: itemTab,
field: 'imageFile',
size: pictureThumb,
alt: itemTab.name,
class: 'about-item__image',
classPicture: 'about-item__picture',
} %}
</div>
{% endif %}
<div class="about-item__description-bottom text__body">
{{ itemTab.descriptionBottom }}
</div>
</div>
</div>
</ul>
{% endfor %}
</div>
{% endif %}
</li>