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

Open in your IDE?
  1. <section class="slice cards-slider"
  2.          js-slider="{options: { slidesPerView: 1, spaceBetween: 16, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 32 }, 1024: { slidesPerView: 3 }} }}">
  3.     <div class="fluid-grid">
  4.         <div class="row mb-4 md:mb-8">
  5.             <div class="col-12 lg-col-11 lg-col-offset-1 flex items-center {{ slice.title is defined and slice.title is not null ? 'justify-between' : 'justify-end' }}">
  6.                 {% if slice.title %}
  7.                     <h2 class="font-semibold title--word-bg title--circle title--circle-big title--L text-violet">{{ slice.title|highlight_word|raw }}</h2>
  8.                 {% endif %}
  9.                 {% include 'front/partials/slider-nav.html.twig' with {mainClass: 'swiper-navigation flex cards-slider__nav', iconColor: 'violet', buttonFirst: 'mr-8'} %}
  10.             </div>
  11.         </div>
  12.         <div class="swiper-container overflow-hidden w-full" js-slider-el>
  13.             <div class="swiper-wrapper">
  14.                 {% set tag = null %}
  15.                 {% if (page.type == 'expertise' or page.type == 'edito') and page.tags|length > 0 %}
  16.                     {% set tag = page.tags[0] %}
  17.                 {% endif %}
  18.                 {% set news_array = find_pages(['article','event','agenda'], tag) %}
  19.                 {% if tag != null and news_array|length == 0 %}
  20.                     {% set news_array = find_pages(['article','event','agenda'], null) %}
  21.                 {% endif %}
  22.                 {% for news in news_array %}
  23.                     {% set newsProperties = news.contentProperties %}
  24.                     <div class="swiper-slide">
  25.                         {% include 'front/partials/cards/news-event.html.twig' with {type: news.type} %}
  26.                     </div>
  27.                 {% endfor %}
  28.             </div>
  29.         </div>
  30.         <div class="text-center">
  31.             <a class="button button--rounded button--arrow button--violet mt-22 md:mt-6"
  32.                href="{{ page_url('news-list', 'front') }}">
  33.                 <span>Voir toutes nos actualités</span>
  34.                 <svg width="12" height="12" class="picto icon ml-2 flex-shrink-0">
  35.                     <use href="#icon-arrow" xlink:href="#icon-arrow"></use>
  36.                 </svg>
  37.             </a>
  38.         </div>
  39.     </div>
  40. </section>