src/Package/Openform/Front/Templates/_blocks_sections/_links.html.twig line 1

Open in your IDE?
  1. {% from '@openform_front_templates/_includes/_icons.html.twig' import arrowright %}
  2. {% if block.Translation[app.request.locale].title or block.Translation[app.request.locale].textLinks %}
  3.     <section class="block-item block-files {% if mobile %}block-files--mobile{% endif %}">
  4.             {% if block.Translation[app.request.locale].title %}
  5.                 <h2 class="block-text__title block__h3">
  6.                     {{ block.Translation[app.request.locale].title|raw|nl2br }}
  7.                 </h2>
  8.             {% endif %}
  9.             {% if block.Translation[app.request.locale].text %}
  10.                 <div class="block-text__description block__text" 
  11.                 style="{{block.textBlockWidth is defined and block.textBlockWidth ?  "max-width:" ~ block.textBlockWidth ~"%;"}}
  12.                 {{block.textBlockPaddingTop is defined and block.textBlockPaddingTop ?  "padding-top:" ~ block.textBlockPaddingTop ~"px;"}}
  13.                 {{block.textBlockPaddingBottom is defined and block.textBlockPaddingBottom ?  "padding-bottom:" ~ block.textBlockPaddingBottom ~"px;"}}
  14.                 {{block.textBlockPaddingLeft is defined and block.textBlockPaddingLeft ?  "padding-left:" ~ block.textBlockPaddingLeft ~"px;"}}
  15.                 {{block.textBlockPaddingRight is defined and block.textBlockPaddingRight ?  "padding-right:" ~ block.textBlockPaddingRight ~"px;"}}
  16.                 ">{{ block.Translation[app.request.locale].text|raw }}</div>
  17.             {% endif %}
  18.             {# linki #}
  19.             {% if block.Translation[app.request.locale].textLinks %}
  20.                 {% set links = openform_front_util.getJsonDecode(block.Translation[app.request.locale].textLinks) %}
  21.                 {% if links %}
  22.                     <div class="block-files__list" data-scroll>
  23.                         {% for item in links %}
  24.                             <div class="link-item">
  25.                                 {% for btn in item.c %}
  26.                                     {% if btn.h is defined and btn.t is defined %}
  27.                                         <a href="{{btn.h}}" class="block-text__btns__btn button-read-more button-read-more--black">
  28.                                             <span>
  29.                                                 {{btn.t}}
  30.                                             </span>
  31.                                             {{arrowright()}}
  32.                                             
  33.                                         </a>
  34.                                     {% elseif btn.t is defined %}
  35.                                         <span class="block-text__btns__btn button-read-more button-read-more--black">
  36.                                             <span>
  37.                                                 {{btn.t}}
  38.                                             </span>
  39.                                         </span>
  40.                                     {% endif %}
  41.                                 {% endfor %}
  42.                             </div>
  43.                         {% endfor %}
  44.                     </div>
  45.                 {% endif %}
  46.             {% endif %}
  47.     </section>
  48. {% endif %}