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

Open in your IDE?
  1. <section class="slice speakers">
  2.     <div class="fluid-grid" js-tabs>
  3.         {% if slice.title is defined and slice.title is not null %}
  4.             <h2 class="title title--L title--circle font-weight-light text-violet relative mb-4 lg:mb-6">
  5.                 {{ slice.title|highlight_word|raw }}
  6.             </h2>
  7.         {% endif %}
  8.         {# tabs buttons #}
  9.         {% if slice.groups|length >  1 %}
  10.         <ul class="relative flex lg:flex-wrap speakers__tab-list w-full mb-8">
  11.             {% for group in slice.groups %}
  12.                 <li>
  13.                     <button class="speakers__tab-toggle {% if loop.index == 1 %}is-active{% endif %}"
  14.                             js-tabs-tab="{{ loop.index }}">{{ group.groupName }}
  15.                     </button>
  16.                 </li>
  17.             {% endfor %}
  18.         </ul>
  19.         {% endif %}
  20.         {# panels #}
  21.         {% for group in slice.groups %}
  22.             <div class="speakers__panel {{ slice.groups|length == 1 ? 'lg:mt-8' : '' }} {% if loop.index == 1 %}is-active{% endif %}"
  23.                 js-tabs-content="{{ loop.index }}">
  24.                 <ul class="row gap-y-6">
  25.                     {% for speaker in group.speakers %}
  26.                         {% set speakerProperties = speaker.contentProperties %}
  27.                         {% set hasAdditionalContent = speakerProperties.contact is defined and speakerProperties.contact is not null
  28.                                                     or speakerProperties.address is defined and speakerProperties.address is not null 
  29.                                                     or speakerProperties.website is defined and speakerProperties.website is not null 
  30.                                                     or speakerProperties.email is defined and speakerProperties.email is not null 
  31.                                                     or speakerProperties.phone is defined and speakerProperties.phone is not null 
  32.                                                     or speakerProperties.linkedinLink is defined and speakerProperties.linkedinLink is not null
  33.                                                     or speakerProperties.twitterLink is defined and speakerProperties.twitterLink is not null
  34.                                                     or speakerProperties.facebookLink is defined and speakerProperties.facebookLink is not null
  35.                                                     or speaker.description is defined and speaker.description is not null   %}
  36.                         <li class="col-6 md-col-4 lg-col-3">
  37.                             {% if hasAdditionalContent %}
  38.                             <button class="card card-speaker card-speaker--modal"
  39.                                 js-dynamic-modal="{route: '/ajax/modal', id:'{{ speaker.id }}', position: 'aside-modal', model: 'speaker-modal'}">
  40.                             {% else %}
  41.                                 <div class="card card-speaker">
  42.                             {% endif %}
  43.                                 <div class="visual__wrapper relative overflow-hidden">
  44.                                     {% if speaker.contentProperties.image.singleMedia is defined and speaker.contentProperties.image.singleMedia.publicId is not null %}
  45.                                         {% if speaker.contentProperties.isLogo %}
  46.                                             <picture>
  47.                                                 <source media="(max-width: 420px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_limit,q_auto,w_166,h_144') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_limit,q_auto,w_166,h_144,dpr_2') }} 2x"/>
  48.                                                 <source media="(min-width: 420px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_limit,q_auto,w_316,h_275') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_limit,q_auto,w_316,h_275,dpr_2') }} 2x"/>
  49.                                                 <img class="abs-center is-logo lazyload"
  50.                                                     data-src="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,q_auto,c_limit,w_316,h_275') }}"
  51.                                                     alt="{{ speaker.contentProperties.image.singleMedia.alt }}">
  52.                                             </picture>
  53.                                         {% else %}
  54.                                             <picture>
  55.                                                 <source media="(max-width: 420px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_166,h_144') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_166,h_144,dpr_2') }} 2x"/>
  56.                                                 <source media="(max-width: 767px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_340,h_295') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_340,h_295,dpr_2') }} 2x"/>
  57.                                                 <source media="(max-width: 1023px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_304,h_264') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_304,h_264,dpr_2') }} 2x"/>
  58.                                                 <source media="(max-width: 1279px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_280,h_243') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_280,h_243,dpr_2') }} 2x"/>
  59.                                                 <source media="(min-width: 1280px)" data-srcset="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_316,h_275') }} 1x, {{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,c_fill,g_face,q_auto,w_316,h_275,dpr_2') }} 2x"/>
  60.                                                 <img class="abs-center lazyload" width="316" height="275"
  61.                                                     data-src="{{ cloudinary_media(speaker.contentProperties.image.singleMedia, 'f_auto,q_auto,c_fill,g_face,w_316,h_275') }}"
  62.                                                     alt="{{ speaker.contentProperties.image.singleMedia.alt }}">
  63.                                             </picture>
  64.                                         {% endif %}
  65.                                     {% else %}
  66.                                         <img class="abs-center is-logo lazyload"
  67.                                             data-src="/assets/front/federation-default.svg"
  68.                                             alt="" >
  69.                                     {% endif %}
  70.                                 </div>
  71.                                 <p class="name text-violet font-weight-light text-center mt-4">{{ speaker.title }}</p>
  72.                                 
  73.                                 {% if speaker.contentProperties.subTitle is defined and speaker.contentProperties.subTitle is not null %}
  74.                                 <p class="description text-violet-dark font-weight-semibold text-center mt-2">
  75.                                     {{ speaker.contentProperties.subTitle }}
  76.                                 </p>
  77.                                 {% endif %}
  78.                              {% if hasAdditionalContent %}
  79.                             </button>
  80.                             {% else %}
  81.                             </div>
  82.                             {% endif %}
  83.                         </li>
  84.                     {% endfor %}
  85.                 </ul>
  86.             </div>
  87.         {% endfor %}
  88.     </div>
  89. </section>