templates/includes/blocks/projectSingleDetailsSection.html.twig line 1

Open in your IDE?
  1.   {# 
  2.   TODO:
  3.   3. Create multi range component (Budget, Area)
  4.   5. Create Show more logic
  5.   6. Create Multi Filtration logic
  6.  #}
  7.   <section class="project-details-section pt-20 lg:pb-24 bg-light text-blue" section-shade="light">
  8.     <div class="big-container flex flex-col lg:flex-row justify-between" batch-wrapp>
  9.       {# Appartment list #}
  10.       {# <div class="lg:w-6/12 lg:max-w-[620px]">
  11.         <h2 class="h3" fade fade-trigger="batch">Apartments / Lots</h2>
  12.         <div class="flex gap-8 mt-8" fade fade-trigger="batch">
  13.           <input-rooms
  14.             label-text="Rooms"
  15.             name="project-rooms"
  16.             :options="[
  17.               { id: '{{"1"|trans}}', text: '{{"1"|trans}}' },
  18.               { id: '{{"2"|trans}}', text: '{{"2"|trans}}' },
  19.               { id: '{{"3"|trans}}', text: '{{"3"|trans}}' },
  20.               { id: '{{"4+"|trans}}', text: '{{"4+"|trans}}' },
  21.             ]"
  22.           ></input-rooms>
  23.         </div>
  24.         <div class="mt-8" fade fade-trigger="batch">
  25.           <input-checkbox
  26.             name="hideSold"
  27.           >
  28.             <p class="text-blue">
  29.               Hide sold 
  30.             </p>
  31.           </input-checkbox>
  32.         </div>
  33.         <div fade fade-trigger="batch">
  34.           <project-items
  35.           :items="[
  36.             {
  37.               img: './assets/oaks-lane/projects/appartment-001.webp',
  38.               title: 'Appartment 001',
  39.               isSold: false,
  40.               price: `CHF 1'490'000.-`,
  41.               area: '139',
  42.               floor: '1 Floor',
  43.               rooms : '2 Rooms',
  44.               href: '#'
  45.             },
  46.             {
  47.               img: './assets/oaks-lane/projects/appartment-002.webp',
  48.               title: 'Appartment 002',
  49.               isSold: false,
  50.               price: `CHF 1'80'000.-`,
  51.               area: '139',
  52.               floor: '1 Floor',
  53.               rooms : '3 Rooms',
  54.               href: '#'
  55.             },
  56.             {
  57.               img: './assets/oaks-lane/projects/appartment-003.webp',
  58.               title: 'Appartment 003 With big title',
  59.               isSold: false,
  60.               price: `CHF 1’490'000.-`,
  61.               area: '152',
  62.               floor: '1 Floor',
  63.               rooms : '4 Rooms',
  64.               href: '#'
  65.             },
  66.             {
  67.               img: './assets/oaks-lane/projects/appartment-003.webp',
  68.               title: 'Appartment 004',
  69.               isSold: true,
  70.               price: `CHF 1’490'000.-`,
  71.               area: '152',
  72.               floor: '1 Floor',
  73.               rooms : '4 Rooms',
  74.               href: '#'
  75.             },
  76.             {
  77.               img: './assets/oaks-lane/projects/appartment-002.webp',
  78.               title: 'Appartment 005',
  79.               isSold: true,
  80.               price: `CHF 1’490'000.-`,
  81.               area: '87',
  82.               floor: '1 Floor',
  83.               rooms : '2 Rooms',
  84.               href: '#'
  85.             },
  86.             
  87.             ]"
  88.           ></project-items>
  89.         </div>
  90.       </div> #}
  91.       {# Appartment list #}
  92.       {# <div class="lg:w-6/12 lg:max-w-[620px] js-apartments">
  93.         <h2 class="h3" fade fade-trigger="batch">Apartments / Lots</h2>
  94.         <div class="grid md:flex gap-8 mt-8" fade fade-trigger="batch">
  95.           <input-rooms
  96.             label-text="Rooms"
  97.             name="project-rooms"
  98.             :apartments="apartments"
  99.             v-model="filters.rooms"
  100.           ></input-rooms>
  101.           <div class="md:w-0 md:flex-grow">
  102.             <input-interval label-text="Budget" v-model="filters.budget" :enable-cross="false" :min="0" :max="10000000" :interval="10000" prefix="CHF" suffix=".-"/>
  103.           </div>
  104.           <div class="md:w-0 md:flex-grow">
  105.             <input-interval label-text="Area" v-model="filters.area" :enable-cross="false" :min="0" :max="500" :interval="1" />
  106.           </div>
  107.         </div>
  108.         <div class="mt-8" fade fade-trigger="batch">
  109.           <input-checkbox
  110.             :checked="filters.hideSold"
  111.             @input="handleHideSoldChange"
  112.           >
  113.             <p class="text-blue">
  114.               Hide sold 
  115.             </p>
  116.           </input-checkbox>
  117.         </div>
  118.         <div fade fade-trigger="batch">
  119.           <project-items :items="paginatedAndFilteredApartments" price-prefix="CHF" price-suffix=".-"></project-items>
  120.           <button
  121.             v-if="canLoadMore"
  122.             @click="loadMore"
  123.             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"
  124.           >
  125.             <p class="group-hover:-translate-y-1 group-focus-visible:-translate-y-1 duration-200">
  126.               Show more
  127.             </p>
  128.             <svg class="shrink-0 w-2 h-6 group-hover:-translate-y-1 group-focus-visible:-translate-y-1 duration-200">
  129.               <use xlink:href="#arrow-down"></use>
  130.             </svg>
  131.           </button>
  132.         </div>
  133.       </div> #}
  134.       {# Details side #}
  135.       <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">
  136.         <h2 class="h3" fade fade-trigger="batch">{{ content.projectDetailsTitle }}</h2>
  137.         <ul class="flex flex-col gap-6 mt-6">
  138.           {% for item in content.details %}
  139.           
  140.           {% if item.detailsType == 'Lots' %}
  141.               {% set icon = 'lots' %}
  142.           {% elseif item.detailsType == 'Floors' %}
  143.               {% set icon = 'floors' %}
  144.           {% elseif item.detailsType == 'Gross-floor-area' %}
  145.               {% set icon = 'gross-floor' %}
  146.           {% elseif item.detailsType == 'Garden' %}
  147.               {% set icon = 'garden' %}
  148.           {% elseif item.detailsType == 'Terrace' %}
  149.               {% set icon = 'terrace' %}
  150.           {% elseif item.detailsType == 'Basement' %}
  151.               {% set icon = 'basement' %}
  152.           {% elseif item.detailsType == 'Number-of-rooms' %}
  153.               {% set icon = 'number-of-rooms' %}
  154.           {% elseif item.detailsType == 'M2-weighted' %}
  155.               {% set icon = 'warning' %}
  156.           {% elseif item.detailsType == 'Price-without-parking' %}
  157.               {% set icon = 'price-without-parking' %}
  158.           {% elseif item.detailsType == 'Price-with-parking' %}
  159.               {% set icon = 'price-with-parking' %}
  160.           {% elseif item.detailsType == 'Parking-space' %}
  161.               {% set icon = 'parking-space' %}
  162.           {% elseif item.detailsType == 'Status' %}
  163.               {% set icon = 'warning' %}
  164.           {% else %}
  165.               {% set icon = '' %}
  166.           {% endif %}
  167.             <li class="flex justify-between gap-8 pb-6 border-b border-gray" fade fade-trigger="batch">
  168.               <p class="flex gap-5">
  169.                 <svg class="shrink-0 w-6 h-6">
  170.                   <use xlink:href="#{{icon}}"></use>
  171.                 </svg>
  172.                 <span>{{item.detailsTitle}}</span>
  173.               </p>
  174.               <p class="text-right">{{item.detailsText | raw}}</p>
  175.             </li>
  176.           {% endfor %}
  177.         </ul>
  178.       </div>
  179.     </div>
  180.   </section>