src/Package/Openform/Front/Templates/_blocks_sections/_slides/_slide-mobile.html.twig line 1

Open in your IDE?
  1. {% from '@openform_front_templates/_includes/_icons.html.twig' import arrowright %}
  2.     <div class="block-slider__slide block-slider__slide--mobile" style="background: {{slide.section.sectionBackground|default('transparent') }}; overflow: hidden;">
  3.         <div class="block-slider__section block-slider__section--content block-slider__mobile__section-content" style="background: {{slide.section.sliderBackground|default('#F5DB7B') }}; width: 100%">
  4.             
  5.             
  6.             {% include "@openform_front_templates/_blocks_sections/_slides/_blocks/_index.html.twig" with {slide: slide} %}
  7.             {% if slide.grupped.textbox|default(false) and slide.grupped.textbox is iterable  %}
  8.                 {% for item in slide.grupped.textbox|slice(0,6) %}
  9.                     {% if item.Translation[app.request.locale].link %}
  10.                     <a href="{{item.Translation[app.request.locale].link}}" class="block-slider__mobile__slide-box" style="background:{{item.colorTextBackground|default('#E2F5B9')}};" >
  11.                         <div class="block-slider__mobile__slide-box-content">
  12.                             <div class="block-slider__mobile__slide-box-title">
  13.                                 {{item.Translation[app.request.locale].title|nl2br}}
  14.                             </div>
  15.                             <div class="block-slider__mobile__slide-box-text" >
  16.                                 {{item.Translation[app.request.locale].text|raw}}
  17.                             </div>
  18.                         </div>
  19.                         {% if item.Translation[app.request.locale].link and item.Translation[app.request.locale].buttonLabel %}
  20.                             <div class="block-text__btns">
  21.                                 <div class="block-text__btns__btn button-read-more button-read-more--black">
  22.                                     <span>{{item.Translation[app.request.locale].buttonLabel}}</span>
  23.                                     {{arrowright()}}
  24.                                 </div>
  25.                             </div>
  26.                         {% endif %}
  27.                     </a>
  28.                     {% else %}
  29.                     <div class="block-slider__mobile__slide-box" style="background:{{item.colorTextBackground|default('#E2F5B9')}};" >
  30.                         <div class="block-slider__mobile__slide-box-content">
  31.                             <div class="block-slider__mobile__slide-box-title">
  32.                                 {{item.Translation[app.request.locale].title|nl2br}}
  33.                             </div>
  34.                             <div class="block-slider__mobile__slide-box-text" >
  35.                                 {{item.Translation[app.request.locale].text|raw}}
  36.                             </div>
  37.                         </div>
  38.                         
  39.                     </div>
  40.                     {% endif %}
  41.                 {% endfor %}
  42.             {% endif %}
  43.             
  44.         </div>
  45.         <div class="block-slider__mobile__section-img" style="width: 100%;">
  46.             {% set item = slide.grupped.imageslider[0]|default(null) %}
  47.             {% if item %}
  48.                 {% set img = openform_front_util.getImagePathByType(item.Thumb ?? '','slider1') %} {#iamge to rodzaj kadru#}
  49.                 {% if img %}
  50.                     {% if slide and slide.section and slide.section.sectionLink %}<a href="{{slide.section.sectionLink}}">{% endif %}
  51.                     <img class="block-slider__mobile__img" loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].fileAlt }}" title="{{ item.Translation[app.request.locale].fileTitle }}">
  52.                     {% if slide and slide.section and slide.section.sectionLink %}</a>{% endif %}
  53.                 {% endif %}
  54.             {% endif %}
  55.                 {% set item = slide.grupped.imagelogo[0]|default(null) %}
  56.                 {% if item %}
  57.                     {# {% set img = openform_front_util.getImagePathByType(item.Thumb ?? '','logo') %} #}
  58.                     {% set img = item.imagePath %}
  59.                     {% if img and item.Translation[app.request.locale].link %}
  60.                         <a href="{{item.Translation[app.request.locale].link}}" class="block-slider__mobile__logo">
  61.                             <img loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].fileAlt }}">
  62.                             {% if item.Translation[app.request.locale].fileTitle %}
  63.                                 <span>{{ item.Translation[app.request.locale].fileTitle }}</span>
  64.                             {% endif %}
  65.                         </a>
  66.                     {% elseif img %}
  67.                         <div class="block-slider__mobile__logo">
  68.                             <img loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].fileAlt }}">
  69.                             {% if item.Translation[app.request.locale].fileTitle %}
  70.                                 <span>{{ item.Translation[app.request.locale].fileTitle }}</span>
  71.                             {% endif %}
  72.                         </div>
  73.                     {% endif %}
  74.                 {% endif %}
  75.         </div>
  76.     </div>