templates/property-detail.html.twig line 343

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