{% extends 'base.html.twig' %}
{% block title %}{{ settings[0].siteName }} : bienvenue !{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.4/tiny-slider.css">
<!--[if (lt IE 9)]><script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.4/min/tiny-slider.helper.ie8.js"></script><![endif]-->
{{ parent() }}
{% endblock %}
{% block body %}
{% for home in homepages %}
{# Hero + recherche #}
<div class="container-fluid" style="background-image: url('{{ asset("assets/img/home/" ~ home.heroImage ) }}'); height: 100vh; background-position: center; background-repeat: no-repeat; background-size: cover; position: relative; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="col-lg-10 col-sm-12 text-center py-5">
<h5 class="text-uppercase text-white capitalisfont mt-4">{{ home.title }}</h5>
<div class="row bg-white mt-4">
{{ form_start(form) }}
<div class="row">
<div class="col-lg-2 col-sm-12 small text-muted pt-2">
{{ form_row(form.bienType) }}
</div>
<div class="col-lg-3 col-sm-12 small text-muted pt-2">
{{ form_row(form.ville) }}
</div>
<div class="col-lg-2 col-sm-12 small text-muted pt-2">
{{ form_row(form.maxPrice) }}
</div>
<div class="col-lg-2 col-sm-12 small text-muted pt-2">
{{ form_row(form.minSurface) }}
</div>
<div class="col-lg-2 col-sm-12 small text-muted pt-2">
{{ form_row(form.nbPieces) }}
</div>
<div class="col-lg-1 col-sm-12 color-bg d-flex align-items-center justify-content-center">
<button class="btn" type="submit">
<svg style="fill: #fff;" width="45" height="45" id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 283.46 283.46">
<path d="M179.33,24.31c29.29,4.31,51.88,18.92,67.26,44.33,10.63,17.57,15.14,36.86,12.41,57.12-5.46,40.6-28.12,67.39-67.32,79.3-19.08,5.8-38.34,4.53-56.95-2.71-6.32-2.46-12.18-6.11-18.25-9.22-.6-.31-1.18-.65-1.96-1.08-1.05,5.25-4.33,8.85-7.85,12.37-15.53,15.49-31.05,30.98-46.46,46.58-4.18,4.23-8.56,7.91-14.58,9.06h-5.07c-5.23-1.18-10.05-3.28-13.02-7.94-1.77-2.79-2.73-6.09-4.05-9.17,0-1.69,0-3.39,0-5.08,1.18-6.11,4.95-10.51,9.22-14.75,15.72-15.6,31.34-31.31,46.95-47.02,3.3-3.33,6.8-6.23,11.66-7.21-2.08-3.67-4.21-7.12-6.06-10.71-8.91-17.35-12.04-35.74-9.29-55.04,3.82-26.8,17-47.99,39.08-63.46,13.61-9.54,28.89-14.76,45.51-15.93,.6-.04,1.19-.23,1.79-.35,3.23,0,6.46,0,9.69,0,2.43,.3,4.87,.55,7.29,.9Zm56.88,91.63c-.04-38.19-30.9-69.07-68.95-69.01-38.08,.06-69.03,31.07-68.95,69.09,.08,38.08,31.12,69.14,69.02,69.08,38.06-.07,68.91-31.05,68.87-69.15Z"/>
</svg>
</button>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</div>
</div>
{# Coup de coeur #}
<div class="container-fluid my-5 shadow">
<div class="row position-relative px-0">
<img class="px-0" src="{{ asset('assets/img/home/' ~ home.imageCoeur ) }}" alt="Image coup de Coeur" style="max-height: 100vh; object-fit: cover;">
<div class="col-lg-4 col-sm-12 color-bg p-4 mt-5 home-responsive-coeur">
<a class="button-white" href="{{ home.buttonUrlcoeur }}">
<svg class="me-2" width="25" height="25" viewBox="0 0 16 16">
<path fill="currentColor" fill-rule="evenodd"
d="M8 1.314C12.438-3.248 23.534 4.735 8 15C-7.534 4.736 3.562-3.248 8 1.314z" /></svg>
{{ home.buttonTextcoeur }}
</a>
<p class="small text-white mt-4">
{{ home.textcoeur|replace({'<div>': '', '</div>': '', '<p>': '', '</p>': ''})|raw }}
</p>
</div>
</div>
</div>
{# Tous nos biens #}
<div class="container-fluid">
<div class="row">
<div class="col position-relative px-0">
<div class="my-slider tousnosbiens-bg">
<!-- Images administrables -->
{% if home.imageBien1 != null %}
<div>
<img src="{{ asset('assets/img/home/' ~ home.imageBien1) }}" alt="maison1" class="d-block mx-auto w-100">
</div>
{% else %}
<img src="{{ asset('assets/img/maison.jpg') }}" alt="Arenes.immo" class="img-fluid">
{% endif %}
{% if home.imageBien2 != null %}
<div>
<img src="{{ asset('assets/img/home/' ~ home.imageBien2) }}" alt="maison2" class="d-block mx-auto w-100">
</div>
{% endif %}
{% if home.imageBien3 != null %}
<div>
<img src="{{ asset('assets/img/home/' ~ home.imageBien3) }}" alt="maison3" class="d-block mx-auto w-100">
</div>
{% endif %}
</div>
<div class="row">
<div class="tousnosbiens col-lg-4 col-sm-12 color-bg p-4 mt-4">
<div class="text-end">
<a class="button-white" href="{{ home.buttonUrlbiens }}">
<svg class="me-3 fw-bold" width="27" height="27" viewBox="0 0 24 24">
<path fill="currentColor"
d="M20 20a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9z" />
</svg>
{{ home.buttonTextbiens }}
</a>
<p class="small text-white mt-5">
{{ home.textbiens|replace({'<div>': '', '</div>': '', '<p>': '', '</p>': ''})|raw }}
</p>
</div>
</div>
</div>
<div class="d-flex justify-content-center container-fleches">
<div class="previous-arrow mx-5">
<svg style="fill: #fff; font-weight: bold;" width="45" height="45" viewBox="0 0 20 20">
<path d="m4 10l9 9l1.4-1.5L7 10l7.4-7.5L13 1z" /></svg>
</div>
<div class="next-arrow mx-5">
<svg style="fill: #fff; font-weight: bold;" width="45" height="45" viewBox="0 0 20 20">
<path d="M7 1L5.6 2.5L13 10l-7.4 7.5L7 19l9-9z" /></svg>
</div>
</div>
</div>
</div>
</div>
{# Avis #}
<div class="container-fluid avis-bg">
<div class="row">
<div class="col-lg-5 col-sm-12 avis-text">
<h3>{{ home.titleAvis }}</h3>
<p>
{{ home.textAvis|replace({'<div>': '', '</div>': '', '<p>': '', '</p>': ''})|raw }}
</p>
</div>
<div class="col-lg-2"></div>
<div class="col-lg-3 col-sm-12 position-relative text-center mt-5">
<div class="d-flex justify-content-center mt-5">
<div class="avis-contact position-absolute">
<svg class="mb-1 me-2" width="22" height="22" viewBox="0 0 24 24"><path fill="currentColor" d="m5.825 22l1.625-7.025L2 10.25l7.2-.625L12 3l2.8 6.625l7.2.625l-5.45 4.725L18.175 22L12 18.275Z"/></svg>
Avis clients
</div>
</div>
<div class="row">
<div class="col slider-avis-bg">
<div class="my-slider2">
{% if avis is defined and avis != null %}
{% for a in avis %}
<div class="px-5">
<p class="px-2">
{{ a.content|replace({'<div>': '', '</div>': '', '<p>': '', '</p>': '',})|slice(0,300)|raw }}
</p>
<span class="fw-bold">{{ a.nom|raw }}
{% if a.email != null %}
| {{ a.email }}
{% endif %}
{% if a.note != null %}
| Note : {{ a.note }}/5</span>
{% endif %}
</div>
{% endfor %}
{% else %}
<div class="px-5">
<p class="px-2 pt-3 fw-bold">
Il n'y a aucun avis.
</p>
</div>
{% endif %}
</div>
<div class="d-flex justify-content-between position-absolute w-100"
style="margin-top: -100px; position: relative; z-index: 10;">
<div class="previous-arrow2 ms-1">
<svg style="fill: #fff;" width="40" height="40" viewBox="0 0 20 20">
<path d="m4 10l9 9l1.4-1.5L7 10l7.4-7.5L13 1z" /></svg>
</div>
<div class="next-arrow2 me-4">
<svg style="fill: #fff;" width="40" height="40" viewBox="0 0 20 20">
<path d="M7 1L5.6 2.5L13 10l-7.4 7.5L7 19l9-9z" /></svg>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row pt-5 pb-3 d-flex justify-content-center">
<div class="col-lg-3 col-sm-12 text-center">
<hr style="width: 35%; margin-left: auto; margin-right: auto; border: 1px solid white; opacity: 100% !important;">
<h1 class="text-white pt-2">{{ home.titleBottom }}</h1>
</div>
</div>
</div>
{# Nous trouver #}
<div class="container-fluid trouver-bg">
<div class="row">
<div class="col trouver-adresse">
<a href="{{ home.buttonUrltrouver }}" class="button-trouver">
<svg class="me-2" width="27" height="27" viewBox="0 0 384 512">
<path fill="currentColor"
d="M384 192c0 87.4-117 243-168.3 307.2c-12.3 15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0s192 86 192 192z" />
</svg>
{{ home.buttonTexttrouver }}
</a>
<h4 class="text-uppercase mt-5 capitalisfont trouver-adresse-title">{{ settings[0].siteName }}</h4>
<p class="lead">
{{ settings[0].siteAdresse }}<br>
{{ settings[0].siteCp}} {{ settings[0].siteVille}}
</p>
</div>
{# <div class="col-lg-6 col-sm-12">
<img src="{{ asset('assets/img/map-trouver.jpg') }}" alt="Map" class="img-fluid" style="max-height: 350px; width: 100%; object-fit: cover;">
</div> #}
</div>
</div>
{% endfor %}
{% endblock %}
{% block javascripts %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.2/min/tiny-slider.js"></script>
<script type="module">
var slider = tns({
container: '.my-slider',
items: 1,
slideBy: 'page',
loop: true,
//autoplay: true,
//speed: 2000,
arrowKeys: true,
nav: false,
prevButton: '.previous-arrow',
nextButton: '.next-arrow',
});
</script>
<script type="module">
var slider2 = tns({
container: '.my-slider2',
items: 1,
slideBy: 'page',
loop: true,
//autoplay: true,
//speed: 2000,
arrowKeys: true,
nav: false,
prevButton: '.previous-arrow2',
nextButton: '.next-arrow2',
});
</script>
{{ parent() }}
{% endblock %}