templates/elements/home_cover/home_cover.html.twig line 1

Open in your IDE?
  1. {% import 'elements2024/macros/buttons.html.twig' as buttons %}
  2. <!-- Hero section -->
  3. <section class="home-hero-section relative max-lg:pt-32 max-lg:pb-16 md:h-screen">
  4.     <div class="absolute inset-0 overflow-hidden">
  5.         <div class="absolute inset-0 animate-slowLoopZoomInOut">
  6.             {% if image %}
  7.                 <img class="home-hero-bg img-cover" src="{{image.thumbnails['1440x800']}}" srcset="{{image.thumbnails['2880x1600']}} 2x" alt="">
  8.             {% endif %}
  9.             <div class="absolute inset-0 bg-dark/20"></div>
  10.         </div>
  11.     </div>
  12.     <div class="container px-4 h-full flex flex-col justify-center relative">
  13.         <div class="xl:max-w-8/12 w-full mx-auto">
  14.             <h1 class="home-hero-title h2 text-center uppercase text-white" fade>{{ title }}</h1>
  15.             <div class="home-hero-deal flex flex-col md:flex-row gap-4 lg:gap-8 mt-16" fade>
  16.                 <div class="form-deal-type">
  17.                     <button data-form-action="/buy" data-price-select="acheter" class="active" >Acheter</button>
  18.                     <button data-form-action="/rent" data-price-select="louer">Louer</button>
  19.                 </div>
  20.                 <a class="btn-rounded btn__green" href="/nos-services/estimer">
  21.                     <span>Estimer</span>
  22.                     <svg class="w-5 h-5" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  23.                         <path d="M1.25 10H18.75" stroke="currentColor"/>
  24.                         <path d="M13.75 5L18.75 10L13.75 15" stroke="currentColor"/>
  25.                     </svg>
  26.                 </a>
  27.             </div>
  28.             {% if eyebrowHtml is defined %}
  29.             <div class="text-white text-center">{{ eyebrowHtml | raw }}</div>
  30.             {% else %}
  31.             <form method="GET" action="/buy" class="home-hero-form flex flex-col lg:flex-row max-lg:gap-6 lg:justify-between bg-white py-6 lg:py-3 px-4 lg:pl-4 lg:pr-3 rounded-xl lg:rounded-full mt-4 lg:divide-x divide-dark/60">
  32.                 <div class="multiselect-wrapp lg:w-1/4">
  33.                     <label for="location" class="truncate">Localité(s) (Canton, ville, NPA)</label>
  34.                     <div class="js-location-select" id="location" name="location[]" fetch-url="{{path('offers_locations_autocomplete')}}"></div>
  35.                 </div>
  36.                 <div class="multiselect-wrapp lg:w-1/4">
  37.                     <label for="type">Type</label>
  38.                     {{ render(controller('App\\Controller\\Website\\LayoutController::selectType')) }}
  39.                 </div>
  40.                 <div class="multiselect-wrapp lg:w-1/4">
  41.                     <label>Budget (CHF)</label>
  42.                     <div data-vue-root>
  43.                         <dropdown>
  44.                             <template slot="header">
  45.                                 <button
  46.                                     type="button"
  47.                                     class="vscomp-toggle-button vscomp-wrapper"
  48.                                     :class="{ 'has-value': priceSelectionDisplay }"
  49.                                 >
  50.                                     <div class="vscomp-value" v-text="priceSelectionDisplay || 'Choisir'"></div>
  51.                                     <div class="vscomp-arrow"></div>
  52.                                 </button>
  53.                             </template>
  54.                             <template slot="default">
  55.                                 <div class="flex gap-4">
  56.                                     <number-input-with-suggestions
  57.                                         input-class="simple-input"
  58.                                         v-model="priceMin"
  59.                                         :suggestions="minPriceSuggestions"
  60.                                         :format-option="formatPriceOption"
  61.                                         placeholder="Min"
  62.                                         name="priceMin"
  63.                                         list-class="vscomp-options-list price-list"
  64.                                         list-item-class="vscomp-option"
  65.                                     />
  66.                                     <number-input-with-suggestions
  67.                                         input-class="simple-input"
  68.                                         v-model="priceMax"
  69.                                         :suggestions="maxPriceSuggestions"
  70.                                         :format-option="formatPriceOption"
  71.                                         placeholder="Max"
  72.                                         name="priceMax"
  73.                                         list-class="vscomp-options-list price-list"
  74.                                         list-item-class="vscomp-option"
  75.                                     />
  76.                                 </div>
  77.                             </template>
  78.                         </dropdown>
  79.                     </div>
  80.                 </div>
  81.                 <button class="btn-rounded btn__green">Recherche</button>
  82.             </form>
  83.             {% endif %}
  84.         </div>
  85.     </div>
  86. </section>