<section class="relative py-10 md:py-20"> <div class="absolute top-0 w-full h-40 bg-blue-200 -z-10"> <!-- empty --> </div> <div class="container grid grid-cols-12 gap-8"> <div class="order-2 col-span-12 md:order-1 md:col-span-6"> {% if product.schematics is defined %} {% for image in product.schematics %} {% if image is not null %} <div class="mb-8"> {{ image.thumbnail('default').html({ pictureAttributes: { class: 'block object-cover object-center overflow-hidden rounded-md', } }) | raw }} </div> {# We only display 1 image according to design, even though the product can have multiple scematics #} {# TODO make it a swiper oid? #} {% break %} {% endif %} {% endfor %} {% endif %} {% if printmode is not defined %} <div class="text-white rounded-md md:p-10 bg-blue"> <h3 class="p-4 text-xl md:text-2xl md:p-0 md:mb-8">{{ "Downloads"|trans }}</h3> <div class="border-t border-white border-opacity-30"> {% if linkToSpecificationSheet is defined %} <div class="flex items-center px-4 py-3 border-b border-white md:px-0 border-opacity-30"> <span class="mr-4"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="17"><path fill="#FFF" fill-rule="evenodd" d="M16 12.5v3.2a.8.8 0 0 1-.8.8H.8a.8.8 0 0 1-.8-.8v-3.2h1.6v2.4h12.8v-2.4H16Zm-8 0a.797.797 0 0 0 .566-.234l3.2-3.2-1.132-1.132L8.8 9.77V.5H7.2v9.269L5.366 7.934 4.234 9.066l3.2 3.2c.15.15.354.234.566.234Z"/></svg> </span> <span class="font-bold md:text-lg grow"> {{ "Productsheet"|trans }} </span> <a href="{{ linkToSpecificationSheet | trimUrl }}" target="_blank" class="underline"> {{ "Downloaden"|trans }} </a> </div> {% endif %} </div> </div> {% endif %} </div> {% if product.specifications is defined %} <div class="order-1 col-span-12 md:order-2 md:col-span-6"> <div class="pt-6 pb-5 bg-gray-200 rounded-md md:pt-10 md:px-10" x-data="{ specificationsOpen: false }" > <h3 class="px-4 text-2xl font-bold md:px-0 md:text-4xl mb-9"> {{ "Technische Specificaties"|trans }} </h3> {# Here we set the maxinum amount of specs that are shown on initial page load. If there are more then this amount then those will be hidden, a button will then be shown #} {% set shownSpecsOnInitialLoad = (printmode is defined) ? 8 : 9 %} {% set showReadMoreSpecsButton = false %} {% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %} {% set specificationObject = spec.specification_property.data %} {% if (loop.index < shownSpecsOnInitialLoad) %} <div class="flex justify-between px-4 md:px-8 py-4 md:rounded-md {{ cycle(['', 'bg-white'], loop.index) }}"> <span>{{ specificationObject.title }}</span> <span>{{ spec.specification_value.data }} {{ specificationObject.unit }}</span> </div> {% else %} <div class="justify-between px-4 md:px-8 py-4 md:rounded-md {{ cycle(['', 'bg-white'], loop.index) }} " :class="specificationsOpen ? 'flex' : 'hidden'" > <span>{{ specificationObject.title }}</span> <span>{{ spec.specification_value.data }} {{ specificationObject.unit }}</span> </div> {% endif %} {% set showReadMoreSpecsButton = loop.index > shownSpecsOnInitialLoad %} {% endfor %} {# never show this button when printing (printmode), even though there could be more specs. #} {% if showReadMoreSpecsButton and printmode is not defined %} <div class="flex justify-center w-full mt-6"> <button class="button button__secondary group" @click="specificationsOpen = !specificationsOpen" > <span class="flex w-6 h-6 mr-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white "> <span class="flex items-center justify-center w-full h-full "> <svg x-show="!specificationsOpen" class="w-3.5 shrink-0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path fill="currentColor" fill-rule="nonzero" d="M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z"/> </svg> <svg x-show="specificationsOpen" class="w-3.5 shrink-0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 3"><path fill="currentColor" fill-rule="nonzero" d="M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z"/> </svg> </span> </span> <span x-show="!specificationsOpen">{{ "Alle technische specificaties tonen"|trans }}</span> <span x-show="specificationsOpen">{{ "Minder specificaties tonen"|trans }}</span> </button> </div> {% endif %} </div> </div> {% endif %} </div></section>