{% extends 'base.html.twig' %}
{% block title %}Détails - {{ property.reference }}{% endblock %}
{% block metaDescription %}
<meta name="description" content="
{% if property.reference is defined %}
{{ property.reference }}
{% else %}
Tracol Immobilier propose une large offre en immobilier neuf (logements, bureaux, commerces), qui se caractérise par une architecture résolument contemporaine, des matériaux de qualité, et le soin apporté à chaque détail.
{% endif %}
">
{% endblock %}
{% block body %}
<style>
.d-block {
background-size:cover;
}
</style>
{#<header class="header-habiter slider-home slider-not-home who-is bottom-right-border position-relative to-right overflow-hidden">
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
{% for picture in property.pictures %}
<div class="carousel-item {% if loop.first %}active{% endif %}">
<div class="d-block w-100" style="background: url({{ picture.url }})no-repeat center;"></div>
</div>
{% endfor %}
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</header>#}
<section id="property-carousel">
<div class="col-lg-8 mx-auto">
{% if property.pictures|length == 1 %}
{% for picture in property.pictures %}
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
<div class="image-detail huge"><img src="{{ url }}" class="lightboxed" rel="property"></div>
{% endfor %}
{% elseif property.pictures|length == 2 or property.pictures|length == 4 %}
{% for picture in property.pictures %}
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
<div class="image-detail half"><img src="{{ url }}" class="lightboxed" rel="property"></div>
{% endfor %}
{% else %}
{% for picture in property.pictures %}
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
<div class="image-detail {% if loop.index > 1 and loop.index < 4 %}medium{% endif %}{% if loop.index > 3 and loop.index < 9 %}small{% endif %}{% if loop.index > 8 %}none{% endif %}"><img src="{{ url }}" class="lightboxed" rel="property"></div>
{% endfor %}
{% endif %}
</div>
</section>
{#<div class="jquery-carousel-wrapper">
<div data-jcarousel="true" data-wrap="circular" class="jquery-carousel">
<ul>
{% for picture in property.pictures %}
<li><img src="{{ picture.url }}" width="600" height="400" alt=""></li>
{% endfor %}
</ul>
</div>
<a data-jcarousel-control="true" data-target="-=1" href="#" class="carousel-control-prev">‹</a>
<a data-jcarousel-control="true" data-target="+=1" href="#" class="carousel-control-next">›</a>
</div>#}
{#
<header class="header-habiter slider-home slider-not-home who-is bottom-right-border position-relative overflow-hidden to-right lightbox-on"
id="sliderHeader"
style="background: url({{property.pictures[0].url}}) center center no-repeat;background-size:cover; position: relative; height: 91vh; cursor: zoom-in;"
data-id="modul-ref">
<div class="container-fluid" style="padding: 0">
<div class="col-lg-4 mx-auto" style="display: none;">
<div class="arrows-slides" style="display: flex; justify-content: space-between; margin-top: 20px; align-items: center; position: absolute">
<div class="arrow-right" id="slideNextHeader"><a><i class="fas fa-arrow-left"></i></a></div>
<div><span class="current-figure">01</span><span class="bar-figure">/</span><span class="last-figure">{{ property.pictures|length <= 9 ? '0' ~ property.pictures|length : property.pictures|length }}</span></div>
<div class="arrow-left" id="slidePreviousHeader"><a><i class="fas fa-arrow-right"></i></a></div>
</div>
</div>
{#
<div class="col-lg-12 property-detail-header" style="display: flex; position: absolute; bottom: 0px;">
<div class="col-lg-2 container-properties-header first"></div>
<div class="col-lg-5 container-properties-header" style="display: flex; align-items: center">
<div class="col-lg-3">
<p class="properties-city" >{{ property.city.name }}</p>
</div>
<div class="col-lg-3">
<p class="properties-area" style="text-align: center">{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }} </p>
</div>
<div class="col-lg-3">
<p class="properties-reference-detail">{{ property.reference }}</p>
</div>
</div>
<div class="col-lg-1 price-detail-bien" style="background-color: #c48300; display: flex; align-items: center; justify-content: center">
<p class="properties-price">
{{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value ~ property.price.currency|number_format(2, '.', ',')|replace({"EUR": " €"}) }}
</p>
</div>
</div>
</div>
<div class="sticky-text">Cliquer ici<br/>pour voir toutes les photos</div>
{% if property.pictures is not empty %}
<div class="lightbox" id="modul-ref">
<div class="closer"></div>
<div class="arrows left">←</div>
<div class="arrows right">→</div>
<div class="counter">1/1</div>
<ul class="items">
{% for picture in property.pictures %}
<li class="item">
<img class="img" src="{{ picture.url }}">
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if property.pictures is not empty %}
{% for picture in property.pictures %}
<div class="lightbox" id="modul-ref-{{ loop.index }}">
<div class="closer"></div>
<ul class="items">
<li class="item">
<img class="img" src="{{ picture.url }}">
</li>
</ul>
</div>
{% endfor %}
{% endif %}
</header>
#}
{#
<div class="col-lg-1 infos-person" style="display: flex; position: fixed; right: 274px;">
<div class="col-lg-12">
{% if property.user.picture is null %}
<img id="img-card" src="{{ asset('build/367e841db1c2c356ba01f78a108a59cb0c18ade2.png') }}">
{% else %}
<img id="img-card" width="161px" height="161px" src="{{ property.user.picture }}">
{% endif %}
</div>
</div>
#}
{#
<div class="col-lg-1 infos-person" style="position: fixed; width: 265px; display: flex; flex-direction: column">
<div class="col-lg-12 more-informations">
<p class="p-info-property">Pour plus d’informations concernant ce bien</p>
<p class="p-first-property">{{ property.user.firstname }}
{{ property.user.lastname }}
</div>
<div style="display: flex">
<div class="col-lg-2 p-mail-property">
<a href="mailto:{{ property.user.email }}">
<svg id="SVGMail" width="41" height="34" 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 41 34"><defs></defs><desc>Generated with Avocode.</desc><g><g><title>np_mail_91_000000</title><path d="M30.21872,22.58808l-6.13407,-5.78542l6.13407,-5.23238zM12.25999,22.93334l5.93459,-5.59678l2.63204,2.24505l2.63204,-2.24505l5.93459,5.59678zM11.4345,11.57018l6.13407,5.23239l-6.13407,5.78541zM29.54963,11.06668l-8.72302,7.44143l-8.72221,-7.44143zM10.6178,10.24829v13.50346h20.41763v-13.50346z" fill="#ffffff" fill-opacity="1"></path><path d="M30.21872,22.58808l-6.13407,-5.78542l6.13407,-5.23238zM12.25999,22.93334l5.93459,-5.59678l2.63204,2.24505l2.63204,-2.24505l5.93459,5.59678zM11.4345,11.57018l6.13407,5.23239l-6.13407,5.78541zM29.54963,11.06668l-8.72302,7.44143l-8.72221,-7.44143zM10.6178,10.24829v13.50346h20.41763v-13.50346z" fill-opacity="0" fill="#ffffff" stroke-dashoffset="0" stroke-linejoin="miter" stroke-linecap="butt" stroke-opacity="1" stroke="#ffffff" stroke-miterlimit="20" stroke-width="1"></path></g></g></svg>
</a>
</div>
<div class="col-lg-10 p-phone-property">
<a href="tel:{{ property.user.phone }}">
<?xml version="1.0" encoding="UTF-8"?>
<svg id="SVGPhone" width="28" height="24" 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 28 24"><defs></defs><desc>Generated with Avocode.</desc><g><g><title>Tracé 116</title><path d="M6.29423,1.97623l1.55604,5.45095l-1.79468,1.83287l0.32457,0.62049c1.80183,3.46169 4.62861,6.28247 8.09518,8.07624l0.50593,0.25775l2.72065,-1.82334l4.58217,1.54648v4.08578c-5.2362,-0.22434 -10.19412,-2.41279 -13.8898,-6.12851c-3.73264,-3.69781 -5.93178,-8.66917 -6.15722,-13.9182zM23.23881,23.93248h0.95462v-1.90924h2.86386v-1.90924h-2.86386v-3.55119l-6.82561,-2.27199l-2.55838,1.70879c-2.68607,-1.50592 -4.91392,-3.7134 -6.44376,-6.38633l1.63241,-1.63242l-2.272,-7.91372h-7.39838v0.95462c-0.03222,6.08574 2.37461,11.93046 6.68234,16.22854c4.29808,4.30786 10.1428,6.71442 16.22854,6.68234z" fill="#ffffff" fill-opacity="1"></path></g></g></svg>
{{ property.user.phone }}
</a>
</div>
</div>
</div>
#}
<section class="items-property-single mt-5 mb-5 pb-5">
<div class="row col-lg-8 mx-auto justify-content-center g-0">
{% if property.type and getTypeProperty(property.type) %}
<div class="item-single">
{# <img src="{{ asset('img/icons/surface.svg') }}" alt="Icone surface"> #}
<span style="font-weight: bold;color:#F6A400;">{{ getTypeProperty(property.type) }}</span>
</div>
{% if property.construction.construction_year or property.available_at or property.bedrooms or property.area.value %}
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endif %}
{% if property.area.value %}
<div class="item-single">
{# <img src="{{ asset('img/icons/surface.svg') }}" alt="Icone surface"> #}
<span>{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}</span>
</div>
{% if property.construction.construction_year or property.available_at or property.bedrooms %}
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endif %}
{% if property.bedrooms %}
<div class="item-single">
{# <img src="{{ asset('img/icons/chambre.svg') }}" alt="Icone chambre"> #}
<span>{{ property.bedrooms }} chambre{% if property.bedrooms > 1 %}s{% endif %}</span>
</div>
{% if property.construction.construction_year or property.available_at %}
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endif %}
{% for area in property.areas %}
{% if area.type == 13 %}
<div class="item-single">
{# <img src="{{ asset('img/icons/salle_bain.svg') }}" alt="Icone salle de bain"> #}
<span>{{ area.number }} {{ propertyArea(area.type) }}</span>
</div>
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endfor %}
{% for area in property.areas %}
{% if area.type == 4 %}
<div class="item-single">
{# <img src="{{ asset('img/icons/garage.svg') }}" alt="Icone garage"> #}
<span>{{ area.number }} {{ propertyArea(area.type) }}</span>
</div>
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endfor %}
{% for area in property.areas %}
{% if area.type == 74 or area.type == 75 %}
<div class="item-single">
{# <img src="{{ asset('img/icons/parking.svg') }}" alt="Icone parking"> #}
<span>{{ area.number }} {{ propertyArea(area.type) }}</span>
</div>
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endfor %}
{% for area in property.areas %}
{% if area.type == 18 %}
<div class="item-single">
{# <img src="{{ asset('img/icons/terasse.svg') }}" alt="Icone terasse"> #}
<span>{{ area.number }} {{ propertyArea(area.type) }}</span>
</div>
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endfor %}
{% if property.construction.construction_year %}
<div class="item-single">
{# <img src="{{ asset('img/icons/construction.svg') }}" alt="Icone date construction"> #}
<span>Construction : {{ property.construction.construction_year }}</span>
</div>
{% if property.available_at %}
<div style="width:4px;height:25px;background:#5f5f5f"></div>
{% endif %}
{% endif %}
{% if property.available_at %}
<div class="item-single availability">
{# <img src="{{ asset('img/icons/dispo.svg') }}" alt="Icone disponibilité"> #}
<span>Disponibilité {{ property.available_at == null ? '-' : property.available_at}}</span>
</div>
{% endif %}
</div>
</section>
<section class="desc-property mt-5">
<div class="col-lg-8 mx-auto" style="overflow: hidden">
<div class="row reverse-mobil">
<div class="col-md-4">
<div class="col-lg-12 mt-4" style="display: flex;flex-direction: column;margin:0 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" style="font-size: 2.3em;font-weight: bold">Descriptif</h1>
<p class="city">{{ property.city.name }}</p>
<p class="project-name">{{ property.reference }}</p>
{% if property.regulations and property.regulations is not empty %}
<p class="project-name">DPE : <strong>{% for regulation in property.regulations %}{{ regulation.value }}{% endfor %}</strong>
{% endif %}
</p>
<p class="price" style="color:#F6A400">
{{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~ property.price.currency|replace({"EUR": " €"}) }}
</p>
{#<div class="col-md-10 row list-pictures">
{% for picture in property.pictures %}
<div class="modal fade bd-example-modal-lg-{{ picture.id }}" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<img src="{{ picture.url }}">
</div>
</div>
</div>
<div class="col-6 col-md-4 lightbox-on-second" data-toggle="modal" data-target=".bd-example-modal-lg-{{ picture.id }}" style="margin-bottom:10px;">
<img class="img"
src="{{ picture.url }}"
data-id="modul-ref-{{ loop.index }}">
</div>
{% endfor %}
</div>#}
{% if property.user is defined and property.user is not empty %}
<div class="contact-property col-md-10 mt-4 p-3">
<p>Pour plus d’informations sur ce bien, vous pouvez prendre contact avec</p>
{% if property.user.firstname is defined and property.user.lastname is defined %}
<h3>{{ property.user.firstname }} {{ property.user.lastname }}</h3>
{% endif %}
</div>
<div class="contacinfos col-md-10 p-3 d-flex justify-content-between">
{% if property.user.email is defined %}
<a href="mailto:{{ property.user.email }}" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" width="21.418" height="14.503" viewBox="0 0 21.418 14.503">
<path id="np_mail_91_000000" d="M0,17V30.5H20.418V17Zm18.932.818L10.209,25.26,1.487,17.818Zm-18.115.5,6.134,5.232L.817,29.34Zm.825,11.363,5.935-5.6,2.632,2.245,2.632-2.245,5.935,5.6ZM19.6,29.34l-6.134-5.785L19.6,18.322Z" transform="translate(0.5 -16.5)" fill="#fff" stroke="#fff" stroke-width="1"/>
</svg>
</a>
{% endif %}
{% if property.user.mobile is defined %}
<a href="tel:{{ property.user.mobile }}" style="text-decoration:none;color:#fff;">
<svg id="np_phone-call_3960627_000000" xmlns="http://www.w3.org/2000/svg" width="22.518" height="20.105" viewBox="0 0 22.518 20.105">
<path id="Tracé_116" data-name="Tracé 116" d="M25.549,35.73h.8V34.122h2.413V32.513H26.354V29.522L20.6,27.608l-2.155,1.44a14.328,14.328,0,0,1-5.428-5.38L14.4,22.292l-1.914-6.667H6.249v.8a19.22,19.22,0,0,0,19.3,19.3Zm-14.274-18.5,1.311,4.592L11.074,23.37l.273.523a15.953,15.953,0,0,0,6.82,6.8l.426.217,2.292-1.536,3.86,1.3v3.442A17.734,17.734,0,0,1,7.857,17.234Z" transform="translate(-6.248 -15.626)" fill="#fff"/>
</svg>
{{ property.user.mobile }}
</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
<div class="col-md-8 description-prop-container">
<div class="description-prop pt-3">
<p>{{ property.comments[0].comment|raw|nl2br }}</p>
</div>
</div>
</div>
</div>
</section>
{#
<section class="project" style="margin-bottom: 120px">
<div class="col-lg-8 mx-auto div-svg-header" style="display: flex; align-items: center; margin-top: 20px">
</div>
<div class="col-lg-8 mx-auto div-svg-header" style="display: flex; align-items: center; padding-left: 7px">
<button data-id="descriptif-div" class="btn btn-primary all border-radius projectButton"><span class="span-all">DESCRIPTIF</span></button>
<button data-id="practical-infos-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">INFOS PRATIQUES</span></button>
<button data-id="interior-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">INTERIEUR</span></button>
<button data-id="exterior-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">EXTERIEUR</span></button>
<button data-id="energy-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">ENERGIE</span></button>
</div>
<div id="descriptif-div" class="offset-lg-2 col-lg-4 property-comment display-flex">
<p>{{ property.comments[0].comment|raw|nl2br }}</p>
</div>
<div id="practical-infos-div" class="offset-lg-2 col-lg-8 display-none" style="flex-wrap: wrap;">
<table class="table">
<tbody>
<tr class="table-property-first" style="background-color: #f7e7cb;">
{% if property.services is not null %}
{% for service in property.services %}
<td class="text-property-infos">{{ propertyServices(service) }}</td>
{% endfor %}
{% endif %}
</tr>
</tbody>
</table>
</div>
<div id="interior-div" class="offset-lg-2 col-lg-8 display-none">
<table class="table">
<tbody>
<tr class="table-property-first" style="background-color: #f7e7cb;">
<td class="text-property">Surface</td>
<td class="text-property-infos">{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}</td>
<td class="text-property">Eau</td>
<td class="text-property-infos">{{ propertyHotWater(property.water.hot_device) == null ? '-' : propertyHotWater(property.water.hot_device) ~ " " ~ propertyHotWaterAccess(property.water.hot_access) }}</td>
<td class="text-property">An Construction</td>
<td class="text-property-infos">{{ property.construction.construction_year == null ? '-' : property.construction.construction_year }}</td>
</tr>
{% if property.areas is empty %}
<tr>
<td class="text-property">Condition</td>
<td class="text-property-infos">{{ property.condition == null ? '-' : propertyCondition(property.condition) }}</td>
</tr>
<tr class="table-property-first" style="background-color: #f7e7cb;">
<td class="text-property">Etage</td>
<td class="text-property-infos">{{ property.floor.type == null ? '-' : propertyFloor(property.floor.type) }}</td>
<td class="text-property">Chauffage</td>
<td class="text-property-infos">{{ propertyHeatingDevice(property.heating.device) == null ? '-' : propertyHeatingDevice(property.heating.device) ~ " " ~ propertyHeatingType(property.heating.type) }}</td>
<td class="text-property">Disponibilite</td>
<td class="text-property-infos">{{ property.available_at == null ? '-' : property.available_at}}</td>
</tr>
{% else %}
<tr>
{% for area in property.areas %}
{% if propertyArea(area.type) is not null %}
<td class="text-property-first">{{ propertyArea(area.type) }}</td>
<td class="text-property-infos">{{ area.number }}</td>
{% endif %}
{% endfor %}
</tr>
<tr class="table-property-first" style="background-color: #f7e7cb;">
<td class="text-property">Etage</td>
<td class="text-property-infos">{{ property.floor.type == null ? '-' : propertyFloor(property.floor.type) }}</td>
<td class="text-property">Chauffage</td>
<td class="text-property-infos">{{ propertyHeatingDevice(property.heating.device) == null ? '-' : propertyHeatingDevice(property.heating.device) ~ " " ~ propertyHeatingType(property.heating.type) }}</td>
<td class="text-property">Disponibilite</td>
<td class="text-property-infos">{{ property.available_at == null ? '-' : property.available_at}}</td>
</tr>
<tr>
<td class="text-property">Condition</td>
<td class="text-property-infos">{{ property.condition == null ? '-' : propertyCondition(property.condition) }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div id="exterior-div" class="offset-lg-2 col-lg-8 display-none">
<table class="table">
<tbody>
{% if property.areas is not empty %}
<tr class="table-property-first" style="background-color: #f7e7cb;">
{% for area in property.areas %}
{% if propertyExterior(area.type) is not null %}
<td class="text-property-first">{{ propertyExterior(area.type) }}</td>
<td class="text-property-infos">{{ area.number }}</td>
{% endif %}
{% endfor %}
</tr>
{% endif %}
</tbody>
</table>
</div>
<div id="energy-div" class="offset-lg-2 col-lg-8 display-none">
<table class="table">
<tbody>
{% if property.regulations is not empty %}
<tr class="table-property-first" style="background-color: #f7e7cb;">
{% for energy in property.regulations %}
<td class="text-property-first">{{ propertyEnergy(energy.type) }}</td>
<td class="text-property-infos">{{ energy.value }}</td>
{% endfor %}
</tr>
{% endif %}
</tbody>
</table>
</div>
</section>
#}
<section class="similar-properties">
{% set sectionContent1 = content('Bien-detail', 'Section-1') %}
<div class="col-lg-8 mx-auto div-svg-header pre-section">
<div class="col-lg-5" 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" style="font-weight: bold">{% if sectionContent1.name is defined %}{{ sectionContent1.name }}{% else %}NOS BIENS SIMILAIRES{% endif %}</h1>
</div>
<div class="separator"></div>
<div class="col-lg-6 pre-section-content">
{% if sectionContent1.content is defined %}{{ sectionContent1.content|raw }}{% endif %}
</div>
</div>
<div class="col-lg-8 mx-auto">
<div id="propertiesOther" class="col-lg-12" style="display: flex; flex-wrap: wrap; flex-direction: row">
{% for property in otherProperties %}
<div class="other col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
{#
<div class="div-hover-2" id="div-hover-2" aria-haspopup="true" style="position: absolute; bottom: 8px; left: 9px; background-color: #242424; color: white; width: 291px; height: 70px">
{% if property.comments[0].comment is not empty %}
<p class="project-content">
{{ property.comments[0].comment|slice(0, 350) }}</p>
<a href="{{ path('property-detail', {'id': property.id}) }}" class="project-arrow-2">
<span class="galerry-ref"></span><i class="fas fa-arrow-right project-svg-arrow-2"></i>
</a>
{% else %}
<a style="margin-top: 180px" href="{{ path('property-detail', {'id': property.id}) }}" class="project-arrow-2">
<span class="galerry-ref"></span><i class="fas fa-arrow-right project-svg-arrow-2"></i>
</a>
{% endif %}
</div>
<div class="col-lg-3 properties-price-absolute" style="background-color: #c48300; height: 56px;">
<p style="font-size: 20px;" class="properties-price">
{{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value ~ property.price.currency|replace({"EUR": " €"}) }}
</p>
</div>
#}
{# <div class="tag-ref-projet-2"><span class="text-tag-ref">{{ specialPropertyCategory(property.category) }}</span></div> #}
{% 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 }}">#}
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
<div class="img" style="background: url('{{ url }}')no-repeat center;background-size:cover;" onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
</div>
{% endfor %}
</div>
{% else %}
<div class="position-relative properties-slide slick-slide-single-{{ loop.index }}">
<div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
</div>
{% endif %}
<a href="{{ path('property-detail', {'id': property.id}) }}">
<div class="row col-md-12 justify-content-between infos-list">
<ul class="col-md-4 items">
{% if property.area.value %}
<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>
{% endif %}
</ul>
<div class="col-md-8 properties-price d-flex justify-content-end">
{{ property.price.value == null ? '<span style="font-size: 21px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~ property.price.currency|replace({"EUR": " €"}) }}
</div>
</div>
<p class="city" {% if not property.area.value %}style="margin-top:-30px;"{% endif %}>{{ property.city.name }}</p>
<p class="project-name">{{ property.reference }}</p>
</a>
</div>
{% endfor %}
</div>
{% set paramUrl = property.category %}
{% if paramUrl == 1 %}
{% set paramUrl = 'vente' %}
{% elseif paramUrl == 2 %}
{% set paramUrl = 'location' %}
{% endif %}
<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 style="padding-bottom:40px;">
<a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': paramUrl}) }}">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 src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
<script>
const slideNextHeader = document.getElementById('slideNextHeader');
const slidePreviousHeader = document.getElementById('slidePreviousHeader');
const currentFigure = document.getElementsByClassName('current-figure')
const lastFigure = document.getElementsByClassName('last-figure')
let slideHeader = document.getElementById('sliderHeader');
let positionHeader = 0;
let positionThumbHeader = 1;
arraySlidesHeader = [
{% for key, picture in property.pictures %}
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
{
'position': {{ key }},
'img': '{{ url }}',
'dot': 'dot{{ key }}'
},
{% endfor %}
];
{#
slidePreviousHeader.addEventListener('click', () => {
if (arraySlidesHeader.length < (positionThumbHeader + 1)) {
positionHeader = 0;
positionThumbHeader = 1;
} else {
positionHeader++;
positionThumbHeader++;
}
slideHeader.style.background = `url(${arraySlidesHeader[positionHeader].img})no-repeat center`;
currentFigure[0].innerHTML = '0'+positionThumbHeader
slideHeader.style.backgroundSize = `cover`;
});
slideNextHeader.addEventListener('click', () => {
if (positionThumbHeader === 1) {
positionHeader = (arraySlidesHeader.length - 1);
positionThumbHeader = arraySlidesHeader.length;
} else {
positionHeader = positionHeader - 1;
positionThumbHeader = positionThumbHeader - 1;
}
slideHeader.style.background = `url(${arraySlidesHeader[positionHeader].img})no-repeat center`;
currentFigure[0].innerHTML = '0'+positionThumbHeader
slideHeader.style.backgroundSize = `cover`;
});
#}
const descriptif = document.getElementById('descriptif-div')
const praticalInfos = document.getElementById('practical-infos-div')
const interior = document.getElementById('interior-div')
const exterior = document.getElementById('exterior-div')
const energy = document.getElementById('energy-div')
let buttons = document.getElementsByClassName('projectButton')
for (const eElement of buttons) {
eElement.addEventListener('click', function (e) {
e.preventDefault()
for (let button of buttons) {
if (button.classList.contains('all')){
button.classList.remove('all')
button.classList.add('come')
button.querySelector('span').classList.replace('span-all', 'span-projects')
}
if (document.getElementById(button.dataset.id)) {
document.getElementById(button.dataset.id).classList.remove('display-flex')
document.getElementById(button.dataset.id).classList.add('display-none')
}
}
eElement.classList.remove('come')
eElement.classList.add('all')
eElement.querySelector('span').classList.replace('span-projects', 'span-all')
document.getElementById(eElement.dataset.id).classList.add('display-flex');
})
}
</script>
<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 = '{{ otherProperties|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++;
}
</script>
{% endblock %}