templates/includes/blocks/partnersList.html.twig line 42

Open in your IDE?
  1. <section class="border-grid relative pt-14 pb-7"
  2.   section-shade="light"
  3.   batch-wrapp>
  4.   <div>
  5.     <div
  6.       class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 border-y sm:border-0 border-gray sm:divide-x divide-y sm:divide-y-reverse divide-gray">
  7.       {% for partner in content.partners %}
  8.       {% set item = sulu_content_load(partner.id,{'title': 'title', 'image': 'image', 'description': 'description'}) %}
  9.       <div class="border-item p-8 lg:p-12 border-gray">
  10.         <div class="flex flex-col items-center text-center">
  11.           {# Image #}
  12.           <div class="flex items-center justify-center w-full" style="height: 200px">
  13.             {# Image size 570*300 with white/transparent background only #}
  14.             {% if item.content.image|length > 0 %}
  15.             {% set image = item.content.image.thumbnails['570x300-inset'] %}
  16.             <img src="{{image}}"
  17.               alt="{{item.content.title}}"
  18.               loading="lazy"
  19.               style="max-height: 200px; object-fit: contain">
  20.             {% endif %}
  21.           </div>
  22.           {# Title #}
  23.           <p class="title text-2xl mt-8">
  24.             {{item.content.title}}
  25.           </p>
  26.           {# Text #}
  27.           <p class="text-sm mt-8">
  28.             {{item.content.description}}
  29.           </p> 
  30.         </div>
  31.       </div>
  32.       
  33.       {% endfor %}
  34.     </div>
  35.     {% include "./partials/layout/pagination.html.twig" with {
  36.     'class' : 'blue mt-8 md:mt-12'
  37.     } %}
  38.  
  39.     
  40.   </div>
  41. </section>