{#
TODO:
3. Create multi range component (Budget, Area)
5. Create Show more logic
6. Create Multi Filtration logic
#}
<section class="project-details-section pt-20 lg:pb-24 bg-light text-blue" section-shade="light">
<div class="big-container flex flex-col lg:flex-row justify-between" batch-wrapp>
{# Appartment list #}
{# <div class="lg:w-6/12 lg:max-w-[620px]">
<h2 class="h3" fade fade-trigger="batch">Apartments / Lots</h2>
<div class="flex gap-8 mt-8" fade fade-trigger="batch">
<input-rooms
label-text="Rooms"
name="project-rooms"
:options="[
{ id: '{{"1"|trans}}', text: '{{"1"|trans}}' },
{ id: '{{"2"|trans}}', text: '{{"2"|trans}}' },
{ id: '{{"3"|trans}}', text: '{{"3"|trans}}' },
{ id: '{{"4+"|trans}}', text: '{{"4+"|trans}}' },
]"
></input-rooms>
</div>
<div class="mt-8" fade fade-trigger="batch">
<input-checkbox
name="hideSold"
>
<p class="text-blue">
Hide sold
</p>
</input-checkbox>
</div>
<div fade fade-trigger="batch">
<project-items
:items="[
{
img: './assets/oaks-lane/projects/appartment-001.webp',
title: 'Appartment 001',
isSold: false,
price: `CHF 1'490'000.-`,
area: '139',
floor: '1 Floor',
rooms : '2 Rooms',
href: '#'
},
{
img: './assets/oaks-lane/projects/appartment-002.webp',
title: 'Appartment 002',
isSold: false,
price: `CHF 1'80'000.-`,
area: '139',
floor: '1 Floor',
rooms : '3 Rooms',
href: '#'
},
{
img: './assets/oaks-lane/projects/appartment-003.webp',
title: 'Appartment 003 With big title',
isSold: false,
price: `CHF 1’490'000.-`,
area: '152',
floor: '1 Floor',
rooms : '4 Rooms',
href: '#'
},
{
img: './assets/oaks-lane/projects/appartment-003.webp',
title: 'Appartment 004',
isSold: true,
price: `CHF 1’490'000.-`,
area: '152',
floor: '1 Floor',
rooms : '4 Rooms',
href: '#'
},
{
img: './assets/oaks-lane/projects/appartment-002.webp',
title: 'Appartment 005',
isSold: true,
price: `CHF 1’490'000.-`,
area: '87',
floor: '1 Floor',
rooms : '2 Rooms',
href: '#'
},
]"
></project-items>
</div>
</div> #}
{# Appartment list #}
{# <div class="lg:w-6/12 lg:max-w-[620px] js-apartments">
<h2 class="h3" fade fade-trigger="batch">Apartments / Lots</h2>
<div class="grid md:flex gap-8 mt-8" fade fade-trigger="batch">
<input-rooms
label-text="Rooms"
name="project-rooms"
:apartments="apartments"
v-model="filters.rooms"
></input-rooms>
<div class="md:w-0 md:flex-grow">
<input-interval label-text="Budget" v-model="filters.budget" :enable-cross="false" :min="0" :max="10000000" :interval="10000" prefix="CHF" suffix=".-"/>
</div>
<div class="md:w-0 md:flex-grow">
<input-interval label-text="Area" v-model="filters.area" :enable-cross="false" :min="0" :max="500" :interval="1" />
</div>
</div>
<div class="mt-8" fade fade-trigger="batch">
<input-checkbox
:checked="filters.hideSold"
@input="handleHideSoldChange"
>
<p class="text-blue">
Hide sold
</p>
</input-checkbox>
</div>
<div fade fade-trigger="batch">
<project-items :items="paginatedAndFilteredApartments" price-prefix="CHF" price-suffix=".-"></project-items>
<button
v-if="canLoadMore"
@click="loadMore"
class="w-full flex items-center justify-center gap-9 bg-white text-blue text-lg sm:text-xl xl:text-2xl h-20 outline-none border border-transparent group shadow-transparent hover:shadow-md hover:scale-[1.01] focus-visible:shadow-md focus-visible:border-blue/50 duration-300 mt-2"
>
<p class="group-hover:-translate-y-1 group-focus-visible:-translate-y-1 duration-200">
Show more
</p>
<svg class="shrink-0 w-2 h-6 group-hover:-translate-y-1 group-focus-visible:-translate-y-1 duration-200">
<use xlink:href="#arrow-down"></use>
</svg>
</button>
</div>
</div> #}
{# Details side #}
<div class="bg-white lg:bg-transparent mt-12 -mx-8 lg:m-0 pt-16 pb-6 lg:p-0 px-8 lg:w-5/12 xl:w-6/12 xl:pr-24">
<h2 class="h3" fade fade-trigger="batch">{{ content.projectDetailsTitle }}</h2>
<ul class="flex flex-col gap-6 mt-6">
{% for item in content.details %}
{% if item.detailsType == 'Lots' %}
{% set icon = 'lots' %}
{% elseif item.detailsType == 'Floors' %}
{% set icon = 'floors' %}
{% elseif item.detailsType == 'Gross-floor-area' %}
{% set icon = 'gross-floor' %}
{% elseif item.detailsType == 'Garden' %}
{% set icon = 'garden' %}
{% elseif item.detailsType == 'Terrace' %}
{% set icon = 'terrace' %}
{% elseif item.detailsType == 'Basement' %}
{% set icon = 'basement' %}
{% elseif item.detailsType == 'Number-of-rooms' %}
{% set icon = 'number-of-rooms' %}
{% elseif item.detailsType == 'M2-weighted' %}
{% set icon = 'warning' %}
{% elseif item.detailsType == 'Price-without-parking' %}
{% set icon = 'price-without-parking' %}
{% elseif item.detailsType == 'Price-with-parking' %}
{% set icon = 'price-with-parking' %}
{% elseif item.detailsType == 'Parking-space' %}
{% set icon = 'parking-space' %}
{% elseif item.detailsType == 'Status' %}
{% set icon = 'warning' %}
{% else %}
{% set icon = '' %}
{% endif %}
<li class="flex justify-between gap-8 pb-6 border-b border-gray" fade fade-trigger="batch">
<p class="flex gap-5">
<svg class="shrink-0 w-6 h-6">
<use xlink:href="#{{icon}}"></use>
</svg>
<span>{{item.detailsTitle}}</span>
</p>
<p class="text-right">{{item.detailsText | raw}}</p>
</li>
{% endfor %}
</ul>
</div>
</div>
</section>