templates/vendre.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Vendre{% endblock %}
  3. {% block body %}
  4.     {% set headerContent = content('Contact', 'Header') %}
  5.     {% set sectionContent = content('Vendre', 'Vendre') %}
  6.     {% if headerContent.picture is defined and headerContent.picture is not empty %}
  7.         {% set backgroundImage = headerContent.picture[0].path %}
  8.     {% else %}
  9.         {% set backgroundImage = 'empty' %}
  10.     {% endif %}
  11.     <header class="header-habiter vendre col-lg-8 mx-auto" style="background: url({{ asset('img/vendre.jpg') }})no-repeat center center;background-size:cover;height:740px;">
  12.         <div class="container-fluid">
  13.             <div class="col-lg-8 mx-auto div-svg-header">
  14.                 <div class="header-habiter-div">
  15.                 </div>
  16.             </div>
  17.         </div>
  18.     </header>
  19.     <div class="container-fluid" style="margin-bottom: 80px">
  20.         {% set contactContent = content('Contact', 'Section-1') %}
  21.         <div class="col-lg-8 mx-auto div-svg-header pre-section">
  22.             <div class="col-lg-4" style="font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;">
  23.                 <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  24.                     <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"/>
  25.                 </svg>
  26.                 <h1 class="project-title contact">{{ sectionContent.name }}</h1>
  27.             </div>
  28.             <div class="separator"></div>
  29.             <div class="col-lg-6 pre-section-content">
  30.                 {{ sectionContent.content|raw }}
  31.             </div>
  32.         </div>
  33.         {{ form_start(form) }}
  34.         <div id="div-form-contact" class="form-group col-lg-8 mx-auto" style="display: flex;">
  35.             <div class="col-lg-4 div-form-contact-content" style="display: flex; flex-direction: column;">
  36.                 <div class="form-material floating contact">
  37.                     {{ form_widget(form.name, {'attr': { 'class':'form-control', 'placeholder': 'Nom*'}}) }}
  38.                     {{ form_errors(form.name) }}
  39.                 </div>
  40.                 <div class="form-material floating contact">
  41.                     {{ form_widget(form.firstname, {'attr': { 'class':'form-control', 'placeholder': 'Prénom*'}}) }}
  42.                     {{ form_errors(form.firstname) }}
  43.                 </div>
  44.                 <div class="form-material floating contact">
  45.                     {{ form_widget(form.mail, {'attr': { 'class':'form-control', 'placeholder': 'Mail*'}}) }}
  46.                     {{ form_errors(form.mail) }}
  47.                 </div>
  48.                 <div class="form-material floating contact">
  49.                     {{ form_widget(form.phone, {'attr': { 'class':'form-control', 'placeholder': 'Téléphone*'}}) }}
  50.                     {{ form_errors(form.phone) }}
  51.                 </div>
  52.                 <div class="form-material floating contact position-relative">
  53.                     {{ form_widget(form.file, {'attr': { 'class':'form-control file-select', 'placeholder': 'Joindre un fichier &nbsp (.doc, .pdf, .jpeg / max. 5mo) '}}) }}
  54.                     {{ form_errors(form.file) }}
  55.                     <div style="height:35px;width:35px;background: #707070;right:0;top:0;" class="position-absolute">
  56.                         <svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35">
  57.                             <g id="Groupe_4187" data-name="Groupe 4187" transform="translate(-695 -829)">
  58.                                 <rect id="Rectangle_139" data-name="Rectangle 139" width="35" height="35" transform="translate(695 829)" fill="#5f5f5f"/>
  59.                                 <path id="np_download_4247984_000000" d="M24.127,24.127V17.751H25.4V25.4H5V17.751H6.275v6.376Zm-17.852,0H24.127V17.751H25.4V25.4H5V17.751H6.275Zm9.563-5.162,4.784-5.047.955.888-6.437,6.77L8.826,14.937l.955-.888,4.784,4.916V5h1.275Zm-1.326,2.611.033.035v-.035Z" transform="translate(697.799 831.799)" fill="#fff"/>
  60.                             </g>
  61.                         </svg>
  62.                     </div>
  63.                 </div>
  64.             </div>
  65.             <div class="col-lg-6" style="display: flex; flex-direction: column">
  66.                 <div class="form-material floating contact selectdiv">
  67.                     {{ form_widget(form.object, {'attr': { 'class':'form-control'}}) }}
  68.                     {{ form_errors(form.object) }}
  69.                 </div>
  70.                 <div class="form-material floating contact">
  71.                     {{ form_widget(form.message, {'attr': { 'class':'form-control', 'placeholder': 'Votre message'}}) }}
  72.                     {{ form_errors(form.message) }}
  73.                 </div>
  74.             </div>
  75.             <div class="col-lg-1">
  76.                 <div class="submit-contact-button">
  77.                     <div>
  78.                         <button id="login_user" class="col-lg-12 offset-lg-4btn btn-primary" type="submit" style="background-color: #f6a400; border-color: #f6a400;">
  79.                             <?xml version="1.0" encoding="UTF-8"?>
  80.                             <svg id="SVGDoc" width="19" height="15" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:avocode="https://avocode.com/" viewBox="0 0 19 15"><defs></defs><desc>Generated with Avocode.</desc><g><g transform="rotate(90 9.5 7.5)"><title>np_arrow-up_888648_000000</title><path d="M16.10552,5.28141v0l-6.60555,-6.60459v0l-6.60554,6.60459v0l1.3808,1.3808v0l4.23854,-4.23949v0v13.90055v0h1.97232v0v-13.90055v0l4.23855,4.23949v0z" fill="#ffffff" fill-opacity="1"></path></g></g></svg>
  81.                         </button>
  82.                     </div>
  83.                 </div>
  84.             </div>
  85.             {{ form_end(form) }}
  86.         </div>
  87.     </div>
  88.     <section style="background:#F7F7F7" class="pt-5 pb-5">
  89.         <div class="col-lg-8 mx-auto">
  90.             <div class="col-lg-5 title-vendre-other">
  91.                 <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  92.                     <path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"></path>
  93.                 </svg>
  94.                 <h1 class="project-title">
  95.                     NOS biens disponibles<br> À la <span style="color:#F6A400">vente</span>
  96.                 </h1>
  97.             </div>
  98.             <div id="propertiesOther" class="vendre col-lg-12 mt-5" style="display: flex; flex-wrap: wrap; flex-direction: row">
  99.                 {% for property in salesProperties %}
  100.                     <div  class="other col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
  101.                         {% if property.pictures is not empty %}
  102.                             <div class="position-relative properties-slide slick-slide-single-{{ loop.index }}">
  103.                                 {% for picture in property.pictures|slice(0,3) %}
  104.                                     {#                                    <img class="img-100" src="{{ picture.url }}">#}
  105.                                     {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  106.                                     <div class="img" style="background-image: url('{{ url }}')"  onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
  107.                                     </div>
  108.                                 {% endfor %}
  109.                             </div>
  110.                         {% else %}
  111.                             <div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
  112.                         {% endif %}
  113.                         <a href="{{ path('property-detail', {'id': property.id}) }}">
  114.                         <div class="row col-md-12 justify-content-between infos-list">
  115.                             <ul class="col-md-4 items">
  116.                                 <li class="item surface">
  117.                                     <img src="{{ asset('img/surface.svg') }}" class="surface-logo"> {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
  118.                                 </li>
  119.                             </ul>
  120.                             <div class="col-md-8 properties-price d-flex justify-content-end">
  121.                                 {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({"EUR": " €"})  }}
  122.                             </div>
  123.                         </div>
  124.                         <p class="city">{{ property.city.name }}</p>
  125.                         <p class="project-name">{{ getTypeProperty(property.type) }}</p>
  126.                         </a>
  127.                     </div>
  128.                 {% endfor %}
  129.             </div>
  130.             <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;">
  131.                 <div>
  132.                     <a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': 'vente'}) }}">Découvrir plus
  133.                         <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 -->
  134.                     </a>
  135.                 </div>
  136.             </div>
  137.         </div>
  138.     </section>
  139.     <section style="background:#F7F7F7" class="pt-5 pb-5">
  140.         <div class="col-lg-8 mx-auto">
  141.             <div class="col-lg-5 title-vendre-other">
  142.                 <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  143.                     <path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"></path>
  144.                 </svg>
  145.                 <h1 class="project-title">
  146.                     NOS biens disponibles<br> À la <span style="color:#F6A400">location</span>
  147.                 </h1>
  148.             </div>
  149.             <div id="propertiesOther" class="col-lg-12 mt-5" style="display: flex; flex-wrap: wrap; flex-direction: row">
  150.                 {% for property in rentsProperties %}
  151.                     <div  class="other col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
  152.                         {% if property.pictures is not empty %}
  153.                             <div class="position-relative properties-slide slick-slide-rent-{{ loop.index }}">
  154.                                 {% for picture in property.pictures|slice(0,3) %}
  155.                                     {#                                    <img class="img-100" src="{{ picture.url }}">#}
  156.                                     {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  157.                                     <div class="img" style="background-image: url('{{ url }}')"  onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
  158.                                     </div>
  159.                                 {% endfor %}
  160.                             </div>
  161.                         {% else %}
  162.                             <div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
  163.                         {% endif %}
  164.                         <a href="{{ path('property-detail', {'id': property.id}) }}">
  165.                         <div class="row col-md-12 justify-content-between infos-list">
  166.                             <ul class="col-md-4 items">
  167.                                 {% if property.area.value %}
  168.                                     <li class="item surface">
  169.                                         <img src="{{ asset('img/surface.svg') }}" class="surface-logo"> {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
  170.                                     </li>
  171.                                 {% endif %}
  172.                             </ul>
  173.                             <div class="col-md-8 properties-price d-flex justify-content-end">
  174.                                 {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({"EUR": " €"})  }}
  175.                             </div>
  176.                         </div>
  177.                         <p class="city" {% if not property.area.value %}style="margin-top:-30px;"{% endif %}>{{ property.city.name }}</p>
  178.                         <p class="project-name">{{ getTypeProperty(property.type) }}</p>
  179.                         </a>
  180.                     </div>
  181.                 {% endfor %}
  182.             </div>
  183.             <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;">
  184.                 <div>
  185.                     <a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': 'location'}) }}">Découvrir plus
  186.                         <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 -->
  187.                     </a>
  188.                 </div>
  189.             </div>
  190.         </div>
  191.     </section>
  192.     <script>
  193.         const arrowPrev = `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
  194.                                 <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"/>
  195.                             </svg>`;
  196.         const arrowNext= `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
  197.                             <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"/>
  198.                         </svg>`;
  199.         var countProperties = '{{ salesProperties|length }}';
  200.         var loopProp = 1;
  201.         while (loopProp <= countProperties) {
  202.             $('.slick-slide-single-'+loopProp).slick({
  203.                 'slidesToShow': 1,
  204.                 'prevArrow': `<div class="arrow-left square-black d-flex justify-content-center align-items-center position-absolute">${arrowPrev}</div>`,
  205.                 'nextArrow': `<div class="arrow-right square-black d-flex justify-content-center align-items-center position-absolute">${arrowNext}</div>`
  206.             });
  207.             loopProp++;
  208.         }
  209.         var countPropertiesRent = '{{ rentsProperties|length }}';
  210.         var loopPropRent = 1;
  211.         while (loopPropRent <= countPropertiesRent) {
  212.             $('.slick-slide-rent-'+loopPropRent).slick({
  213.                 'slidesToShow': 1,
  214.                 'prevArrow': `<div class="arrow-left square-black d-flex justify-content-center align-items-center position-absolute">${arrowPrev}</div>`,
  215.                 'nextArrow': `<div class="arrow-right square-black d-flex justify-content-center align-items-center position-absolute">${arrowNext}</div>`
  216.             });
  217.             loopPropRent++;
  218.         }
  219.     </script>
  220.     <script>
  221.         document.querySelector('.selectdiv').style.display = 'none';
  222.         document.getElementById('contact_form_message').style.height = '276px';
  223.     </script>
  224. {% endblock %}