templates/front/slices/slice_text.html.twig line 1

Open in your IDE?
  1. {# COLORS VARIATIONS #}
  2. {% set theme = slice.theme %}
  3. {% set accentColor = 'orange' %}
  4. {% set buttonClass = 'button--orange' %}
  5. {% if theme == 'blue' %}
  6. {% set accentColor = 'violet' %}
  7. {% set buttonClass = 'button--violet' %}
  8. {% endif %}
  9. <div class="slice relative slice--text slice--text--{{ theme }} {{ theme == 'dark' ? 'slice--padding' : ''  }} {{ slice.surTitle is defined and slice.surTitle is not null ? 'pt-11' : '' }}">
  10.     <div class="fluid-grid">
  11.         <div class="row">
  12.             <div class="col-12 lg-col-8 lg-col-offset-2 relative">
  13.                 {% if slice.surTitle is defined and slice.surTitle is not null %}
  14.                     <p class="relative lg:absolute top-0 suptitle font-weight-xbold uppercase">
  15.                         <span class="inline-block">{{ slice.surTitle }}</span>
  16.                     </p>
  17.                 {% endif %}
  18.                 {% if slice.title is defined and slice.title is not null %}
  19.                 <h2 class="title title--L text-{{ accentColor }} relative font-weight-semibold mb-8">
  20.                     {{ slice.title }}
  21.                 </h2>
  22.                 {% endif %}
  23.                 {% for block in slice.blocks %}
  24.                     <div class="relative {{ not loop.first ? 'mt-6' : '' }}">
  25.                         {% if block.subTitle is defined and block.subTitle is not null %}
  26.                             <h3 class="text-green title title--M mb-6">{{ block.subTitle }}</h3>
  27.                         {% endif %}
  28.                         {% if block.subText is defined and block.subText is not null %}
  29.                             <div class="description paragraph paragraph--L font-weight-semibold wysiwyg wysiwyg--{{ theme }} text-{{ accentColor }} mb-4">
  30.                                 {{ block.subText|raw }}
  31.                             </div>
  32.                         {% endif %}
  33.                         {% if block.text is defined and block.text is not null %}
  34.                         <div class="paragraph wysiwyg wysiwyg--{{ theme }}">
  35.                             {{ block.text|raw }}
  36.                         </div>
  37.                         {% endif %}
  38.                     </div>
  39.                 {% endfor %}
  40.                 {% if slice.cta.label is defined and slice.cta.label is not null %}
  41.                     {% set cta = slice.cta %}
  42.                     {% include 'front/partials/button-arrow.html.twig' with {class: 'mt-8 ' ~ buttonClass } %}
  43.                 {% endif %}
  44.             </div>
  45.         </div>
  46.     </div>
  47. </div>