{# Defined as EditableDialog field #}
{% set style = style ?? pimcore_select('style').getData ?? "images" %}
{# Defined as EditableDialog field #}
{% set sectors = sectors ?? pimcore_relations('sectors').getElements() %}
{% set clients = clients ?? pimcore_relations('clients').getElements() %}
{% include 'areas/sector-cards-brick/partials/editmode/_no-objects-found.html.twig' %}
{% embed 'app/area-brick-layout.html.twig' %}
{% block content %}
{% if style == 'images' and sectors|length > 0 %}
<!-- Branches 4 columns -->
<section class="{{ containerClasses ?? 'relative py-10' }} {{ defaultBackgroundColor ?? "" }}">
{% if disableBackground is not defined or not disableBackground %}
<div class="absolute w-full h-40 z-10 bg-white md:bg-blue-300
{{ defaultSecondBackgroundColor ?? "md:bg-blue-200" }}
{{ defaultSecondBackgroundPosition ?? "top-0" }}
">
<!-- empty -->
</div>
{% endif %}
<div class="container relative z-20">
<div class="grid grid-cols-12 gap-8">
{% for sector in sectors %}
{% set page = sector.page() %}
<a href="{{ page ? (page.url | trimUrl) : '' }}" class="col-span-12 md:col-span-6 lg:col-span-3 group">
<div class="relative hidden overflow-hidden rounded-md md:block">
{% set image = sector.visuals.current() %}
{% if image %}
{{ image.getThumbnail('sector-card').html({
pictureAttributes: {class: ''},
imgAttributes: {class: 'w-full'},
})|raw }}
{% endif %}
{% set icon = sector.icon() %}
{% if icon %}
<span class="absolute left-6 bottom-6">
{{ icon.getThumbnail('text-and-link-icon').html({
pictureAttributes: {class: 'rounded-full '},
imgAttributes: {class: 'w-full h-full'},
})|raw }}
</span>
{% endif %}
</div>
<div class="flex items-center justify-between md:mt-4">
{% set icon = sector.icon() %}
{% if icon %}
<span class="mr-2.5 md:hidden">
{{ icon.getThumbnail('text-and-link-icon').html({
pictureAttributes: {class: 'rounded-full '},
imgAttributes: {class: 'w-full h-full'},
})|raw }}
</span>
{% endif %}
{% if disableBackground is defined and disableBackground %}
{% set classes = "text-blue" %}
{% else %}
{% set classes = (defaultSecondBackgroundColor ?? null) === 'bg-blue-300' ? "text-blue md:text-white" : "text-blue md:text-white" %}
{% endif %}
<h3 class="grow text-lg font-bold {{ classes }}">{{ sector.branchename }}</h3>
<span
class="flex items-center justify-center w-6 h-6 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white">
<svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="currentColor" fill-rule="currentColor"
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"></path>
</svg>
</span>
</div>
</a>
{% endfor %}
</div>
</div>
</section>
{% elseif style == 'icons' and sectors|length > 0 %}
<section class="py-8 bg-blue-200 md:py-20">
<div class="container">
{% if clients|default(null) %}
<section>
{% for client in clients %}
<div class="grid grid-cols-12 lg:gap-6 swiper-slide">
<div class="col-span-12 xl:col-start-2 xl:row-start-1 xl:col-span-6">
{% if client.media.items[0] is defined and client.media.items[0] is not null %}
{{ client.media.items[0].thumbnail('testimonial-large').html(
{
'pictureAttributes': {
'class': 'inline-block overflow-hidden shadow-lg sm:rounded-md w-full',
},
'imgAttributes': {
'class': 'object-cover object-center w-full h-full'
},
}
)|raw }}
{% endif %}
</div>
<div class="col-span-12 xl:col-span-6 xl:col-start-6 xl:row-start-1 flex items-center">
{% include 'areas/testimonial-brick/partials/editmode/_no-client-details-found.html.twig' %}
<div class="relative md:mx-6 -mt-12 lg:mt-10">
<div class="block p-8 text-white bg-blue-500 md:rounded shadow-lg ">
<blockquote class="mb-8 text-xl font-bold leading-8 md:text-2xl">
{% if client.story %}
“{{ client.story }}”
{% endif %}
</blockquote>
<span class="font-bold">
{% if client.job_title and client.contact %}
{{ client.contact }}, {{ client.job_title }}
{% elseif client.contact %}
{{ client.contact }}
{% endif %}
</span>
</div>
{% if client.logo %}
<span class="flex justify-center py-6">
{{ client.logo.thumbnail('testimonial-small').html({
pictureAttributes: {class: 'p-6 rounded flex justify-center cursor-pointer bg-white !w-[188px] h-[60px] swiper-slide'},
}) | raw }}
</span>
{% endif %}
{% if document.getProperty('clientArchivePage') %}
<a
class="button button__secondary button__secondary--white button--no-l-padding group"
href="{{ document.getProperty('clientArchivePage').url | trimUrl }}"
>
<span
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">
<svg class="h-3.5 w-3.5"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16">
<path fill="currentColor" fill-rule="currentColor"
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"/>
</svg>
</span>
{{ "Bekijk alle verhalen"|trans }}
</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</section>
{% endif %}
{% if editmode %}
{% if showArchiveLink is not defined %}
<label>
{{ pimcore_checkbox('showArchiveLink', { reload: true }) }}
<span>Toon link naar overzichtspagina</span>
</label>
{% endif %}
{% endif %}
<div class="grid grid-cols-2 gap-6 font-bold text-center md:grid-cols-3 lg:grid-cols-4">
{% for sector in sectors %}
{% set page = sector.page() %}
<a href="{{ page ? (page.url | trimUrl) : '' }}"
class="flex flex-col items-center justify-between pt-8 pb-6 transition-transform bg-white rounded-md px-7 hover:scale-105 hover:drop-shadow-2xl hover:text-blue">
{% if sector.icon %}
{{ sector.icon.getThumbnail('sector-card-icon').html({
pictureAttributes: {class: 'inline mb-4 rounded-full '},
imgAttributes: {class: 'w-full h-full'},
})|raw }}
{% endif %}
<span>{{ sector.branchename }}</span>
</a>
{% endfor %}
{% if showArchiveLink ?? pimcore_checkbox('showArchiveLink').isChecked() %}
<a
href="{{ document.getProperty('sectorArchivePage').url | trimUrl }}"
class="flex flex-col items-center pt-8 pb-6 text-white transition-transform rounded-md px-7 justify-evenly bg-blue hover:scale-105 hover:drop-shadow-2xl"
>
<svg class="inline w-8 h-8 mb-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="currentColor" fill-rule="evenodd"
d="M3.5 9a3.5 3.5 0 0 1 .192 6.995L3.5 16a3.5 3.5 0 0 1-.192-6.995L3.5 9Zm9 0a3.5 3.5 0 0 1 .192 6.995L12.5 16a3.5 3.5 0 0 1-.192-6.995L12.5 9Zm-9 1.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM3.5 0a3.5 3.5 0 0 1 .192 6.995L3.5 7A3.5 3.5 0 0 1 3.308.005L3.5 0Zm9 0a3.5 3.5 0 0 1 .192 6.995L12.5 7a3.5 3.5 0 0 1-.192-6.995L12.5 0Zm-9 1.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"/>
</svg>
<span>{{ 'Bekijk alles' | trans }}</span>
</a>
{% endif %}
</div>
</div>
</section>
{% endif %}
{% endblock %}
{% endembed %}