{% from '@openform_front_templates/_includes/_icons.html.twig' import arrowright %}
<div class="block-slider__section__background" style="background: {{slide.section.sectionBackground|default('transparent') }}; {% if slide.section.sliderHeight is defined and slide.section.sliderHeight %}height: {{slide.section.sliderHeight}}vh; overflow: hidden;{% endif %}">
{% set item = slide.grupped.imageslider[0]|default(null) %}
{% if item %}
{% set img = item.imagePath %} {#iamge to rodzaj kadru#}
{% if img %}
{% if slide and slide.section and slide.section.sectionLink %}<a class="block-slider__bg-link" href="{{slide.section.sectionLink}}">{% endif %}
<img class="block-slider__section__bgimg" style="{{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}" loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].fileAlt }}" title="{{ item.Translation[app.request.locale].fileTitle }}">
{% if slide and slide.section and slide.section.sectionLink %}</a>{% endif %}
{% endif %}
{% endif %}
<div class="container block-slider__slide block-slider__slide--position-{{slide.section.sliderPosition}} block-slider--slide-{{slide.section.sliderKind}}" style="background: {{slide.section.sectionBackground|default('transparent') }}; {% if slide.section.sliderHeight is defined and slide.section.sliderHeight %}height: {{slide.section.sliderHeight}}vh; overflow: hidden;{% endif %}">
<div class="block-slider__section block-slider__section--content" style="width: {{slide.section.precentCollumn|default('39')}}%; background:{{slide.section.sliderBackground|default('#FEFFCF')}};">
{% if slide.grupped.textbox|default(false) and slide.grupped.textbox is iterable %}
{% for item in slide.grupped.textbox|slice(0,6) %}
{% if item.Translation[app.request.locale].link %}
<a href="{{item.Translation[app.request.locale].link}}" class="slide-box" style="background:{{item.colorTextBackground|default('transparent')}}; {{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}" >
<div class="slide-box__content">
<div class="slide-box__title">
{{item.Translation[app.request.locale].title|nl2br}}
</div>
<div class="slide-box__text" >
{{item.Translation[app.request.locale].text|raw}}
</div>
</div>
{% if item.Translation[app.request.locale].link and item.Translation[app.request.locale].buttonLabel %}
<div class="block-text__btns">
<div class="block-text__btns__btn button-read-more button-read-more--black">
<span>{{item.Translation[app.request.locale].buttonLabel}}</span>
{{arrowright()}}
</div>
</div>
{% endif %}
</a>
{% else %}
<div class="slide-box" style="background:{{item.colorTextBackground|default('transparent')}}; {{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}" >
<div class="slide-box__content">
<div class="slide-box__title">
{{item.Translation[app.request.locale].title|nl2br}}
</div>
<div class="slide-box__text" >
{{item.Translation[app.request.locale].text|raw}}
</div>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
<div class="block-slider__section" style="width: calc(100% - {{slide.section.precentCollumn|default('39')}}%);">
{% set item = slide.grupped.imageslider[0]|default(null) %}
{% if item %}
{% if slide and slide.section and slide.section.sectionLink %}<a class="block-slider__bg-link" href="{{slide.section.sectionLink}}">{% endif %}
{% if slide and slide.section and slide.section.sectionLink %}</a>{% endif %}
{% endif %}
{% set item = slide.grupped.imagelogo[0]|default(null) %}
{% if item %}
{# {% set img = openform_front_util.getImagePathByType(item.Thumb ?? '','logo') %} #}
{% set img = item.imagePath %}
{% if img and item.Translation[app.request.locale].link %}
<a href="{{item.Translation[app.request.locale].link}}" class="block-slider__section__logo" style="{{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}">
<img loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].fileAlt }}">
{% if item.Translation[app.request.locale].fileTitle %}
<span>{{ item.Translation[app.request.locale].fileTitle }}</span>
{% endif %}
</a>
{% elseif img %}
<div class="block-slider__section__logo" style="{{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}">>
<img loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].fileAlt }}">
{% if item.Translation[app.request.locale].fileTitle %}
<span>{{ item.Translation[app.request.locale].fileTitle }}</span>
{% endif %}
</div>
{% endif %}
{% endif %}
{% if slide.grupped.titleslider[0]|default(null) or slide.grupped.btncta[0]|default(null) %}
<div class="block-slider__section__img-content" style="background: {{item.colorTitleBackground|default('#F5DB7B') }}">
{% set item = slide.grupped.titleslider[0]|default(null) %}
{% if item %}
<div style="color:{{item.colorTitle|default('#231F17')}};background:{{item.colorTitleBackground|default('transparent')}}; {{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}" class="block-slider__section__title">{{item.Translation[app.request.locale].title|raw}}</div>
{% endif %}
{% set item = slide.grupped.btncta[0]|default(null) %}
{% if item %}
<a href="{{item.Translation[app.request.locale].link}}" class="block-slider__section__btn block-slider__section__btn--cta" style="color:{{item.colorTitle|default('#FFFFFF')}};background:{{item.colorTitleBackground|default('#231F17')}}; {{item.textBlockPaddingTop or item.textBlockPaddingTop == 0 ? 'padding-top: ' ~ item.textBlockPaddingTop ~ 'px;'}} {{item.textBlockPaddingBottom or item.textBlockPaddingBottom == 0 ? 'padding-bottom: ' ~ item.textBlockPaddingBottom ~ 'px;'}} {{item.textBlockPaddingLeft or item.textBlockPaddingLeft == 0 ? 'padding-left: ' ~ item.textBlockPaddingLeft ~ 'px;'}} {{item.textBlockPaddingRight or item.textBlockPaddingRight == 0 ? 'padding-right: ' ~ item.textBlockPaddingRight ~ 'px;'}}" ><span>{{item.Translation[app.request.locale].buttonLabel}}</span></a>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>