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

Open in your IDE?
  1. <section class="slice push-publi-news">
  2.     <div class="fluid-grid">
  3.         <div class="row">
  4.             <div class="col-12 md-col-6 flex flex-col">
  5.                 <h2 class="relative title title--XL title--circle title--circle-big text-violet mb-6 font-light">
  6.                     Notre dernière <span>publication</span>
  7.                 </h2>
  8.                 <div class="flex-grow w-full flex flex-col items-start">
  9.                     <div class="flex-grow flex">
  10.                         {% if slice.publication is defined and slice.publication is not empty %}
  11.                             {% set publication = slice.publication %}
  12.                             {% set publicationProperties =  publication.contentProperties %}
  13.                         {% else %}
  14.                             {% set publication = find_last_for_home("publication", 1) %}
  15.                             {% set publicationProperties =  publication.contentProperties %}
  16.                         {% endif %}
  17.                         {% include 'front/partials/cards/publication.html.twig' with { size: 'L', type: publication.type } %}
  18.                     </div>
  19.                     <a class="button button--rounded button--arrow button--border button--border--violet mt-8" href="{{ page_url('publications-list', 'front') }}">
  20.                         <span>Voir toutes nos publications</span>
  21.                         <svg width="12" height="12" class="picto icon ml-2 flex-shrink-0">
  22.                             <use href="#icon-arrow" xlink:href="#icon-arrow"></use>
  23.                         </svg>
  24.                     </a>
  25.                 </div>
  26.             </div>
  27.             <div class="col-12 md-col-6 mt-14 md:mt-0 flex flex-col">
  28.                 <h2 class="title title--XL text-violet mb-6 font-light">
  29.                     Actualités <span>de la CGF</span>
  30.                 </h2>
  31.                 <div class="flex-grow w-full flex flex-col items-start">
  32.                     <div class="flex-grow flex w-full"
  33.                          js-slider="{screens: {max: 'xl'}, options: { slidesPerView: 1, spaceBetween: 16,  breakpoints: { 1024: { slidesPerView: 1.57 }} }}">
  34.                         <div class="swiper-container max-w-full md:max-w-none" js-slider-el>
  35.                             <div class="swiper-wrapper push-publi-news__news">
  36.                                 {% if slice.firstNews is defined and slice.firstNews is not empty %}
  37.                                     {% set firstNews = slice.firstNews %}
  38.                                     {% set firstNewsProperties = firstNews.contentProperties %}
  39.                                     {% set secondNews = slice.secondNews %}
  40.                                     {% set secondNewsProperties =  secondNews.contentProperties %}
  41.                                 {% else %}
  42.                                     {% set firstNews = find_last_for_home("news", 2)[0] %}
  43.                                     {% set firstNewsProperties =  firstNews.contentProperties %}
  44.                                     {% set secondNews = find_last_for_home("news", 2)[1] %}
  45.                                     {% set secondNewsProperties =  secondNews.contentProperties %}
  46.                                 {% endif %}
  47.                                 <div class="swiper-slide push-publi-news__item">
  48.                                      {% include 'front/partials/cards/news-event.html.twig' with { size: 'S', type: firstNews.type, news: firstNews, newsProperties: firstNewsProperties } %}
  49.                                 </div>
  50.                                 <div class="swiper-slide push-publi-news__item">
  51.                                      {% include 'front/partials/cards/news-event.html.twig' with { size: 'S', type: secondNews.type, news: secondNews, newsProperties: secondNewsProperties } %}
  52.                                 </div>
  53.                             </div>
  54.                         </div>
  55.                     </div>
  56.                     <a class="button button--rounded button--arrow button--border button--border--violet mt-8" href="{{ page_url('news-list', 'front') }}">
  57.                         <span>Voir toutes nos actualités</span>
  58.                         <svg width="12" height="12" class="picto icon ml-2 flex-shrink-0">
  59.                             <use href="#icon-arrow" xlink:href="#icon-arrow"></use>
  60.                         </svg>
  61.                     </a>
  62.                 </div>
  63.             </div>
  64.         </div>
  65.     </div>
  66. </section>