{% set types = ['All projects', 'Ongoing', 'Coming', 'Completed']
%}
{% import "./macros_typography.html.twig" as macrosTypography %}
{% import "./macros_button.html.twig" as macrosButton %}
<section class="projects-section py-12"
section-shade="dark">
<div class="big-container">
<nav>
<ul class="projects-type-wrapp flex flex-wrap gap-x-4 gap-y-5">
{% for type in types %}
<li fade
fade-trigger="none">
<button class="project-type-btn {{loop.first ? 'active'}}"
type="{{loop.first ? '' : type|lower|replace({' ': '_'}) }}">
<svg>
<use xlink:href="#icon-check"></use>
</svg>
{{type}}
</button>
</li>
{% endfor %}
</ul>
</nav>
<div class="grid md:grid-cols-2 2xl:grid-cols-3 gap-x-8 gap-y-10 md:gap-y-28 mt-12">
{% for project in content.projects %}
<div class="project-item grid grid-rows-[auto_1fr]"
type="{{ project.projectType|lower|replace({' ': '_'}) }}"
fade
fade-trigger="none">
<div class="relative overflow-hidden">
{% if project.projectType %}
<div class="absolute top-4 left-4 bg-white rounded-full py-2 px-6 text-blue text-sm z-10">
{{project.projectType}}
</div>
{% endif %}
<div
class="project-item__img h-[50vh] min-h-[310px] max-h-[310px] lg:max-h-[450px] scale-110 img-clip select-none">
{# image size 720x840 #}
{% if project.image|length > 0 %}
{% set image = project.image.thumbnails['720x840'] %}
<img src="{{ image }}"
width="100"
height="450px"
alt="{{project.title}}"
loading="lazy">
{% endif %}
{% if project.image|length > 0 %}
{% set image = project.image.thumbnails['720x840'] %}
<img src="{{ image }}"
width="100"
height="450px"
alt="{{project.title}}"
loading="lazy">
{% endif %}
</div>
</div>
<div class="project-item__content relative flex flex-col pt-4 md:pt-10 bg-blue text-white group">
<a class="absolute inset-0 text-[0px] z-10"
href="{{ sulu_content_path(project.url) }}">{{project.title}}</a>
{% if project.location %}
<div class="project-item__eyebrow text-sm w-10/12"
split-directon="bottom"
split-trigger="none">
<span>{{project.location}}</span>
{% if project.area %}
<span class="inline-block px-2 opacity-50">•</span>
<span>{{project.area}}m<sup>2</sup>
</span>
{% endif %}
{% if project.rooms %}
<span class="inline-block px-2 opacity-50">•</span>
<span>{{project.rooms}}
</span>
{% endif %}
</div>
{% endif %}
<h2 class="project-item__title h3 w-10/12 mt-3 group-hover:underline duration-300"
split-diretion="bottom"
split-trigger="none">{{project.title}}</h2>
{{macrosButton.arrowDiagonal({
'class': 'project-item__arrow !absolute bottom-0 right-0',
'withoutAnimate': true
})
}}
</div>
</div>
{% endfor %}
</div>
{% include "./partials/layout/pagination.html.twig" with {
'class' : 'white mt-14 md:mt-24'
} %}
</div>
</section>