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

Open in your IDE?
  1. {% set isHidden = page.contentProperties.isMemberOnly and app.user == null %}
  2. <section class="slice slice--documents">
  3.     <div class="fluid-grid">
  4.         <div class="row">
  5.             <div class="col-12 lg-col-8 lg-col-offset-2">
  6.                 <h2 class="title--L text-orange font-weight-semibold">{{ slice.title}}</h2>
  7.                 {% if slice.text is defined and slice.text is not null %}
  8.                     <div class="paragraph--M wysiwyg mt-6 lg:mt-8">
  9.                     {{slice.text|raw}}
  10.                     </div>
  11.                 {% endif %}
  12.                 {% if slice.documents|length > 0 and not isHidden %}
  13.                     <ul class="documents-list list-none mt-6">
  14.                         {% for document in slice.documents %}
  15.                         <li {% if loop.index0 > 0 %}class="mt-4"{% endif %}>
  16.                             <a onclick="gtag('event', 'telecharger-document', {'button_text': 'telecharger-document'});" href="{{ cloudinary_media(document.doc.singleMedia) }}" target="_blank" rel="noopener" class="documents-list__item w-full p-6 inline-flex justify-between items-center">
  17.                                 <div class="w-3/4 paragraph--M text-grey-dark font-weight-medium">{{ document.documentName}}</div>
  18.                                 <div class="picto relative bg-orange round shrink-0">
  19.                                      <svg width="18" height="18" class="icon icon--white abs-center" aria-hidden="true">
  20.                                         <use href="#icon-download" xlink:href="#icon-download"></use>
  21.                                     </svg>
  22.                                 </div>
  23.                             </a>
  24.                         </li>
  25.                         {% endfor %}
  26.                     </ul>
  27.                 {% endif %}
  28.             </div>
  29.         </div>
  30.     </div>
  31. </section>