{% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %}
{% set block_brand_index = app_get_blocks('our_brand_index', sylius.channel.code ) %}
{% set brands = app_get_all_brands() %}
<section class="bloc-about px-2 pt-lg-5 pt-4 mt-md-0 mt-3">
<div class="max-container-2 px-0">
<div class="row pt-md-5 no-gutters mx-md-0 mx-n2">
{% set media_ourvision = app_get_media_image_by_code('media_our_vision', sylius.localeCode, sylius.channel.code) %}
{% if media_ourvision is not null %}
<div class="col-12 col-md-6 order-md-3 mt-md-0 mt-3 px-0">
<div class="h-100 object-fit-img wow fadeInLeft" data-wow-duration="0.8s" data-wow-delay="0.2s">
{% if media_ourvision.path is not null %}
<img src="{{ media_ourvision.path }}" alt="{{ media_ourvision.name }}"/>
{% else %}
<img src="{{ asset('images/about_img2.jpg')}}" alt="" />
{% endif %}
</div>
</div>
<div class="col-12 col-md-6 order-md-4 px-lg-0 px-md-2 px-3 mt-md-0 mt-md-5">
<div class="text-left pt-3 pt-md-4 pb-0 d-md-flex align-items-center h-100 pl-lg-5 pl-md-3 flex-column">
<div class="pl-md-3 pt-lg-4 pt-md-3">
<h3 class="title-medium color-blue-s title-small-mobile">{{ media_ourvision.name }}</h3>
<div class="pt-2 expand-me-mobile fontsize-mobile-text text-grey font-seize">
{{ media_ourvision.content|raw }}
</div>
</div>
{% if block_brand_index is defined %}
<div class="pt-md-4 pt-3 pl-md-3">
<h3 class="title-medium color-blue-s title-small-mobile">{{'app.common.our_brand'|trans}}</h3>
<div class="pt-2 expand-me-mobile fontsize-mobile-text text-grey font-seize">
{{ block_brand_index.content|raw }}
</div>
</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% if brands|length > 0 %}
<div class="pt-md-4 pb-md-2 text-center has-border-bottom mx-md-0 mx-n2">
<div class="row mx-md-n3 mx-n2 align-items-center justify-content-center wow fadeInDown px-md-0 px-3" data-wow-duration="0.8s" data-wow-delay="0.2s">
{% set brand_count = 0 %}
{% for brand in brands %}
{% set brand_count = brand_count + 1 %}
{% if brand_count < 6 %}
{% if brand.images|first != false %}
{% set path = brand.images|first.path|imagine_filter(filter|default('app_shop_brand')) %}
<div class="col-md col-4 mb-md-0 mb-md-3 mb-2 py-2 px-md-3 px-2">
<a href="{{ path('app_shop_brand_product_index', {'code' : brand.code}) }}" title="{{ brand.name}}"><img src="{{ path }}" alt="{{ brand.name}}"/></a>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
</div>
</section>