{% set isMirrored = false %}{% if mirrored|default() %} {% set isMirrored = true %}{% endif %}{% set standalone = false %}{% if project | default() %} {% set title = project.getReferenceTitle() | default() %} {% set description = project.getReferenceDescription() | default() %} {% set subtitle = project.getImageSubtitle() | default() %} {% set image = project.visuals.current() %} {% set sector = project.sectors | first %} {% if (sector) %} {% set icon = sector.icon %} {% else %} {% set icon = null %} {% endif %} {% set usp_title = project.getUspTitle() | default() %} {% set contact_link = project.getCtaLink() | default() %} {% set contact_image = project.getCtaImage() | default() %} {% set usp_items = project.getUspItems() | default() %}{% else %} {% if pimcore_relation('relatedProject').isEmpty() %} <p>no project linked</p> {% else %} {% set title = pimcore_relation('relatedProject').getData().getReferenceTitle() | default() %} {% set description = pimcore_relation('relatedProject').getData().getReferenceDescription() | default() %} {% set subtitle = pimcore_relation('relatedProject').getData().getImageSubtitle() | default() %} {% if pimcore_relation('relatedProject').getData().sectors | default() %} {% set sector = pimcore_relation('relatedProject').getData().sectors | first %} {% if (sector) %} {% set icon = sector.icon %} {% else %} {% set icon = null %} {% endif %} {% endif %} {% if pimcore_relation('relatedProject').getData().visuals | default() %} {% set image = pimcore_relation('relatedProject').getData().visuals.current() %} {% endif %} {% set usp_title = pimcore_relation('relatedProject').getData().getUspTitle() | default() %} {% set contact_link = pimcore_relation('relatedProject').getData().getCtaLink() | default() %} {% set contact_image = pimcore_relation('relatedProject').getData().getCtaImage() | default() %} {% set usp_items = pimcore_relation('relatedProject').getData().getUspItems() | default() %} {% set standalone = true %} {% endif %}{% endif %}{% if standalone %} <div class="container">{% endif %}<div class="flex w-full block col-span-12 items-center relative {% if isMirrored %} md:flex-row-reverse {% else %} md:flex-row {% endif %} flex-col-reverse {{ class ?? '' }}"> <div class="w-full md:w-[57%] bg-white px-8 py-6 md:p-10 flex flex-col items-start md:rounded"> {% include 'includes/cards/partials/label.html.twig' with { label: 'Projectreferentie' | trans } %} {% if title %} <h2 class="mt-4">{{ title }}</h2> {% endif %} {% if description %} <p>{{ description | raw }}</p> {% endif %} {% if usp_title %} <h3 class="mt-4 mb-6">{{ usp_title }}</h3> {% endif %} {% if usp_items %} <div class="flex flex-col gap-8"> {% for item in usp_items %} <div class="flex flex-row gap-4"> {% set itemIcon = item.uspItemIcon.getData() | default() %} {% set itemTitle = item.uspItemTitle.getData() | default() %} {% set itemDescription = item.uspItemDescription.getData() | default() %} {% if itemIcon %} <img class="w-[54px] h-[54px]" src="{{ itemIcon.getThumbnail('sector-card-usp') }}" alt=""> {% endif %} <div> {% if itemTitle %} <h4>{{ itemTitle }}</h4> {% endif %} {% if itemDescription %} <p>{{ itemDescription }}</p> {% endif %} </div> </div> {% endfor %} </div> {% endif %} {% if contact_link %} <a href="{{ contact_link.href() }}" class="flex flex-row gap-4 w-full md:max-w-max mt-6 py-4 px-4 md:pl-8 md:pr-16 bg-blue-300 text-white rounded hover:bg-blue-500 transition-all duration-100"> {% if contact_image %} {{ contact_image.getThumbnail('sector-card-cta').html({ imgAttributes: {class: 'rounded-full overflow-hidden'}, }) | raw }} {% endif %} <div> <h4 class="text-[20px]">{{ contact_link.getText() }}</h4> <div class="mt-4 md:mt-0 flex flex-row"> <b>{{ 'project.reference_button' | trans }}</b> <span class="flex items-center justify-center shadow w-7 h-7 ml-3 transition-all bg-white rounded-full text-blue"> <svg class="rotate-180 relative left-[1px]" width="0.85em" height="0.85em" fill="#0072BB" viewBox="0 0 10 16" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M7.685.344.722 7.075C.474 7.315.333 7.65.333 8c0 .35.14.685.389.925l6.963 6.732a1.206 1.206 0 0 0 1.749-.068l.09-.113a1.297 1.297 0 0 0-.154-1.67L3.36 8 9.37 2.193A1.295 1.295 0 0 0 9.434.41 1.205 1.205 0 0 0 7.685.344Z"></path></svg> </span> </div> </div> </a> {% endif %} </div> <div class="w-full md:w-[43%] bg-blue-200"> {% if isMirrored %} {% set pictureClass = 'block overflow-hidden rounded-l' %} {% else %} {% set pictureClass = 'block overflow-hidden rounded-r' %} {% endif %} <div class="relative"> {% if image | default() %} {{ image.getThumbnail('project-card-1-1').html({ pictureAttributes: {class: pictureClass}, imgAttributes: {class: 'w-full'}, })|raw }} {% endif %} {% if sector | default() %} {% include 'includes/cards/partials/label.html.twig' with { label: sector.branchename, labelIcon: icon, position: 'absolute top-6 right-6' } %} {% endif %} </div> <div class="flex {% if isMirrored %} justify-end {% endif %}"> <div class="bg-gray-100 px-6 py-4 w-full md:w-[90%] {% if isMirrored %} md:rounded-bl {% else %} md:rounded-br {% endif %}"> {{ subtitle }} </div> </div> </div></div>{% if standalone %} </div>{% endif %}