templates/public/index.html.twig line 1

Open in your IDE?
  1. {% extends './public/layout.html.twig' %}
  2. {% block main %}
  3.     {% set isProposition = false %}
  4.     {% if propositions|length > 0 %}
  5.         {% set isProposition = true %}
  6.         {% set firstProposition = propositions|first %}
  7.     {% endif %}
  8.     <div class="homepage mobile" style="{% if isProposition %} background-image: linear-gradient(180deg, rgb(48 48 48 / 80%) 0%, rgb(48 48 48 / 80%) 100%), url({{ asset('uploads/lots_images/' ~ firstProposition.lot.image) }}); {% endif %}">
  9.         {% if not recap %}
  10.         <div class="container-fluid">
  11.             <div class="titles row">
  12.                 <div class="col-12 text-center">
  13.                     <h4 class="subtitle text-white font-weight-bold">
  14.                         Votre sélection personnalisée {{ interlocuteur is not null ? 'par ' ~ interlocuteur.entreprise.nom : '' }} : Cliquez sur une vignette !
  15.                     </h4>
  16.                     <p class="sub-subtitle text-white">
  17.                         <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="8vh">
  18.                             <path d="M12 14.5L7.5 10L6.08 11.42L12 17.34L17.92 11.42L16.5 10L12 14.5ZM12 10L7.5 5.5L6.08 6.92L12 12.84L17.92 6.92L16.5 5.5L12 10Z" fill="#46bdf7"/>
  19.                         </svg>
  20.                     </p>
  21.                 </div>
  22.             </div>
  23.         </div>
  24.         {% endif %}
  25.         {% set nb = 0 %}
  26.             {% if not recap %}
  27.                 <div class="container-fluid-content container-lots position-relative">
  28.                     <div class="content-lots m-0">
  29.                         <div class="row justify-content-center w-100 m-0 p-0 lots">
  30.                             {% if propositions is defined and propositions %}
  31.                                 {% for key, proposition in propositions %}
  32.                                     <div class="lot-item {% if propositions|length == 1 %} col-8 {% elseif propositions|length == 2 %} col-6 {% else %} col-4 {% endif %} active-loading">
  33.                                         <a href="{{ path('public_lot', {token: proposition.prospect.token, id: proposition.lot.id}) }}" class="noAnim link-card-item active-loading">
  34.                                             <div class="hide-zoom-in d-flex justify-content-between card-lot-item" style="min-height: {% if propositions|length == 1 %} 50vh {% elseif propositions|length == 2 %} 44vh {% else %} 34vh {% endif %}">
  35.                                                 <div class="noAnim bg-img-lot" style="background-image: url({{ asset('uploads/lots_images/' ~ proposition.lot.image) }});"></div>
  36.                                                 <div class="lot-caracts d-flex justify-content-between align-items-end w-100 mb-1">
  37.                                                     <div class="text-white text-15 col-10">
  38.                                                         <h3 class="lot-name mb-0">{% if proposition.lot.reference is not empty %}{{proposition.lot.reference}} - {% endif %}{{proposition.lot.ville|upper}}</h3>
  39.                                                         <h2 class="lot-size text-bold">{{proposition.lot.type|upper}} {% if proposition.lot.superficie is not empty %} - {{ proposition.lot.Superficie }}m² {% endif %}</h2>
  40.                                                     </div>
  41.                                                     <div class="num col-2">{{ loop.index }}</div>
  42.                                                 </div>
  43.                                             </div>
  44.                                         </a>
  45.                                         <div>
  46.                                             <h5 class="lot-realisation">
  47.                                                 {% if proposition.lot.prix is not empty %}
  48.                                                     <span class="lot-prix">{{ proposition.lot.prix|number_format(0, ',', ' ') }}€</span>
  49.                                                 {% endif %}
  50.                                                 {% if proposition.lot.prix is not empty and proposition.lot.programmeParent.visuLivraison and proposition.lot.livraison is not empty %}
  51.                                                     <span class="text-white"> - </span>
  52.                                                 {% endif %}
  53.                                                 {% if proposition.lot.programmeParent.visuLivraison and proposition.lot.livraison is not empty %}
  54.                                                     <span class="lot-livraison">
  55.                                                         {{ proposition.lot.livraison }}
  56.                                                     </span>
  57.                                                 {% endif %}
  58.                                             </h5>
  59.                                         </div>
  60.                                     </div>
  61.                                 {% endfor %}
  62.                             {% endif %}
  63.                         </div>
  64.                     </div>
  65.                     <div class="w-100 d-flex justify-content-end">
  66.                         <p class="logo-zada text-white text-center w-100">Zada © {{ "now"|date('Y') }}</p>
  67.                     </div>
  68.                 </div>
  69.             {% else %}
  70.                 {% if propositions.first is defined %}
  71.                     {% set firstProposition = propositions.first %}
  72.                 {% else %}
  73.                     {% set firstProposition = propositions[0] %}
  74.                 {% endif %}
  75.                 <div class="slide slide-avis" style="background-image:linear-gradient(180deg, rgb(48 48 48 / 75%) 0%, rgb(48 48 48 / 100%) 100%), url({{ asset('uploads/lots_images/' ~ firstProposition.lot.image) }});">
  76.                     <div class="container-fluid-content container-lots position-relative container-fluid p-0" class="container-lots">
  77.                         <div class="container-avis pt-lg-5 mx-auto">
  78.                             <div class="content-lots recap-lots m-0">
  79.                                 <div class="row justify-content-center w-100 m-0 pb-0 pt-4 px-0 lots">
  80.                                     {% if propositions is defined and propositions %}
  81.                                         {% for key, proposition in propositions %}
  82.                                             <div class="{% if propositions|length == 1 %}col-8{% elseif propositions|length == 2 %}col-6{% else %}col-4{% endif %} d-flex flex-column px-2 px-lg-4 py-2 py-lg-4 recap-card">
  83.                                                 <h2 class="location-card-{{ (key%6)+1 }} image-title text-bold">{{ proposition.lot.ville }}</h2>
  84.                                                 <div class="lot-item lot-item-recap h-100" data-bs-toggle="modal" data-bs-target="#modalImage" style="min-height: {% if propositions|length == 1 %}50vh{% elseif propositions|length == 2 %}44vh{% else %}34vh{% endif %}">
  85.                                                     <div class="row mx-0 h-100">
  86.                                                         <div class="{% if proposition.lot.plan is null and proposition.lot.image is null %} col-12 {% else %} col-5 {% endif %} px-0 lot-caracts lot-{{ (key%6)+1 }}">
  87.                                                             <ul class="px-2 py-3 m-0">
  88.                                                                 <li class="nom-card-recap text-bold">{{ proposition.lot.programme }}</li>
  89.                                                                 <li class="ref-card-recap">
  90.                                                                     {{proposition.lot.type}}
  91.                                                                     {% if proposition.lot.reference is not empty %}
  92.                                                                         - {{ proposition.lot.reference }}
  93.                                                                     {% endif %}
  94.                                                                 </li>
  95.                                                                 {% if proposition.lot.etage is not empty %}
  96.                                                                     <li class="title-card-recap">Etage : <b>{{ proposition.lot.etage }}</b></li>
  97.                                                                 {%  endif %}
  98.                                                                 {% if proposition.lot.superficie is not empty %}
  99.                                                                     <li class="title-card-recap">Superficie : <b>{{ proposition.lot.superficie|number_format(2, ',', ' ')|replace({',00': ''}) }}m²</b></li>
  100.                                                                 {% endif %}
  101.                                                                 {% if proposition.lot.terrasse is not empty %}
  102.                                                                     <li class="title-card-recap">Terrasse : <b>{{ proposition.lot.terrasse|number_format(2, ',', ' ')|replace({',00': ''}) }}m²</b></li>
  103.                                                                 {% endif %}
  104.                                                                 {% if proposition.lot.terrasse2 is not empty %}
  105.                                                                     <li class="title-card-recap">Deuxième terrasse : <b>{{ proposition.lot.terrasse2|number_format(2, ',', ' ')|replace({',00': ''}) }}m²</b></li>
  106.                                                                 {% endif %}
  107.                                                                 {% if proposition.lot.jardin is not empty %}
  108.                                                                     <li class="title-card-recap">Jardin : <b>{{ proposition.lot.jardin|number_format(2, ',', ' ')|replace({',00': ''}) }}m²</b></li>
  109.                                                                 {% endif %}
  110.                                                                 {% if proposition.lot.orientation is not empty %}
  111.                                                                     <li class="title-card-recap">Orientation : <b>{{ proposition.lot.orientation }}</b></li>
  112.                                                                 {% endif %}
  113.                                                                 {% if proposition.lot.prix is not null %}
  114.                                                                     <li class="title-card-recap">Prix : <b>{{ proposition.lot.prix|number_format(2, ',', ' ')|replace({',00': ''}) }} €</b></li>
  115.                                                                 {% endif %}
  116.                                                                 {% if(proposition.lot.annexes is not null) %}
  117.                                                                     <li class="title-card-recap">Annexes incluses : <b>{{ proposition.lot.annexes }}</b></li>
  118.                                                                 {% endif %}
  119.                                                                 {% if proposition.lot.fraisNotaireInclus is not null %}
  120.                                                                     <li class="title-card-recap">Frais de notaire {% if proposition.lot.fraisNotaireType is null or proposition.lot.fraisNotaireType == 'reduits' %} réduits{% endif %} : <b>{{ proposition.lot.fraisNotaireInclus|number_format(2, ',', ' ')|replace({',00': ''}) }} €</b></li>
  121.                                                                 {% endif %}
  122.                                                                 {% if proposition.lot.programmeParent.visuLivraison %}
  123.                                                                     {% if proposition.lot.livraison is not empty %}
  124.                                                                         <li class="title-card-recap">Livraison : <b>{{ proposition.lot.livraison }}</b></li>
  125.                                                                     {% endif %}
  126.                                                                 {% endif %}
  127.                                                                 {% if proposition.lot.description is not empty %}
  128.                                                                     <li class="title-card-recap">Autres notes : <br><strong>{{ proposition.lot.description }}</strong></br></li>
  129.                                                                 {% endif %}
  130.                                                                 {% if proposition.lot.programmeParent.noteGlobale is not empty %}
  131.                                                                     <li class="title-card-recap"><strong>{{ proposition.lot.programmeParent.noteGlobale }}</strong></li>
  132.                                                                 {% endif %}
  133.                                                             </ul>
  134.                                                         </div>
  135.                                                         <div class="col-7 recap-plan-masse px-0">
  136.                                                             <div class="viewer-pdf h-100">
  137.                                                                 {% if proposition.lot.plan is not null or proposition.lot.image is not null %}
  138.                                                                     <div id="viewer_n{{ proposition.lot.pjs|length }}" class="viewer d-flex flex-wrap align-content-center h-100">
  139.                                                                         {% if proposition.lot.plan is not null %}
  140.                                                                             {% if proposition.lot.plan.filename|unserialize is not null %}
  141.                                                                                 {% for img in proposition.lot.plan.filename|unserialize %}
  142.                                                                                     <img class="minia-plan" loading="lazy" src="{{ asset(img) }}"/><br/>
  143.                                                                                 {% endfor %}
  144.                                                                             {% else %}
  145.                                                                                 <img class="minia-plan" loading="lazy" src="{{ asset('uploads/pieces_jointes/' ~ proposition.lot.plan.filename) }}"/>
  146.                                                                             {% endif %}
  147.                                                                         {% elseif proposition.lot.image is not null %}
  148.                                                                             {#<div class="h-100 w-100 minia-image" style="background-image: url({{ asset('uploads/lots_images/' ~ proposition.lot.image) }});"></div>#}
  149.                                                                             <img class="minia-image test" loading="lazy" src="{{ asset('uploads/lots_images/' ~ proposition.lot.image) }}"><br/>
  150.                                                                         {% endif %}
  151.                                                                     </div>
  152.                                                                 {% endif %}
  153.                                                             </div>
  154.                                                         </div>
  155.                                                     </div>
  156.                                                 </div>
  157.                                                 <div class="d-flex my-2 justify-content-between">
  158.                                                     <h2 class="text-bold"><span data-html2canvas-ignore class="location-card-{{ (key%6)+1 }}">{{proposition.lot.type|slice(0,2)}} {{proposition.lot.reference}}</span><span data-html2canvas-ignore class="lot-prix"> - {{ proposition.lot.prix|number_format(0, ',', ' ') }}€</span></h2>
  159.                                                     <div class="icones d-flex align-items-center">
  160.                                                         <a class="icone d-flex icone-retour mx-lg-1" data-html2canvas-ignore href="{{ path('public_lot', {token: proposition.prospect.token, id: proposition.lot.id}) }}"><img class="w-100" src="{{ asset('build/images/back-arrow.png') }}"></a>
  161.                                                         <a class="icone d-flex icone-dowload mx-1" data-html2canvas-ignore href="#"><img class="w-100" src="{{ asset('build/images/telechargement-icone.png') }}"></a>
  162.                                                         <a class="icone d-flex icone-full mx-lg-1" data-html2canvas-ignore data-bs-toggle="modal" data-bs-target="#modalImage" href="#"><img class="w-100" src="{{ asset('build/images/fullscreen-icone.png') }}"></a>
  163.                                                     </div>
  164.                                                 </div>
  165.                                             </div>
  166.                                         {% endfor %}
  167.                                     {% endif %}
  168.                                 </div>
  169.                             </div>
  170.                         </div>
  171.                     </div>
  172.                     <div class="w-100 d-flex justify-content-end">
  173.                         <p class=" text-white text-center w-100">Zada © {{ "now"|date('Y') }}</p>
  174.                     </div>
  175.                 </div>
  176.             {% endif %}
  177.         </div>
  178.         <div class="modal fade" id="modalImage" tabindex="-1" aria-hidden="true">
  179.             <div class="modal-dialog modal-fullscreen ">
  180.                 <div class="modal-content">
  181.                     <div class="modal-header">
  182.                         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  183.                     </div>
  184.                     <div class="modal-body">
  185.                         <img class="img-modal d-block mx-auto">
  186.                     </div>
  187.                 </div>
  188.             </div>
  189.         </div>
  190. {% endblock %}
  191. {% block footer %}
  192. {% endblock %}