{% extends 'base.html.twig' %}
{% block title %}Vendre{% endblock %}
{% block body %}
{% set headerContent = content('Contact', 'Header') %}
{% if headerContent.picture is defined and headerContent.picture is not empty %}
{% set backgroundImage = headerContent.picture[0].path %}
{% else %}
{% set backgroundImage = 'empty' %}
{% endif %}
<header class="header-habiter col-lg-8 mx-auto" style="background-image: url({{ asset('img/vente.png') }}); height: 480px">
<div class="container-fluid">
<div class="col-lg-8 mx-auto div-svg-header">
<div class="header-habiter-div">
</div>
</div>
</div>
</header>
<div class="container-fluid" style="margin-top: 60px; margin-bottom: 80px">
{% set contactContent = content('Contact', 'Section-1') %}
<div class="col-lg-8 mx-auto div-svg-header pre-section">
<div class="col-lg-4" style="font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;">
<svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
<path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"/>
</svg>
<h1 class="project-title contact">VENDEZ AVEC NOUS</h1>
</div>
<div class="separator"></div>
<div class="col-lg-6 pre-section-content">
Que vous souhaitiez vendre, acheter ou louer, n’hésitez pas à nous contacter pour toute information.
</div>
</div>
{{ form_start(form) }}
<div id="div-form-contact" class="form-group col-lg-8 mx-auto" style="display: flex;">
<div class="col-lg-4" style="display: flex; flex-direction: column; margin-right: 50px">
<div class="form-material floating contact">
{{ form_widget(form.name, {'attr': { 'class':'form-control', 'placeholder': 'Nom*'}}) }}
{{ form_errors(form.name) }}
</div>
<div class="form-material floating contact">
{{ form_widget(form.firstname, {'attr': { 'class':'form-control', 'placeholder': 'Prénom'}}) }}
{{ form_errors(form.firstname) }}
</div>
<div class="form-material floating contact">
{{ form_widget(form.mail, {'attr': { 'class':'form-control', 'placeholder': 'Mail*'}}) }}
{{ form_errors(form.mail) }}
</div>
<div class="form-material floating contact">
{{ form_widget(form.phone, {'attr': { 'class':'form-control', 'placeholder': 'Téléphone'}}) }}
{{ form_errors(form.phone) }}
</div>
<div class="form-material floating contact position-relative">
{{ form_widget(form.file, {'attr': { 'class':'form-control file-select', 'placeholder': 'Joindre un fichier   (.doc, .pdf, .jpeg / max. 5mo) '}}) }}
{{ form_errors(form.file) }}
<div style="height:35px;width:35px;background: #707070;right:0;top:0;" class="position-absolute">
<svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35">
<g id="Groupe_4187" data-name="Groupe 4187" transform="translate(-695 -829)">
<rect id="Rectangle_139" data-name="Rectangle 139" width="35" height="35" transform="translate(695 829)" fill="#5f5f5f"/>
<path id="np_download_4247984_000000" d="M24.127,24.127V17.751H25.4V25.4H5V17.751H6.275v6.376Zm-17.852,0H24.127V17.751H25.4V25.4H5V17.751H6.275Zm9.563-5.162,4.784-5.047.955.888-6.437,6.77L8.826,14.937l.955-.888,4.784,4.916V5h1.275Zm-1.326,2.611.033.035v-.035Z" transform="translate(697.799 831.799)" fill="#fff"/>
</g>
</svg>
</div>
</div>
</div>
<div class="col-lg-6" style="display: flex; flex-direction: column">
<div class="form-material floating contact selectdiv">
{{ form_widget(form.object, {'attr': { 'class':'form-control'}}) }}
{{ form_errors(form.object) }}
</div>
<div class="form-material floating contact">
{{ form_widget(form.message, {'attr': { 'class':'form-control', 'placeholder': 'Votre message'}}) }}
{{ form_errors(form.message) }}
</div>
</div>
<div class="col-lg-1">
<div class="submit-contact-button">
<div>
<button id="login_user" class="col-lg-12 offset-lg-4btn btn-primary" type="submit" style="background-color: #f6a400; border-color: #f6a400;">
<?xml version="1.0" encoding="UTF-8"?>
<svg id="SVGDoc" width="19" height="15" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:avocode="https://avocode.com/" viewBox="0 0 19 15"><defs></defs><desc>Generated with Avocode.</desc><g><g transform="rotate(90 9.5 7.5)"><title>np_arrow-up_888648_000000</title><path d="M16.10552,5.28141v0l-6.60555,-6.60459v0l-6.60554,6.60459v0l1.3808,1.3808v0l4.23854,-4.23949v0v13.90055v0h1.97232v0v-13.90055v0l4.23855,4.23949v0z" fill="#ffffff" fill-opacity="1"></path></g></g></svg>
</button>
</div>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
<section style="background:#F7F7F7" class="pt-5 pb-5">
<div class="col-lg-8 mx-auto">
<div class="col-lg-5 title-vendre-other">
<svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
<path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"></path>
</svg>
<h1 class="project-title">
NOS biens disponibles<br> À la <span style="color:#F6A400">vente</span>
</h1>
</div>
<div id="propertiesOther" class="vendre col-lg-12 mt-5" style="display: flex; flex-wrap: wrap; flex-direction: row">
{% for property in salesProperties %}
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
{% if property.pictures is not empty %}
<div class="position-relative properties-slide slick-slide-single-{{ loop.index }}">
{% for picture in property.pictures|slice(0,3) %}
{# <img class="img-100" src="{{ picture.url }}">#}
<div class="img" style="background-image: url('{{ picture.url }}')" onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
</div>
{% endfor %}
</div>
{% else %}
<div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
{% endif %}
<div class="row col-md-12 justify-content-between infos-list">
<ul class="col-md-4 items">
<li class="item surface">
<img src="{{ asset('img/surface.svg') }}" class="surface-logo"> {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
</li>
</ul>
<div class="col-md-8 properties-price d-flex justify-content-end">
{{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~ property.price.currency|replace({"EUR": " €"}) }}
</div>
</div>
<p class="city">{{ property.city.name }}</p>
<p class="project-name">{{ property.reference }}</p>
</div>
{% endfor %}
</div>
<div id="link-none" class="col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end" style="margin-top:0;">
<div>
<a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': 'vente'}) }}">Découvrir plus
<svg class="svg-inline--fa fa-arrow-right fa-w-14 property-arrow" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="arrow-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg=""><path fill="currentColor" d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"></path></svg><!-- <i class="fas fa-arrow-right property-arrow"></i> Font Awesome fontawesome.com -->
</a>
</div>
</div>
</div>
</section>
<section style="background:#F7F7F7" class="pt-5 pb-5">
<div class="col-lg-8 mx-auto">
<div class="col-lg-5 title-vendre-other">
<svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
<path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"></path>
</svg>
<h1 class="project-title">
NOS biens disponibles<br> À la <span style="color:#F6A400">location</span>
</h1>
</div>
<div id="propertiesOther" class="col-lg-12 mt-5" style="display: flex; flex-wrap: wrap; flex-direction: row">
{% for property in rentsProperties %}
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
{% if property.pictures is not empty %}
<div class="position-relative properties-slide slick-slide-rent-{{ loop.index }}">
{% for picture in property.pictures|slice(0,3) %}
{# <img class="img-100" src="{{ picture.url }}">#}
<div class="img" style="background-image: url('{{ picture.url }}')" onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
</div>
{% endfor %}
</div>
{% else %}
<div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
{% endif %}
<div class="row col-md-12 justify-content-between infos-list">
<ul class="col-md-4 items">
<li class="item surface">
<img src="{{ asset('img/surface.svg') }}" class="surface-logo"> {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
</li>
</ul>
<div class="col-md-8 properties-price d-flex justify-content-end">
{{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~ property.price.currency|replace({"EUR": " €"}) }}
</div>
</div>
<p class="city">{{ property.city.name }}</p>
<p class="project-name">{{ property.reference }}</p>
</div>
{% endfor %}
</div>
<div id="link-none" class="col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end" style="margin-top:0;">
<div>
<a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': 'location'}) }}">Découvrir plus
<svg class="svg-inline--fa fa-arrow-right fa-w-14 property-arrow" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="arrow-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg=""><path fill="currentColor" d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"></path></svg><!-- <i class="fas fa-arrow-right property-arrow"></i> Font Awesome fontawesome.com -->
</a>
</div>
</div>
</div>
</section>
<script>
const arrowPrev = `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
<path id="np_arrow-up_888648_000000" d="M13.211,1.381l-6.606,6.6L0,1.381,1.381,0,6.606,5.022h0L11.83,0Z" transform="translate(7.985) rotate(90)" fill="#fff"/>
</svg>`;
const arrowNext= `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
<path id="np_arrow-up_888648_000000" d="M13.211,1.381l-6.606,6.6L0,1.381,1.381,0,6.606,5.022h0L11.83,0Z" transform="translate(7.985) rotate(90)" fill="#fff"/>
</svg>`;
var countProperties = '{{ salesProperties|length }}';
var loopProp = 1;
while (loopProp <= countProperties) {
$('.slick-slide-single-'+loopProp).slick({
'slidesToShow': 1,
'prevArrow': `<div class="arrow-left square-black d-flex justify-content-center align-items-center position-absolute">${arrowPrev}</div>`,
'nextArrow': `<div class="arrow-right square-black d-flex justify-content-center align-items-center position-absolute">${arrowNext}</div>`
});
loopProp++;
}
var countPropertiesRent = '{{ rentsProperties|length }}';
var loopPropRent = 1;
while (loopPropRent <= countPropertiesRent) {
$('.slick-slide-rent-'+loopPropRent).slick({
'slidesToShow': 1,
'prevArrow': `<div class="arrow-left square-black d-flex justify-content-center align-items-center position-absolute">${arrowPrev}</div>`,
'nextArrow': `<div class="arrow-right square-black d-flex justify-content-center align-items-center position-absolute">${arrowNext}</div>`
});
loopPropRent++;
}
</script>
{% endblock %}