templates/property-detail.html.twig line 438

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Détails - {{ property.reference }}{% endblock %}
  3. {% block metaDescription %}
  4.     <meta name="description" content="
  5.     {% if property.reference is defined %}
  6.         {{ property.reference }}
  7.     {% else %}
  8.          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.
  9.     {% endif %}
  10.     ">
  11. {% endblock %}
  12. {% block body %}
  13.     <style>
  14.         .d-block {
  15.             background-size:cover;
  16.         }
  17.     </style>
  18.     <header  class="header-habiter slider-home slider-not-home who-is bottom-right-border position-relative to-right overflow-hidden">
  19.         <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
  20.             <div class="carousel-inner">
  21.                 {% for picture in property.pictures %}
  22.                     <div class="carousel-item {% if loop.first %}active{% endif %}">
  23.                         <div class="d-block w-100" style="background: url({{ picture.url }})no-repeat center;"></div>
  24.                     </div>
  25.                 {% endfor %}
  26.             </div>
  27.             <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
  28.                 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  29.                 <span class="sr-only">Previous</span>
  30.             </a>
  31.             <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
  32.                 <span class="carousel-control-next-icon" aria-hidden="true"></span>
  33.                 <span class="sr-only">Next</span>
  34.             </a>
  35.         </div>
  36.     </header>
  37.     {#
  38.     <header class="header-habiter slider-home slider-not-home who-is bottom-right-border position-relative overflow-hidden to-right lightbox-on"
  39.     id="sliderHeader"
  40.     style="background: url({{property.pictures[0].url}}) center center no-repeat;background-size:cover; position: relative; height: 91vh; cursor: zoom-in;"
  41.     data-id="modul-ref">
  42.         <div class="container-fluid" style="padding: 0">
  43.             <div class="col-lg-4 mx-auto" style="display: none;">
  44.                 <div class="arrows-slides" style="display: flex; justify-content: space-between; margin-top: 20px; align-items: center; position: absolute">
  45.                     <div class="arrow-right" id="slideNextHeader"><a><i class="fas fa-arrow-left"></i></a></div>
  46.                     <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>
  47.                     <div class="arrow-left" id="slidePreviousHeader"><a><i class="fas fa-arrow-right"></i></a></div>
  48.                 </div>
  49.             </div>
  50.             {#
  51.             <div class="col-lg-12 property-detail-header" style="display: flex; position: absolute; bottom: 0px;">
  52.                <div class="col-lg-2 container-properties-header first"></div>
  53.                <div class="col-lg-5 container-properties-header" style="display: flex; align-items: center">
  54.                    <div class="col-lg-3">
  55.                        <p class="properties-city" >{{ property.city.name }}</p>
  56.                    </div>
  57.                    <div class="col-lg-3">
  58.                        <p class="properties-area" style="text-align: center">{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }} </p>
  59.                    </div>
  60.                    <div class="col-lg-3">
  61.                        <p class="properties-reference-detail">{{ property.reference }}</p>
  62.                    </div>
  63.                </div>
  64.                <div class="col-lg-1 price-detail-bien" style="background-color: #c48300; display: flex; align-items: center; justify-content: center">
  65.                    <p class="properties-price">
  66.                        {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value ~  property.price.currency|number_format(2, '.', ',')|replace({"EUR": " €"})  }}
  67.                    </p>
  68.                </div>
  69.            </div>
  70.     </div>
  71.     <div class="sticky-text">Cliquer ici<br/>pour voir toutes les photos</div>
  72.     {% if property.pictures is not empty %}
  73.         <div class="lightbox" id="modul-ref">
  74.             <div class="closer"></div>
  75.             <div class="arrows left">&#8592;</div>
  76.             <div class="arrows right">&#8594;</div>
  77.             <div class="counter">1/1</div>
  78.             <ul class="items">
  79.                 {% for picture in property.pictures %}
  80.                     <li class="item">
  81.                         <img class="img" src="{{ picture.url }}">
  82.                     </li>
  83.                 {% endfor %}
  84.             </ul>
  85.         </div>
  86.     {% endif %}
  87.     {% if property.pictures is not empty %}
  88.         {% for picture in property.pictures %}
  89.             <div class="lightbox" id="modul-ref-{{ loop.index }}">
  90.                 <div class="closer"></div>
  91.                 <ul class="items">
  92.                     <li class="item">
  93.                         <img class="img" src="{{ picture.url }}">
  94.                     </li>
  95.                 </ul>
  96.             </div>
  97.         {% endfor %}
  98.     {% endif %}
  99.     </header>
  100.     #}
  101.     {#
  102.     <div class="col-lg-1 infos-person" style="display: flex; position: fixed; right: 274px;">
  103.         <div class="col-lg-12">
  104.             {% if property.user.picture is null %}
  105.                 <img id="img-card" src="{{ asset('build/367e841db1c2c356ba01f78a108a59cb0c18ade2.png') }}">
  106.             {% else %}
  107.                 <img id="img-card" width="161px" height="161px" src="{{ property.user.picture }}">
  108.             {% endif %}
  109.         </div>
  110.     </div>
  111.     #}
  112.     {#
  113.     <div class="col-lg-1 infos-person" style="position: fixed; width: 265px; display: flex; flex-direction: column">
  114.        <div class="col-lg-12 more-informations">
  115.            <p class="p-info-property">Pour plus d’informations concernant ce bien</p>
  116.            <p class="p-first-property">{{ property.user.firstname }}
  117.                {{ property.user.lastname }}
  118.        </div>
  119.        <div style="display: flex">
  120.            <div class="col-lg-2 p-mail-property">
  121.                <a href="mailto:{{ property.user.email }}">
  122.                    <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>
  123.                </a>
  124.            </div>
  125.            <div class="col-lg-10 p-phone-property">
  126.                <a href="tel:{{ property.user.phone }}">
  127.                    <?xml version="1.0" encoding="UTF-8"?>
  128.                    <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>
  129.                    {{ property.user.phone }}
  130.                </a>
  131.            </div>
  132.        </div>
  133.    </div>
  134.     #}
  135.     <section class="items-property-single mt-5 mb-5 pb-5">
  136.         <div class="row col-lg-10 mx-auto justify-content-center">
  137.             {% if property.type and getTypeProperty(property.type) %}
  138.                 <div class="item-single">
  139.                     {# <img src="{{ asset('img/icons/surface.svg') }}" alt="Icone surface"> #}
  140.                     <span style="font-weight: bold;color:#F6A400;">{{ getTypeProperty(property.type) }}</span>
  141.                 </div>
  142.                 {% if property.construction.construction_year or property.available_at or property.bedrooms or property.area.value %}
  143.                     <div style="width:40px;">
  144.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  145.                     </div>
  146.                 {% endif %}
  147.             {% endif %}
  148.             {% if property.area.value %}
  149.                 <div class="item-single">
  150.                     {# <img src="{{ asset('img/icons/surface.svg') }}" alt="Icone surface"> #}
  151.                     <span>{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}</span>
  152.                 </div>
  153.                 {% if property.construction.construction_year or property.available_at or property.bedrooms %}
  154.                     <div style="width:40px;">
  155.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  156.                     </div>
  157.                 {% endif %}
  158.             {% endif %}
  159.             {% if property.bedrooms %}
  160.                 <div class="item-single">
  161.                     {# <img src="{{ asset('img/icons/chambre.svg') }}" alt="Icone chambre"> #}
  162.                     <span>{{ property.bedrooms }} chambre{% if property.bedrooms > 1 %}s{% endif %}</span>
  163.                 </div>
  164.                 {% if property.construction.construction_year or property.available_at %}
  165.                     <div style="width:40px;">
  166.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  167.                     </div>
  168.                 {% endif %}
  169.             {% endif %}
  170.             {% for area in property.areas %}
  171.                 {% if area.type == 13 %}
  172.                     <div class="item-single">
  173.                         {# <img src="{{ asset('img/icons/salle_bain.svg') }}" alt="Icone salle de bain"> #}
  174.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  175.                     </div>
  176.                     <div style="width:40px;">
  177.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  178.                     </div>
  179.                 {% endif %}
  180.             {% endfor %}
  181.             {% for area in property.areas %}
  182.                 {% if area.type == 4 %}
  183.                     <div class="item-single">
  184.                         {# <img src="{{ asset('img/icons/garage.svg') }}" alt="Icone garage"> #}
  185.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  186.                     </div>
  187.                     <div style="width:40px;">
  188.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  189.                     </div>
  190.                 {% endif %}
  191.             {% endfor %}
  192.             {% for area in property.areas %}
  193.                 {% if area.type == 74 or area.type == 75 %}
  194.                     <div class="item-single">
  195.                         {# <img src="{{ asset('img/icons/parking.svg') }}" alt="Icone parking"> #}
  196.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  197.                     </div>
  198.                     <div style="width:40px;">
  199.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  200.                     </div>
  201.                 {% endif %}
  202.             {% endfor %}
  203.             {% for area in property.areas %}
  204.                 {% if area.type == 18 %}
  205.                     <div class="item-single">
  206.                         {# <img src="{{ asset('img/icons/terasse.svg') }}" alt="Icone terasse"> #}
  207.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  208.                     </div>
  209.                     <div style="width:40px;">
  210.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  211.                     </div>
  212.                 {% endif %}
  213.             {% endfor %}
  214.             {% if property.construction.construction_year %}
  215.                 <div class="item-single">
  216.                     {# <img src="{{ asset('img/icons/construction.svg') }}" alt="Icone date construction"> #}
  217.                     <span>Construction : {{ property.construction.construction_year }}</span>
  218.                 </div>
  219.                 {% if property.available_at %}
  220.                     <div style="width:40px;">
  221.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  222.                     </div>
  223.                 {% endif %}
  224.             {% endif %}
  225.             {% if property.available_at %}
  226.                 <div class="item-single availability">
  227.                     {# <img src="{{ asset('img/icons/dispo.svg') }}" alt="Icone disponibilité"> #}
  228.                     <span>Disponibilité {{ property.available_at == null ? '-' : property.available_at}}</span>
  229.                 </div>
  230.             {% endif %}
  231.         </div>
  232.     </section>
  233.     <section class="desc-property mt-5">
  234.         <div class="col-lg-8 mx-auto" style="overflow: hidden">
  235.             <div class="row reverse-mobil">
  236.                 <div class="col-md-4">
  237.                     <div class="col-lg-12 mt-4" style="display: flex;flex-direction: column;margin:0 10px;">
  238.                         <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  239.                             <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"/>
  240.                         </svg>
  241.                         <h1 class="project-title" style="font-size: 2.3em;font-weight: bold">Descriptif</h1>
  242.                         <p class="city">{{ property.city.name }}</p>
  243.                         <p class="project-name">{{ property.reference }}</p>
  244.                         {% if property.regulations and property.regulations is not empty %}
  245.                             <p class="project-name">DPE : <strong>{% for regulation in property.regulations %}{{ regulation.value }}{% endfor %}</strong>
  246.                         {% endif %}
  247.                         </p>
  248.                         <p class="price" style="color:#F6A400">
  249.                             {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({"EUR": " €"})  }}
  250.                         </p>
  251.                         <div class="col-md-10 row list-pictures">
  252.                             {% for picture in property.pictures %}
  253.                                 <div class="modal fade bd-example-modal-lg-{{ picture.id }}" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  254.                                     <div class="modal-dialog modal-lg">
  255.                                         <div class="modal-content">
  256.                                             <img src="{{ picture.url }}">
  257.                                         </div>
  258.                                     </div>
  259.                                 </div>
  260.                                 <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;">
  261.                                     <img class="img"
  262.                                          src="{{ picture.url }}"
  263.                                          data-id="modul-ref-{{ loop.index }}">
  264.                                 </div>
  265.                             {% endfor %}
  266.                         </div>
  267.                         {% if property.user is defined and property.user is not empty %}
  268.                             <div class="contact-property col-md-10 mt-4 p-3">
  269.                                 <p>Pour plus d’informations sur ce bien, vous pouvez prendre contact avec</p>
  270.                                 {% if property.user.firstname is defined and property.user.lastname is defined %}
  271.                                     <h3>{{ property.user.firstname }} {{ property.user.lastname }}</h3>
  272.                                 {% endif %}
  273.                             </div>
  274.                             <div class="contacinfos col-md-10 p-3 d-flex justify-content-between">
  275.                                 {% if property.user.email is defined %}
  276.                                 <a href="mailto:{{ property.user.email }}" target="_blank">
  277.                                     <svg xmlns="http://www.w3.org/2000/svg" width="21.418" height="14.503" viewBox="0 0 21.418 14.503">
  278.                                         <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"/>
  279.                                     </svg>
  280.                                 </a>
  281.                                 {% endif %}
  282.                                 {% if property.user.mobile is defined %}
  283.                                 <a href="tel:{{ property.user.mobile }}" style="text-decoration:none;color:#fff;">
  284.                                     <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">
  285.                                         <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"/>
  286.                                     </svg>
  287.                                     {{ property.user.mobile }}
  288.                                 </a>
  289.                                 {% endif %}
  290.                             </div>
  291.                         {% endif %}
  292.                     </div>
  293.                 </div>
  294.                 <div class="col-md-8 description-prop-container">
  295.                     <div class="description-prop pt-3">
  296.                         <p>{{ property.comments[0].comment|raw|nl2br }}</p>
  297.                     </div>
  298.                 </div>
  299.             </div>
  300.         </div>
  301.     </section>
  302.     {#
  303.     <section class="project" style="margin-bottom: 120px">
  304.         <div class="col-lg-8 mx-auto div-svg-header" style="display: flex; align-items: center; margin-top: 20px">
  305.         </div>
  306.         <div class="col-lg-8 mx-auto div-svg-header" style="display: flex; align-items: center; padding-left: 7px">
  307.             <button data-id="descriptif-div" class="btn btn-primary all border-radius projectButton"><span class="span-all">DESCRIPTIF</span></button>
  308.             <button data-id="practical-infos-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">INFOS PRATIQUES</span></button>
  309.             <button data-id="interior-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">INTERIEUR</span></button>
  310.             <button data-id="exterior-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">EXTERIEUR</span></button>
  311.             <button data-id="energy-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">ENERGIE</span></button>
  312.         </div>
  313.         <div id="descriptif-div" class="offset-lg-2 col-lg-4 property-comment display-flex">
  314.             <p>{{ property.comments[0].comment|raw|nl2br }}</p>
  315.         </div>
  316.         <div id="practical-infos-div" class="offset-lg-2 col-lg-8 display-none" style="flex-wrap: wrap;">
  317.             <table class="table">
  318.                 <tbody>
  319.                 <tr class="table-property-first" style="background-color: #f7e7cb;">
  320.                     {% if property.services is not null %}
  321.                     {% for service in property.services %}
  322.                     <td class="text-property-infos">{{ propertyServices(service) }}</td>
  323.                     {% endfor %}
  324.                     {% endif %}
  325.                 </tr>
  326.                 </tbody>
  327.             </table>
  328.         </div>
  329.         <div id="interior-div" class="offset-lg-2 col-lg-8 display-none">
  330.             <table class="table">
  331.                 <tbody>
  332.                 <tr class="table-property-first" style="background-color: #f7e7cb;">
  333.                     <td class="text-property">Surface</td>
  334.                     <td class="text-property-infos">{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}</td>
  335.                     <td class="text-property">Eau</td>
  336.                     <td class="text-property-infos">{{ propertyHotWater(property.water.hot_device) == null ? '-' : propertyHotWater(property.water.hot_device) ~ " " ~ propertyHotWaterAccess(property.water.hot_access)  }}</td>
  337.                     <td class="text-property">An Construction</td>
  338.                     <td class="text-property-infos">{{ property.construction.construction_year == null ? '-' :  property.construction.construction_year }}</td>
  339.                 </tr>
  340.                {% if property.areas is empty %}
  341.                    <tr>
  342.                        <td class="text-property">Condition</td>
  343.                        <td class="text-property-infos">{{ property.condition == null ? '-' : propertyCondition(property.condition) }}</td>
  344.                    </tr>
  345.                    <tr class="table-property-first" style="background-color: #f7e7cb;">
  346.                        <td class="text-property">Etage</td>
  347.                        <td class="text-property-infos">{{ property.floor.type == null ? '-' : propertyFloor(property.floor.type) }}</td>
  348.                        <td class="text-property">Chauffage</td>
  349.                        <td class="text-property-infos">{{ propertyHeatingDevice(property.heating.device) == null ? '-' : propertyHeatingDevice(property.heating.device) ~ " " ~ propertyHeatingType(property.heating.type)  }}</td>
  350.                        <td class="text-property">Disponibilite</td>
  351.                        <td class="text-property-infos">{{ property.available_at == null ? '-' : property.available_at}}</td>
  352.                    </tr>
  353.                    {% else %}
  354.                        <tr>
  355.                            {% for area in property.areas %}
  356.                                {% if propertyArea(area.type) is not null %}
  357.                                    <td class="text-property-first">{{ propertyArea(area.type) }}</td>
  358.                                    <td class="text-property-infos">{{ area.number }}</td>
  359.                                {% endif %}
  360.                            {% endfor %}
  361.                        </tr>
  362.                        <tr class="table-property-first" style="background-color: #f7e7cb;">
  363.                            <td class="text-property">Etage</td>
  364.                            <td class="text-property-infos">{{ property.floor.type == null ? '-' : propertyFloor(property.floor.type) }}</td>
  365.                            <td class="text-property">Chauffage</td>
  366.                            <td class="text-property-infos">{{ propertyHeatingDevice(property.heating.device) == null ? '-' : propertyHeatingDevice(property.heating.device) ~ " " ~ propertyHeatingType(property.heating.type)  }}</td>
  367.                            <td class="text-property">Disponibilite</td>
  368.                            <td class="text-property-infos">{{ property.available_at == null ? '-' : property.available_at}}</td>
  369.                        </tr>
  370.                        <tr>
  371.                            <td class="text-property">Condition</td>
  372.                            <td class="text-property-infos">{{ property.condition == null ? '-' : propertyCondition(property.condition) }}</td>
  373.                        </tr>
  374.                 {% endif %}
  375.                 </tbody>
  376.             </table>
  377.         </div>
  378.         <div id="exterior-div" class="offset-lg-2 col-lg-8 display-none">
  379.             <table class="table">
  380.                 <tbody>
  381.                 {% if property.areas is not empty %}
  382.                     <tr class="table-property-first" style="background-color: #f7e7cb;">
  383.                         {% for area in property.areas %}
  384.                             {% if propertyExterior(area.type) is not null %}
  385.                             <td class="text-property-first">{{ propertyExterior(area.type) }}</td>
  386.                             <td class="text-property-infos">{{ area.number }}</td>
  387.                             {% endif %}
  388.                         {% endfor %}
  389.                     </tr>
  390.                 {% endif %}
  391.                 </tbody>
  392.             </table>
  393.         </div>
  394.         <div id="energy-div" class="offset-lg-2 col-lg-8 display-none">
  395.             <table class="table">
  396.                 <tbody>
  397.             {% if property.regulations is not empty %}
  398.                 <tr class="table-property-first" style="background-color: #f7e7cb;">
  399.                     {% for energy in property.regulations %}
  400.                         <td class="text-property-first">{{ propertyEnergy(energy.type) }}</td>
  401.                         <td class="text-property-infos">{{ energy.value }}</td>
  402.                     {% endfor %}
  403.                 </tr>
  404.             {% endif %}
  405.                 </tbody>
  406.             </table>
  407.         </div>
  408.     </section>
  409.     #}
  410.     <section class="similar-properties">
  411.         {% set sectionContent1 = content('Bien-detail', 'Section-1') %}
  412.         <div class="col-lg-8 mx-auto div-svg-header pre-section">
  413.             <div class="col-lg-5" style="font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;">
  414.                 <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  415.                     <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"/>
  416.                 </svg>
  417.                 <h1 class="project-title" style="font-weight: bold">{% if sectionContent1.name is defined %}{{ sectionContent1.name }}{% else %}NOS BIENS SIMILAIRES{% endif %}</h1>
  418.             </div>
  419.             <div class="separator"></div>
  420.             <div class="col-lg-6 pre-section-content">
  421.                 {% if sectionContent1.content is defined %}{{ sectionContent1.content|raw }}{% endif %}
  422.             </div>
  423.         </div>
  424.         <div  class="col-lg-8 mx-auto">
  425.             <div id="propertiesOther" class="col-lg-12 mt-5" style="display: flex; flex-wrap: wrap; flex-direction: row">
  426.                 {% for property in otherProperties %}
  427.                     <div  class="col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
  428.                         {#
  429.                         <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">
  430.                                                         {% if property.comments[0].comment is not empty %}
  431.                                                             <p class="project-content">
  432.                                                                 {{ property.comments[0].comment|slice(0, 350) }}</p>
  433.                                                             <a href="{{ path('property-detail', {'id': property.id}) }}" class="project-arrow-2">
  434.                                                                 <span class="galerry-ref"></span><i class="fas fa-arrow-right project-svg-arrow-2"></i>
  435.                                                             </a>
  436.                                                         {% else %}
  437.                                                             <a style="margin-top: 180px" href="{{ path('property-detail', {'id': property.id}) }}" class="project-arrow-2">
  438.                                                                 <span class="galerry-ref"></span><i class="fas fa-arrow-right project-svg-arrow-2"></i>
  439.                                                             </a>
  440.                                                         {% endif %}
  441.                                                     </div>
  442.                                                     <div class="col-lg-3 properties-price-absolute" style="background-color: #c48300; height: 56px;">
  443.                                                         <p style="font-size: 20px;" class="properties-price">
  444.                                                             {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value ~  property.price.currency|replace({"EUR": " €"})  }}
  445.                                                         </p>
  446.                                                     </div>
  447.                         #}
  448.                         {# <div class="tag-ref-projet-2"><span class="text-tag-ref">{{ specialPropertyCategory(property.category) }}</span></div> #}
  449.                         {% if property.pictures is not empty %}
  450.                             <div class="position-relative properties-slide slick-slide-single-{{ loop.index }}">
  451.                                 {% for picture in property.pictures|slice(0,3) %}
  452.                                     {#                                    <img class="img-100" src="{{ picture.url }}">#}
  453.                                     <div class="img" style="background: url('{{ picture.url }}')no-repeat center;background-size:cover;"  onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
  454.                                     </div>
  455.                                 {% endfor %}
  456.                             </div>
  457.                         {% else %}
  458.                             <div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
  459.                         {% endif %}
  460.                         <div class="row col-md-12 justify-content-between infos-list">
  461.                             <ul class="col-md-4 items">
  462.                                 {% if property.area.value %}
  463.                                     <li class="item surface">
  464.                                         {# <img src="{{ asset('img/surface.svg') }}" class="surface-logo">  #}
  465.                                         {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
  466.                                     </li>
  467.                                 {% endif %}
  468.                             </ul>
  469.                             <div class="col-md-8 properties-price d-flex justify-content-end">
  470.                                 {{ property.price.value == null ? '<span style="font-size: 21px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({"EUR": " €"})  }}
  471.                             </div>
  472.                         </div>
  473.                         <p class="city" {% if not property.area.value %}style="margin-top:-30px;"{% endif %}>{{ property.city.name }}</p>
  474.                         <p class="project-name">{{ property.reference }}</p>
  475.                     </div>
  476.                 {% endfor %}
  477.             </div>
  478.             {% set paramUrl = property.category %}
  479.             {% if paramUrl == 1 %}
  480.                 {% set paramUrl = 'vente' %}
  481.             {% elseif paramUrl == 2 %}
  482.                 {% set paramUrl = 'location' %}
  483.             {% endif %}
  484.             <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;">
  485.                 <div style="padding-bottom:40px;">
  486.                     <a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': paramUrl}) }}">Découvrir plus
  487.                         <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 -->
  488.                     </a>
  489.                 </div>
  490.             </div>
  491.         </div>
  492.     </section>
  493.     <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>
  494.     <script>
  495.         const slideNextHeader = document.getElementById('slideNextHeader');
  496.         const slidePreviousHeader = document.getElementById('slidePreviousHeader');
  497.         const currentFigure = document.getElementsByClassName('current-figure')
  498.         const lastFigure = document.getElementsByClassName('last-figure')
  499.         let slideHeader = document.getElementById('sliderHeader');
  500.         let positionHeader = 0;
  501.         let positionThumbHeader = 1;
  502.         arraySlidesHeader = [
  503.             {% for key, picture in property.pictures %}
  504.             {
  505.                 'position': {{ key }},
  506.                 'img': '{{ picture.url }}',
  507.                 'dot': 'dot{{ key }}'
  508.             },
  509.             {% endfor %}
  510.         ];
  511.         {#
  512.         slidePreviousHeader.addEventListener('click', () => {
  513.                     if (arraySlidesHeader.length < (positionThumbHeader  + 1)) {
  514.                         positionHeader = 0;
  515.                         positionThumbHeader = 1;
  516.                     } else {
  517.                         positionHeader++;
  518.                         positionThumbHeader++;
  519.                     }
  520.                     slideHeader.style.background =  `url(${arraySlidesHeader[positionHeader].img})no-repeat center`;
  521.                     currentFigure[0].innerHTML = '0'+positionThumbHeader
  522.                     slideHeader.style.backgroundSize = `cover`;
  523.                 });
  524.                 slideNextHeader.addEventListener('click', () => {
  525.                     if (positionThumbHeader === 1) {
  526.                         positionHeader = (arraySlidesHeader.length - 1);
  527.                         positionThumbHeader = arraySlidesHeader.length;
  528.                     } else {
  529.                         positionHeader = positionHeader - 1;
  530.                         positionThumbHeader = positionThumbHeader - 1;
  531.                     }
  532.                     slideHeader.style.background =  `url(${arraySlidesHeader[positionHeader].img})no-repeat center`;
  533.                     currentFigure[0].innerHTML = '0'+positionThumbHeader
  534.                     slideHeader.style.backgroundSize = `cover`;
  535.                 });
  536.         #}
  537.         const descriptif = document.getElementById('descriptif-div')
  538.         const praticalInfos = document.getElementById('practical-infos-div')
  539.         const interior = document.getElementById('interior-div')
  540.         const exterior = document.getElementById('exterior-div')
  541.         const energy = document.getElementById('energy-div')
  542.         let buttons = document.getElementsByClassName('projectButton')
  543.         for (const eElement of buttons) {
  544.             eElement.addEventListener('click', function (e) {
  545.                 e.preventDefault()
  546.                 for (let button of buttons) {
  547.                     if (button.classList.contains('all')){
  548.                         button.classList.remove('all')
  549.                         button.classList.add('come')
  550.                         button.querySelector('span').classList.replace('span-all', 'span-projects')
  551.                     }
  552.                     if (document.getElementById(button.dataset.id)) {
  553.                         document.getElementById(button.dataset.id).classList.remove('display-flex')
  554.                         document.getElementById(button.dataset.id).classList.add('display-none')
  555.                     }
  556.                 }
  557.                 eElement.classList.remove('come')
  558.                 eElement.classList.add('all')
  559.                 eElement.querySelector('span').classList.replace('span-projects', 'span-all')
  560.                 document.getElementById(eElement.dataset.id).classList.add('display-flex');
  561.             })
  562.         }
  563.     </script>
  564.     <script>
  565.         const arrowPrev = `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
  566.                                 <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"/>
  567.                             </svg>`;
  568.         const arrowNext= `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
  569.                             <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"/>
  570.                         </svg>`;
  571.         var countProperties = '{{ otherProperties|length }}';
  572.         var loopProp = 1;
  573.         while (loopProp <= countProperties) {
  574.             $('.slick-slide-single-'+loopProp).slick({
  575.                 'slidesToShow': 1,
  576.                 'prevArrow': `<div class="arrow-left square-black d-flex justify-content-center align-items-center position-absolute">${arrowPrev}</div>`,
  577.                 'nextArrow': `<div class="arrow-right square-black d-flex justify-content-center align-items-center position-absolute">${arrowNext}</div>`
  578.             });
  579.             loopProp++;
  580.         }
  581.     </script>
  582. {% endblock %}