templates/areas/testimonial-brick/view.html.twig line 1

Open in your IDE?
  1. {% set clients = clients ?? pimcore_relations("clients") %}
  2. {% embed 'app/area-brick-layout.html.twig' %}
  3.     {% block content %}
  4.         {% if editmode or clients|length > 0 %}
  5.             <section>
  6.                 <div class="container py-10 md:py-20">
  7.                     {% if editmode or not pimcore_input('title').isEmpty() %}
  8.                         <h2 class="mb-12 text-2xl text-center md:text-4xl">{{ pimcore_input('title', { label: 'Titel' }) }}</h2>
  9.                     {% endif %}
  10.                     <div class="mb-6 !-mx-5 swiper customer-content-swiper lg:!mx-auto relative">
  11.                         <div class="swiper-wrapper">
  12.                             {% include 'areas/testimonial-brick/partials/editmode/_no-objects-found.html.twig' %}
  13.                             {# Defined as EditableDialog field #}
  14.                             {% for client in clients %}
  15.                                 <div class="grid grid-cols-12 lg:gap-6 swiper-slide">
  16.                                     <div class="col-span-12 xl:col-start-2 xl:row-start-1 xl:col-span-6">
  17.                                         {% if client.media.items[0] is defined and client.media.items[0] is not null %}
  18.                                             {{ client.media.items[0].thumbnail('testimonial-large').html(
  19.                                                 {
  20.                                                     'pictureAttributes': {
  21.                                                         'class': 'inline-block overflow-hidden shadow-lg sm:rounded-md w-full',
  22.                                                     },
  23.                                                     'imgAttributes': {
  24.                                                         'class': 'object-cover object-center w-full h-full'
  25.                                                     },
  26.                                                 }
  27.                                             )|raw }}
  28.                                         {% endif %}
  29.                                     </div>
  30.                                     <div class="col-span-12 xl:col-span-6 xl:col-start-6 xl:row-start-1 flex items-center">
  31.                                         {% include 'areas/testimonial-brick/partials/editmode/_no-client-details-found.html.twig' %}
  32.                                         <div class="relative md:mx-6 -mt-12 lg:mt-10">
  33.                                             <div class="block p-8 text-white bg-blue-500 md:rounded shadow-lg ">
  34.                                                 <blockquote class="mb-8 text-xl font-bold leading-8 md:text-2xl">
  35.                                                     {% if client.story %}
  36.                                                         “{{ client.story }}”
  37.                                                     {% endif %}
  38.                                                 </blockquote>
  39.                                                 <span class="font-bold">
  40.                                                     {% if client.job_title and client.contact %}
  41.                                                         {{ client.contact }}, {{ client.job_title }}
  42.                                                     {% elseif client.contact %}
  43.                                                         {{ client.contact }}
  44.                                                     {% endif %}
  45.                                                 </span>
  46.                                             </div>
  47.                                             {% if client.logo %}
  48.                                                 <span class="flex justify-center py-6">
  49.                                                     {{ client.logo.thumbnail('testimonial-small').html({
  50.                                                         pictureAttributes: {class: 'p-6 rounded flex justify-center cursor-pointer bg-white !w-[188px] h-[60px] swiper-slide'},
  51.                                                     }) | raw }}
  52.                                                 </span>
  53.                                             {% endif %}
  54.                                             {% if document.getProperty('clientArchivePage') %}
  55.                                                 <a
  56.                                                     class="button button__secondary button__secondary--white button--no-l-padding group"
  57.                                                     href="{{ document.getProperty('clientArchivePage').url | trimUrl }}"
  58.                                                 >
  59.                                                     <span
  60.                                                         class="flex items-center justify-center w-6 h-6 ml-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white">
  61.                                                         <svg class="h-3.5 w-3.5"
  62.                                                             xmlns="http://www.w3.org/2000/svg"
  63.                                                             viewBox="0 0 16 16">
  64.                                                             <path fill="currentColor" fill-rule="currentColor"
  65.                                                                 d="m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z"/>
  66.                                                         </svg>
  67.                                                     </span>
  68.                                                     {{ "Bekijk alle verhalen"|trans }}
  69.                                                 </a>
  70.                                             {% endif %}
  71.                                         </div>
  72.                                     </div>
  73.                                 </div>
  74.                             {% endfor %}
  75.                         </div>
  76.                         <div class="mx-6 md:mx-0 flex md:justify-end justify-between flex-row">
  77.                             <div class="!w-auto flex items-center customer-swiper-pagination swiper-pagination-bullets swiper-pagination-horizontal"></div>
  78.                             <div class="flex md:ml-12">
  79.                                 <div class="customer-swiper-button-prev testimonial-swiper-pagination-button">
  80.                                     <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"><path fill="#0072BB" fill-rule="evenodd" d="M15.106 8.883H3.396l3.218 3.218a.885.885 0 1 1-1.252 1.252L.707 8.695a1 1 0 0 1 0-1.414l4.655-4.656a.885.885 0 1 1 1.252 1.252L3.396 7.095h11.71a.894.894 0 0 1 0 1.788Z"/></svg>
  81.                                 </div>
  82.                                 <div class="customer-swiper-button-next testimonial-swiper-pagination-button">
  83.                                     <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"><path fill="#0072BB" fill-rule="evenodd" d="M.894 7.095h11.71L9.386 3.878a.885.885 0 1 1 1.252-1.252l4.655 4.656a1 1 0 0 1 0 1.414l-4.655 4.656A.885.885 0 1 1 9.386 12.1l3.218-3.217H.894a.894.894 0 0 1 0-1.788Z"/></svg>
  84.                                 </div>
  85.                             </div>
  86.                         </div>
  87.                     </div>
  88.                 </div>
  89.             </section>
  90.         {% endif %}
  91.     {% endblock %}
  92. {% endembed %}