var/cache/dev/twig/80/8034d92253d3ba0171adc9c0f5d5fcdf4580444d429091a6fbe3a5bbeef3ae67.php line 79

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* property.html.twig */
  14. class __TwigTemplate_03567e1563397c803ab2dbed3b4ad14b7e236c21c538fd46adc5ae424dd6c9c5 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'metaDescription' => [$this'block_metaDescription'],
  25.             'body' => [$this'block_body'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""property.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""property.html.twig"));
  40.         $this->parent $this->loadTemplate("base.html.twig""property.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 3
  48.     public function block_title($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         echo "Biens";
  56.         
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  58.         
  59.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  60.     }
  61.     // line 4
  62.     public function block_metaDescription($context, array $blocks = [])
  63.     {
  64.         $macros $this->macros;
  65.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  67.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  68.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  69.         // line 5
  70.         echo "    ";
  71.         $context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Biens""Header");
  72.         // line 6
  73.         echo "    <meta name=\"description\" content=\"
  74.     ";
  75.         // line 7
  76.         if (twig_get_attribute($this->env$this->source, ($context["headerContent"] ?? null), "content", [], "any"truetruefalse7)) {
  77.             // line 8
  78.             echo "        ";
  79.             echo twig_escape_filter($this->envtwig_striptags(twig_get_attribute($this->env$this->source, (isset($context["headerContent"]) || array_key_exists("headerContent"$context) ? $context["headerContent"] : (function () { throw new RuntimeError('Variable "headerContent" does not exist.'8$this->source); })()), "content", [], "any"falsefalsefalse8)), "html"nulltrue);
  80.             echo "
  81.     ";
  82.         } else {
  83.             // line 10
  84.             echo "         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.
  85.     ";
  86.         }
  87.         // line 12
  88.         echo "    \">
  89. ";
  90.         
  91.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  92.         
  93.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  94.     }
  95.     // line 15
  96.     public function block_body($context, array $blocks = [])
  97.     {
  98.         $macros $this->macros;
  99.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  100.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  101.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  102.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  103.         echo 
  104.     ";
  105.         // line 17
  106.         $context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Biens""Header");
  107.         // line 18
  108.         echo "
  109.     ";
  110.         // line 19
  111.         if ((twig_get_attribute($this->env$this->source, ($context["headerContent"] ?? null), "picture", [], "any"truetruefalse19) &&  !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["headerContent"]) || array_key_exists("headerContent"$context) ? $context["headerContent"] : (function () { throw new RuntimeError('Variable "headerContent" does not exist.'19$this->source); })()), "picture", [], "any"falsefalsefalse19)))) {
  112.             // line 20
  113.             echo "        ";
  114.             $context["backgroundImage"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["headerContent"]) || array_key_exists("headerContent"$context) ? $context["headerContent"] : (function () { throw new RuntimeError('Variable "headerContent" does not exist.'20$this->source); })()), "picture", [], "any"falsefalsefalse20), 0, [], "array"falsefalsefalse20), "path", [], "any"falsefalsefalse20);
  115.             // line 21
  116.             echo "    ";
  117.         } else {
  118.             // line 22
  119.             echo "        ";
  120.             $context["backgroundImage"] = "empty";
  121.             // line 23
  122.             echo "    ";
  123.         }
  124.         // line 24
  125.         echo "
  126.     ";
  127.         // line 39
  128.         echo "
  129.     <div class=\"container-fluid\">
  130.         ";
  131.         // line 44
  132.         $context["sectionContent1"] = $this->extensions['App\Twig\ContentExtension']->Content("Biens""Section-1");
  133.         // line 45
  134.         echo "
  135.         ";
  136.         // line 70
  137.         echo "
  138.         <section class=\"project\" style=\"margin-bottom: 120px; margin-top: 60px\">
  139.             
  140.             <div id=\"button-property-page\"  class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; align-items: center; padding-left: 7px\">
  141.                 <button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
  142.                 <button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
  143.                 <button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
  144.             </div>
  145.             <div id=\"button-property-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
  146.                 <div id=\"flick3\" class=\"flicking-viewport\">
  147.                     <div class=\"flicking-camera\">
  148.                         <button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
  149.                         <button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
  150.                         <button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
  151.                     </div>
  152.                 </div>
  153.             </div>
  154.             <div class=\"col-lg-8 mx-auto div-svg-header deactive-tablet\" style=\"display: flex; flex-direction: column; justify-content: center\">
  155.                 <div class=\"col-md-4\" style=\"margin-top:20px\">
  156.                     <p>Trier par :</p>
  157.                     <form>
  158.                         <select name=\"subfilter\" class=\"form-control with-appearance\" id=\"filterProperties\">
  159.                             <option value=\"\">Sélectionner</option>
  160.                             <option value=\"date\">Date de publication</option>
  161.                             <option value=\"asc\">Prix croissant</option>
  162.                             <option value=\"desc\">Prix décroissant</option>
  163.                         </select>
  164.                     </form>
  165.                 </div>
  166.                 ";
  167.         // line 128
  168.         echo "
  169.                 <div id=\"loading\">
  170.                     <h1 id=\"showOutput\"></h1>
  171.                 </div>
  172.                 <div id=\"properties\" class=\"col-lg-12\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
  173.                     ";
  174.         // line 138
  175.         $context['_parent'] = $context;
  176.         $context['_seq'] = twig_ensure_traversable((isset($context["properties"]) || array_key_exists("properties"$context) ? $context["properties"] : (function () { throw new RuntimeError('Variable "properties" does not exist.'138$this->source); })()));
  177.         $context['_iterated'] = false;
  178.         $context['loop'] = [
  179.           'parent' => $context['_parent'],
  180.           'index0' => 0,
  181.           'index'  => 1,
  182.           'first'  => true,
  183.         ];
  184.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  185.             $length count($context['_seq']);
  186.             $context['loop']['revindex0'] = $length 1;
  187.             $context['loop']['revindex'] = $length;
  188.             $context['loop']['length'] = $length;
  189.             $context['loop']['last'] = === $length;
  190.         }
  191.         foreach ($context['_seq'] as $context["_key"] => $context["property"]) {
  192.             // line 139
  193.             echo "                        <div  class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" data-date=\"";
  194.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["property"], "created_at", [], "any"falsefalsefalse139), "html"nulltrue);
  195.             echo "\" data-price=\"";
  196.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse139), "value", [], "any"falsefalsefalse139), "html"nulltrue);
  197.             echo "\" style=\"cursor: pointer\">
  198.                             ";
  199.             // line 162
  200.             echo "
  201.                             ";
  202.             // line 165
  203.             echo "                            ";
  204.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["property"], "pictures", [], "any"falsefalsefalse165))) {
  205.                 // line 166
  206.                 echo "                                <div class=\"position-relative properties-slide slick-slide-single-";
  207.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse166), "html"nulltrue);
  208.                 echo "\" style=\"height:265px;\">
  209.                                     ";
  210.                 // line 167
  211.                 $context['_parent'] = $context;
  212.                 $context['_seq'] = twig_ensure_traversable(twig_slice($this->envtwig_get_attribute($this->env$this->source$context["property"], "pictures", [], "any"falsefalsefalse167), 03));
  213.                 foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
  214.                     // line 168
  215.                     echo "                                        ";
  216.                     // line 169
  217.                     echo "                                        <div class=\"img\" style=\"background: url('";
  218.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse169), "html"nulltrue);
  219.                     echo "')no-repeat center;background-size:cover;\"  onclick=\"location.href='";
  220.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("property-detail", ["id" => twig_get_attribute($this->env$this->source$context["property"], "id", [], "any"falsefalsefalse169)]), "html"nulltrue);
  221.                     echo "'\">
  222.                                         </div>
  223.                                     ";
  224.                 }
  225.                 $_parent $context['_parent'];
  226.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
  227.                 $context array_intersect_key($context$_parent) + $_parent;
  228.                 // line 172
  229.                 echo "                                </div>
  230.                             ";
  231.             } else {
  232.                 // line 175
  233.                 echo "                                <div class=\"img\" style=\"background: url('";
  234.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html"nulltrue);
  235.                 echo "')no-repeat center;background-size:cover;\"></div>
  236.                             ";
  237.             }
  238.             // line 177
  239.             echo "                            <div class=\"row col-md-12 justify-content-between\">
  240.                                 <ul class=\"col-md-4 items\">
  241.                                     <li class=\"item surface\">
  242.                                         ";
  243.             // line 183
  244.             echo "                                         ";
  245.             (((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "area", [], "any"falsefalsefalse183), "value", [], "any"falsefalsefalse183), null))) ? (print ("")) : (print (twig_escape_filter($this->env, (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "area", [], "any"falsefalsefalse183), "value", [], "any"falsefalsefalse183) . $this->extensions['App\Twig\ContentExtension']->areaConversion(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "area", [], "any"falsefalsefalse183), "unit", [], "any"falsefalsefalse183))), "html"nulltrue))));
  246.             echo "
  247.                                     </li>
  248.                                     ";
  249.             // line 185
  250.             if ((!== twig_compare(twig_get_attribute($this->env$this->source$context["property"], "bedrooms", [], "any"falsefalsefalse185), 0))) {
  251.                 // line 186
  252.                 echo "                                        <li class=\"item surface\">
  253.                                             <img src=\"";
  254.                 // line 187
  255.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/icons/chambre.svg"), "html"nulltrue);
  256.                 echo "\" alt=\"Icone chambre\" style=\"width:22px;margin-right:10px;margin-top:5px;\"> ";
  257.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["property"], "bedrooms", [], "any"falsefalsefalse187), "html"nulltrue);
  258.                 echo "
  259.                                         </li>
  260.                                     ";
  261.             }
  262.             // line 190
  263.             echo "                                </ul>
  264.                                 <div class=\"col-md-8 properties-price d-flex justify-content-end\">
  265.                                     ";
  266.             // line 192
  267.             (((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse192), "value", [], "any"falsefalsefalse192), null))) ? (print ("<span style=\"font-size: 21px !important;\">sur demande</span>")) : (print (twig_escape_filter($this->env, (twig_number_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse192), "value", [], "any"falsefalsefalse192), 2","" ") . twig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse192), "currency", [], "any"falsefalsefalse192), ["EUR" => " €"])), "html"nulltrue))));
  268.             echo "
  269.                                 </div>
  270.                             </div>
  271.                             <p class=\"city\">";
  272.             // line 195
  273.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "city", [], "any"falsefalsefalse195), "name", [], "any"falsefalsefalse195), "html"nulltrue);
  274.             echo "</p>
  275.                             <p class=\"project-name\">";
  276.             // line 196
  277.             echo twig_escape_filter($this->env$this->extensions['App\Twig\ContentExtension']->getTypeProperty(twig_get_attribute($this->env$this->source$context["property"], "type", [], "any"falsefalsefalse196)), "html"nulltrue);
  278.             echo "</p>
  279.                         </div>
  280.                     ";
  281.             $context['_iterated'] = true;
  282.             ++$context['loop']['index0'];
  283.             ++$context['loop']['index'];
  284.             $context['loop']['first'] = false;
  285.             if (isset($context['loop']['length'])) {
  286.                 --$context['loop']['revindex0'];
  287.                 --$context['loop']['revindex'];
  288.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  289.             }
  290.         }
  291.         if (!$context['_iterated']) {
  292.             // line 199
  293.             echo "                        <h4>Aucun bien disponible avec ces critères</h4>
  294.                     ";
  295.         }
  296.         $_parent $context['_parent'];
  297.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['property'], $context['_parent'], $context['loop']);
  298.         $context array_intersect_key($context$_parent) + $_parent;
  299.         // line 201
  300.         echo "                </div>
  301.                 ";
  302.         // line 205
  303.         echo "            </div>
  304.         </section>
  305.         <section class=\"other-properties pt-5 pb-5\" style=\"background:#F7F7F7\">
  306.             <div class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; margin-top: 30px\">
  307.                 <div class=\"col-lg-6\">
  308.                     <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
  309.                         <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>
  310.                     </svg>
  311.                     <h1 class=\"project-title\">
  312.                         ";
  313.         // line 215
  314.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse215), "attributes", [], "any"falsetruefalse215), "get", [=> "_route_params"], "method"falsetruefalse215), "keyword", [], "array"truetruefalse215) || array_key_exists("idCategory"$context))) {
  315.             // line 216
  316.             echo "                            ";
  317.             if (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse216), "attributes", [], "any"falsetruefalse216), "get", [=> "_route_params"], "method"falsetruefalse216), "keyword", [], "array"truetruefalse216) && (=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'216$this->source); })()), "request", [], "any"falsefalsefalse216), "attributes", [], "any"falsefalsefalse216), "get", [=> "_route_params"], "method"falsefalsefalse216), "keyword", [], "array"falsefalsefalse216), "location"))) || (array_key_exists("idCategory"$context) && (=== twig_compare((isset($context["idCategory"]) || array_key_exists("idCategory"$context) ? $context["idCategory"] : (function () { throw new RuntimeError('Variable "idCategory" does not exist.'216$this->source); })()), 1))))) {
  318.                 // line 217
  319.                 echo "                                ";
  320.                 $context["otherDispo"] = "vente";
  321.                 // line 218
  322.                 echo "                            ";
  323.             } else {
  324.                 // line 219
  325.                 echo "                                ";
  326.                 $context["otherDispo"] = "location";
  327.                 // line 220
  328.                 echo "                            ";
  329.             }
  330.             // line 221
  331.             echo "                        ";
  332.         } else {
  333.             // line 222
  334.             echo "                            ";
  335.             $context["otherDispo"] = null;
  336.             // line 223
  337.             echo "                        ";
  338.         }
  339.         // line 224
  340.         echo "                        NOS biens disponibles<br> ";
  341.         if ((isset($context["otherDispo"]) || array_key_exists("otherDispo"$context) ? $context["otherDispo"] : (function () { throw new RuntimeError('Variable "otherDispo" does not exist.'224$this->source); })())) {
  342.             echo "À la <span style=\"color:#F6A400\">";
  343.             echo twig_escape_filter($this->env, (isset($context["otherDispo"]) || array_key_exists("otherDispo"$context) ? $context["otherDispo"] : (function () { throw new RuntimeError('Variable "otherDispo" does not exist.'224$this->source); })()), "html"nulltrue);
  344.             echo "</span>";
  345.         }
  346.         // line 225
  347.         echo "                    </h1>
  348.                 </div>
  349.             </div>
  350.             <div  class=\"col-lg-8 mx-auto\">
  351.                 <div id=\"propertiesOther\" class=\"col-lg-12 mt-5 property-other-list\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
  352.                     ";
  353.         // line 231
  354.         $context['_parent'] = $context;
  355.         $context['_seq'] = twig_ensure_traversable((isset($context["otherProperties"]) || array_key_exists("otherProperties"$context) ? $context["otherProperties"] : (function () { throw new RuntimeError('Variable "otherProperties" does not exist.'231$this->source); })()));
  356.         $context['loop'] = [
  357.           'parent' => $context['_parent'],
  358.           'index0' => 0,
  359.           'index'  => 1,
  360.           'first'  => true,
  361.         ];
  362.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  363.             $length count($context['_seq']);
  364.             $context['loop']['revindex0'] = $length 1;
  365.             $context['loop']['revindex'] = $length;
  366.             $context['loop']['length'] = $length;
  367.             $context['loop']['last'] = === $length;
  368.         }
  369.         foreach ($context['_seq'] as $context["_key"] => $context["property"]) {
  370.             // line 232
  371.             echo "                        <div  class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" style=\"cursor: pointer\">
  372.                             ";
  373.             // line 255
  374.             echo "
  375.                             ";
  376.             // line 258
  377.             echo "                            ";
  378.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["property"], "pictures", [], "any"falsefalsefalse258))) {
  379.                 // line 259
  380.                 echo "                                <div class=\"position-relative properties-slide slick-slide-single-";
  381.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse259), "html"nulltrue);
  382.                 echo "\">
  383.                                     ";
  384.                 // line 260
  385.                 $context['_parent'] = $context;
  386.                 $context['_seq'] = twig_ensure_traversable(twig_slice($this->envtwig_get_attribute($this->env$this->source$context["property"], "pictures", [], "any"falsefalsefalse260), 03));
  387.                 foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
  388.                     // line 261
  389.                     echo "                                        ";
  390.                     // line 262
  391.                     echo "                                        <div class=\"img\" style=\"background-image: url('";
  392.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse262), "html"nulltrue);
  393.                     echo "')\"  onclick=\"location.href='";
  394.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("property-detail", ["id" => twig_get_attribute($this->env$this->source$context["property"], "id", [], "any"falsefalsefalse262)]), "html"nulltrue);
  395.                     echo "'\">
  396.                                         </div>
  397.                                     ";
  398.                 }
  399.                 $_parent $context['_parent'];
  400.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
  401.                 $context array_intersect_key($context$_parent) + $_parent;
  402.                 // line 265
  403.                 echo "                                </div>
  404.                             ";
  405.             } else {
  406.                 // line 268
  407.                 echo "                                <div class=\"img\" style=\"background-image: url('";
  408.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html"nulltrue);
  409.                 echo "')\"></div>
  410.                             ";
  411.             }
  412.             // line 270
  413.             echo "                            <div class=\"row col-md-12 justify-content-between infos-list\">
  414.                                 <ul class=\"col-md-4 items\">
  415.                                     <li class=\"item surface\">
  416.                                         ";
  417.             // line 274
  418.             echo "                                        ";
  419.             (((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "area", [], "any"falsefalsefalse274), "value", [], "any"falsefalsefalse274), null))) ? (print ("")) : (print (twig_escape_filter($this->env, (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "area", [], "any"falsefalsefalse274), "value", [], "any"falsefalsefalse274) . $this->extensions['App\Twig\ContentExtension']->areaConversion(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "area", [], "any"falsefalsefalse274), "unit", [], "any"falsefalsefalse274))), "html"nulltrue))));
  420.             echo "
  421.                                     </li>
  422.                                 </ul>
  423.                                 <div class=\"col-md-8 properties-price d-flex justify-content-end\">
  424.                                     ";
  425.             // line 278
  426.             (((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse278), "value", [], "any"falsefalsefalse278), null))) ? (print ("<span style=\"font-size: 14px !important;\">sur demande</span>")) : (print (twig_escape_filter($this->env, (twig_number_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse278), "value", [], "any"falsefalsefalse278), 2","" ") . twig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "price", [], "any"falsefalsefalse278), "currency", [], "any"falsefalsefalse278), ["EUR" => " €"])), "html"nulltrue))));
  427.             echo "
  428.                                 </div>
  429.                             </div>
  430.                             <p class=\"city\">";
  431.             // line 281
  432.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["property"], "city", [], "any"falsefalsefalse281), "name", [], "any"falsefalsefalse281), "html"nulltrue);
  433.             echo "</p>
  434.                             <p class=\"project-name\">";
  435.             // line 282
  436.             echo twig_escape_filter($this->env$this->extensions['App\Twig\ContentExtension']->getTypeProperty(twig_get_attribute($this->env$this->source$context["property"], "type", [], "any"falsefalsefalse282)), "html"nulltrue);
  437.             echo "</p>
  438.                         </div>
  439.                     ";
  440.             ++$context['loop']['index0'];
  441.             ++$context['loop']['index'];
  442.             $context['loop']['first'] = false;
  443.             if (isset($context['loop']['length'])) {
  444.                 --$context['loop']['revindex0'];
  445.                 --$context['loop']['revindex'];
  446.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  447.             }
  448.         }
  449.         $_parent $context['_parent'];
  450.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['property'], $context['_parent'], $context['loop']);
  451.         $context array_intersect_key($context$_parent) + $_parent;
  452.         // line 285
  453.         echo "                </div>
  454.                 ";
  455.         // line 287
  456.         $context["paramUrl"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'287$this->source); })()), "request", [], "any"falsefalsefalse287), "get", [=> "keyword"], "method"falsefalsefalse287);
  457.         // line 288
  458.         echo "                ";
  459.         if ((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'288$this->source); })()), "request", [], "any"falsefalsefalse288), "get", [=> "keyword"], "method"falsefalsefalse288), "location"))) {
  460.             // line 289
  461.             echo "                    ";
  462.             $context["paramUrl"] = "vente";
  463.             // line 290
  464.             echo "                ";
  465.         } elseif ((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'290$this->source); })()), "request", [], "any"falsefalsefalse290), "get", [=> "keyword"], "method"falsefalsefalse290), "vente"))) {
  466.             // line 291
  467.             echo "                    ";
  468.             $context["paramUrl"] = "location";
  469.             // line 292
  470.             echo "                ";
  471.         }
  472.         // line 293
  473.         echo "                <div id=\"link-none\" class=\"col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end\">
  474.                     <div>
  475.                         <a id=\"link-none-a d-flex\" class=\"property-span-arrow\" href=\"";
  476.         // line 295
  477.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("properties", ["keyword" => (isset($context["paramUrl"]) || array_key_exists("paramUrl"$context) ? $context["paramUrl"] : (function () { throw new RuntimeError('Variable "paramUrl" does not exist.'295$this->source); })())]), "html"nulltrue);
  478.         echo "\">Découvrir plus
  479.                             <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 -->
  480.                         </a>
  481.                     </div>
  482.                 </div>
  483.             </div>
  484.         </section>
  485.         ";
  486.         // line 344
  487.         echo "
  488.     </div>
  489.     
  490.     <div id=\"img-property-section\" class=\"container-fluid\" style=\"display: none\">
  491.         <div id=\"link-ok\" class=\"col-lg-3\" style=\"display: flex; align-content: center\">
  492.             <a class=\"property-span-arrow\" href=\"";
  493.         // line 349
  494.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("habiter");
  495.         echo "\">Découvrir les avantages
  496.                 <i class=\"fas fa-arrow-right property-arrow\"></i>
  497.             </a>
  498.         </div>
  499.         <div class=\"col-lg-6 habiter-img\">
  500.             ";
  501.         // line 356
  502.         if (twig_get_attribute($this->env$this->source, ($context["sectionContent1"] ?? null), "picture", [], "any"truetruefalse356)) {
  503.             // line 357
  504.             echo "                <img style=\"padding: 0px;\"  class=\"img-100\" src=\"/uploads/images/";
  505.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["sectionContent1"]) || array_key_exists("sectionContent1"$context) ? $context["sectionContent1"] : (function () { throw new RuntimeError('Variable "sectionContent1" does not exist.'357$this->source); })()), "picture", [], "any"falsefalsefalse357), 0, [], "array"falsefalsefalse357), "path", [], "any"falsefalsefalse357), "html"nulltrue);
  506.             echo "\">
  507.             ";
  508.         } else {
  509.             // line 359
  510.             echo "                <img style=\"padding: 0px;\"  class=\"img-100\" src=\"https://tracol.lu/uploads/images/millebierg-6194cb6331d44212004123.png\">
  511.             ";
  512.         }
  513.         // line 361
  514.         echo "        </div>
  515.     </div>
  516.     <script>
  517.         ";
  518.         // line 365
  519.         echo "        ";
  520.         // line 366
  521.         echo "        ";
  522.         // line 367
  523.         echo "        ";
  524.         // line 368
  525.         echo "        ";
  526.         // line 369
  527.         echo "        ";
  528.         // line 370
  529.         echo "        ";
  530.         // line 371
  531.         echo "        ";
  532.         // line 372
  533.         echo "        ";
  534.         // line 373
  535.         echo "
  536.         ";
  537.         // line 376
  538.         echo "        ";
  539.         // line 377
  540.         echo "        ";
  541.         // line 378
  542.         echo "
  543.         ";
  544.         // line 380
  545.         echo "        ";
  546.         // line 381
  547.         echo "        ";
  548.         // line 382
  549.         echo "        ";
  550.         // line 383
  551.         echo "        ";
  552.         // line 384
  553.         echo "        ";
  554.         // line 385
  555.         echo "        ";
  556.         // line 386
  557.         echo "        ";
  558.         // line 387
  559.         echo "        ";
  560.         // line 388
  561.         echo "        ";
  562.         // line 389
  563.         echo "        ";
  564.         // line 390
  565.         echo "        ";
  566.         // line 391
  567.         echo "        ";
  568.         // line 392
  569.         echo "        ";
  570.         // line 393
  571.         echo "        ";
  572.         // line 394
  573.         echo "        ";
  574.         // line 395
  575.         echo "        ";
  576.         // line 396
  577.         echo "        ";
  578.         // line 397
  579.         echo "        ";
  580.         // line 398
  581.         echo "        ";
  582.         // line 399
  583.         echo "        ";
  584.         // line 400
  585.         echo "        ";
  586.         // line 401
  587.         echo "        ";
  588.         // line 402
  589.         echo "        ";
  590.         // line 403
  591.         echo "        ";
  592.         // line 404
  593.         echo "        ";
  594.         // line 405
  595.         echo "        ";
  596.         // line 406
  597.         echo "        ";
  598.         // line 407
  599.         echo "        ";
  600.         // line 408
  601.         echo "        ";
  602.         // line 409
  603.         echo "        ";
  604.         // line 410
  605.         echo "        ";
  606.         // line 411
  607.         echo "
  608.         ";
  609.         // line 413
  610.         echo "        ";
  611.         // line 414
  612.         echo "        ";
  613.         // line 415
  614.         echo "        ";
  615.         // line 416
  616.         echo "        ";
  617.         // line 417
  618.         echo "        ";
  619.         // line 418
  620.         echo "        ";
  621.         // line 419
  622.         echo "        ";
  623.         // line 420
  624.         echo "
  625.         ";
  626.         // line 422
  627.         echo "        ";
  628.         // line 423
  629.         echo "        ";
  630.         // line 424
  631.         echo "        ";
  632.         // line 425
  633.         echo "        ";
  634.         // line 426
  635.         echo "        ";
  636.         // line 427
  637.         echo "        ";
  638.         // line 428
  639.         echo "
  640.         ";
  641.         // line 431
  642.         echo "        ";
  643.         // line 432
  644.         echo "        ";
  645.         // line 433
  646.         echo "        ";
  647.         // line 434
  648.         echo "        ";
  649.         // line 435
  650.         echo "        ";
  651.         // line 436
  652.         echo "        ";
  653.         // line 437
  654.         echo "        ";
  655.         // line 438
  656.         echo "        ";
  657.         // line 439
  658.         echo "        ";
  659.         // line 440
  660.         echo "        ";
  661.         // line 441
  662.         echo "        ";
  663.         // line 442
  664.         echo "        ";
  665.         // line 443
  666.         echo "        ";
  667.         // line 444
  668.         echo "        ";
  669.         // line 445
  670.         echo "        ";
  671.         // line 446
  672.         echo "
  673.         ";
  674.         // line 449
  675.         echo "        ";
  676.         // line 450
  677.         echo "
  678.         const futurProjects = document.getElementById('properties')
  679.         let buttons = document.getElementsByClassName('projectButton')
  680.         for (const eElement of buttons) {
  681.             eElement.addEventListener('click', function (e) {
  682.                 e.preventDefault()
  683.                 for (let button of buttons) {
  684.                     if (button.classList.contains('all')){
  685.                         button.classList.remove('all')
  686.                         button.classList.add('come')
  687.                         button.querySelector('span').classList.replace('span-all', 'span-projects')
  688.                     }
  689.                 }
  690.                 eElement.classList.remove('come')
  691.                 eElement.classList.add('all')
  692.                 eElement.querySelector('span').classList.replace('span-projects', 'span-all')
  693.                 fetch('properties/display/'+this.dataset.id, {
  694.                     method: 'GET',
  695.                 })
  696.                     .then(response => response.json())
  697.                     .then(data => {
  698.                         futurProjects.innerHTML = ''
  699.                         futurProjects.innerHTML = data.data
  700.                         _ww = \$(window).width();
  701.                         var lightbox = \$('.lightbox'),
  702.                             item = 0;
  703.                         \$('.lightbox-on').click(function(e){
  704.                             e.stopPropagation();
  705.                             item = 0;
  706.                             console.log('click btn');
  707.                             var id = \$(this).attr('data-id'),
  708.                                 max = 0;
  709.                             \$('#'+id).toggle();
  710.                             \$('#'+id).animate({opacity: 1}, 300);
  711.                             \$('#'+id).find('img').each(function( i ) {
  712.                                 //console.log('h : '+\$(this).height());
  713.                                 //console.log('w : '+\$(this).width());
  714.                                 max = i;
  715.                                 item = 1;
  716.                                 counter(item, max+1);
  717.                                 itemWidth(\$(this));
  718.                             });
  719.                         });
  720.                         lightbox.click(function(e) {
  721.                             e.stopPropagation();
  722.                             \$(this).animate({opacity: 0}, 300, function(){
  723.                                 \$(this).toggle();
  724.                             });
  725.                         });
  726.                         \$('.closer').on('click', function (e) {
  727.                             e.stopPropagation();
  728.                             \$(this).parent().animate(
  729.                                 {opacity: 0},
  730.                                 300,
  731.                                 function(){
  732.                                     \$(this).toggle();
  733.                                 }
  734.                             );
  735.                         });
  736.                         function itemWidth(img){
  737.                             img.closest('.items').width(img.width());
  738.                         }
  739.                         function counter(item, max){
  740.                             \$('.counter').text(item + ' / ' + max);
  741.                         }
  742.                         \$('.item', lightbox).on('click, swipeleft', function (e) {
  743.                             var wd = \$(this).width(),
  744.                                 last = \$(this).parent().find('.item').last(),
  745.                                 img = \$(this).find('.img');
  746.                             itemWidth(img);
  747.                             \$(this).animate(
  748.                                 {marginLeft: -wd, opacity: 0},
  749.                                 500,
  750.                                 'swing',
  751.                                 function(){
  752.                                     \$(this).insertAfter(last);
  753.                                     \$(this).css({marginLeft: 0, opacity: 1});
  754.                                 }
  755.                             );
  756.                         });
  757.                         \$('.item', lightbox).on('swiperight', function (e) {
  758.                             var wd = \$(this).width(),
  759.                                 first = \$(this).parent().find('.item').first(),
  760.                                 last = \$(this).parent().find('.item').last(),
  761.                                 img = \$(this).find('.img');
  762.                             itemWidth(img);
  763.                             \$(last).insertBefore(\$(this));
  764.                             \$(last).css({marginLeft: -wd, opacity: 0});
  765.                             \$(this).parent().find('.item').eq(0).animate(
  766.                                 {marginLeft: 0, opacity: 1},
  767.                                 500,
  768.                                 'swing'
  769.                             );
  770.                         });
  771.                         \$('.arrows', lightbox).on('click', function (e) {
  772.                             e.stopPropagation();
  773.                             var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
  774.                                 max = \$(this)
  775.                                     .siblings('.items').find('.item').length,
  776.                                 first = \$(this).siblings('.items').find('.item').first(),
  777.                                 last = \$(this).siblings('.items').find('.item').last(),
  778.                                 isRight = \$(this).hasClass('right'),
  779.                                 marginL = isRight ? -wd : 0,
  780.                                 marginL0 = isRight ? 0: -wd,
  781.                                 opacOn = isRight ? 1 : 0,
  782.                                 opacOff = isRight ? 0 : 1;
  783.                             if (!isRight){
  784.                                 \$(last).insertBefore(first);
  785.                                 \$(last).css({marginLeft: -wd, opacity: 0});
  786.                                 item++;
  787.                                 if (item == max+1) {item = 1};
  788.                             } else {
  789.                                 item--;
  790.                                 if (item == 0) {item = max};
  791.                             };
  792.                             counter(item, max);
  793.                             var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
  794.                             itemWidth(img);
  795.                             \$(this).siblings('.items').find('.item').eq(1).animate(
  796.                                 {opacity: opacOn},
  797.                                 500,
  798.                                 'swing');
  799.                             \$(this).siblings('.items').find('.item').eq(0).animate(
  800.                                 {marginLeft: marginL, opacity: 1},
  801.                                 500,
  802.                                 'swing',
  803.                                 function(){
  804.                                     if (isRight){
  805.                                         \$(this).insertAfter(last);
  806.                                         \$(this).css({ marginLeft: 0, opacity: 1});
  807.                                     }
  808.                                 }
  809.                             );
  810.                         });
  811.                         if (_ww > 768){
  812.                             \$('.div-img-hover-2').hover(function (e) {
  813.                                 \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  814.                                 var htext = \$(this).find('.project-content').height();
  815.                                 if (htext == undefined){htext = 0};
  816.                                 \$(this).find('.div-hover-2').animate({height : htext+180}, 150);
  817.                                 \$(this).find('.project-content').css({'visibility': 'visible'});
  818.                                 \$(this).find('.project-content').animate({opacity: 1}, 150);
  819.                             }, function() {
  820.                                 console.log('down');
  821.                                 \$(this).find('.div-hover-2').animate({height : 85}, 150);
  822.                                 \$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
  823.                                 \$(this).find('.project-content').animate({opacity: 0}, 150, function(){
  824.                                     \$(this).find('.project-content').css({'visibility': 'hidden'});
  825.                                 });
  826.                             });
  827.                         } else {
  828.                             \$('.div-img-hover-2').on( \"tap\", function( event ) {
  829.                                 console.log('tap tap');
  830.                                 var opened = \$(this).find('.div-hover-2').hasClass('open'),
  831.                                     ht = opened ? 85 : '100%',
  832.                                     vis = opened ? 0 : 1;
  833.                                 \$(this).find('.div-hover-2').toggleClass('open');
  834.                                 \$(this).find('.div-hover-2').animate({height : ht}, 150);
  835.                                 \$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
  836.                             });
  837.                         }
  838.                     })
  839.                     .catch((error) => {
  840.                         console.error('Error:', error);
  841.                     });
  842.             })
  843.         }
  844.         if (window.matchMedia(\"(max-width: 768px)\").matches) {
  845.             new Flicking(\"#flick3\", {
  846.                 moveType: \"freeScroll\",
  847.                 bound: true
  848.             });
  849.         }
  850.         if (window.matchMedia(\"(max-width: 768px)\").matches) {
  851.             const test = document.getElementsByClassName('select-filter')
  852.             for (const testElement of test) {
  853.                 testElement.addEventListener('click', function (e) {
  854.                     e.preventDefault()
  855.                     testElement.classList.toggle('select-projet-active')
  856.                     const infos = document.querySelector('.projectButton.all')
  857.                     const dataId = []
  858.                     const tests = document.querySelectorAll('.select-filter.select-projet-active')
  859.                     for (const test1 of tests) {
  860.                         dataId.push(parseFloat(test1.dataset.id))
  861.                     }
  862.                     fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
  863.                         method: 'GET',
  864.                     })
  865.                         .then(response => response.json())
  866.                         .then(data => {
  867.                             futurProjects.innerHTML = data.data
  868.                         })
  869.                         .catch((error) => {
  870.                             console.error('Error:', error);
  871.                         });
  872.                 })
  873.             }
  874.         } else {
  875.             const test = document.getElementsByClassName('select-projet')
  876.             const textOutput = document.querySelector(\"#showOutput\");
  877.             for (const testElement of test) {
  878.                 testElement.addEventListener('click', function (e) {
  879.                     displayLoading()
  880.                     e.preventDefault()
  881.                     testElement.classList.toggle('select-projet-active')
  882.                     const infos = document.querySelector('.projectButton.all')
  883.                     const dataId = []
  884.                     const tests = document.querySelectorAll('.select-projet.select-projet-active')
  885.                     for (const test1 of tests) {
  886.                         dataId.push(parseFloat(test1.dataset.id))
  887.                     }
  888.                     fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
  889.                         method: 'GET'
  890.                     })
  891.                         .then(response => response.json())
  892.                         .then(data => {
  893.                             hideLoading()
  894.                             futurProjects.innerHTML = data.data
  895.                             _ww = \$(window).width();
  896.                             var lightbox = \$('.lightbox'),
  897.                                 item = 0;
  898.                             \$('.lightbox-on').click(function(e){
  899.                                 e.stopPropagation();
  900.                                 item = 0;
  901.                                 console.log('click btn');
  902.                                 var id = \$(this).attr('data-id'),
  903.                                     max = 0;
  904.                                 \$('#'+id).toggle();
  905.                                 \$('#'+id).animate({opacity: 1}, 300);
  906.                                 \$('#'+id).find('img').each(function( i ) {
  907.                                     //console.log('h : '+\$(this).height());
  908.                                     //console.log('w : '+\$(this).width());
  909.                                     max = i;
  910.                                     item = 1;
  911.                                     counter(item, max+1);
  912.                                     itemWidth(\$(this));
  913.                                 });
  914.                             });
  915.                             lightbox.click(function(e) {
  916.                                 e.stopPropagation();
  917.                                 \$(this).animate({opacity: 0}, 300, function(){
  918.                                     \$(this).toggle();
  919.                                 });
  920.                             });
  921.                             \$('.closer').on('click', function (e) {
  922.                                 e.stopPropagation();
  923.                                 \$(this).parent().animate(
  924.                                     {opacity: 0},
  925.                                     300,
  926.                                     function(){
  927.                                         \$(this).toggle();
  928.                                     }
  929.                                 );
  930.                             });
  931.                             function itemWidth(img){
  932.                                 img.closest('.items').width(img.width());
  933.                             }
  934.                             function counter(item, max){
  935.                                 \$('.counter').text(item + ' / ' + max);
  936.                             }
  937.                             \$('.item', lightbox).on('click, swipeleft', function (e) {
  938.                                 var wd = \$(this).width(),
  939.                                     last = \$(this).parent().find('.item').last(),
  940.                                     img = \$(this).find('.img');
  941.                                 itemWidth(img);
  942.                                 \$(this).animate(
  943.                                     {marginLeft: -wd, opacity: 0},
  944.                                     500,
  945.                                     'swing',
  946.                                     function(){
  947.                                         \$(this).insertAfter(last);
  948.                                         \$(this).css({marginLeft: 0, opacity: 1});
  949.                                     }
  950.                                 );
  951.                             });
  952.                             \$('.item', lightbox).on('swiperight', function (e) {
  953.                                 var wd = \$(this).width(),
  954.                                     first = \$(this).parent().find('.item').first(),
  955.                                     last = \$(this).parent().find('.item').last(),
  956.                                     img = \$(this).find('.img');
  957.                                 itemWidth(img);
  958.                                 \$(last).insertBefore(\$(this));
  959.                                 \$(last).css({marginLeft: -wd, opacity: 0});
  960.                                 \$(this).parent().find('.item').eq(0).animate(
  961.                                     {marginLeft: 0, opacity: 1},
  962.                                     500,
  963.                                     'swing'
  964.                                 );
  965.                             });
  966.                             \$('.arrows', lightbox).on('click', function (e) {
  967.                                 e.stopPropagation();
  968.                                 var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
  969.                                     max = \$(this)
  970.                                         .siblings('.items').find('.item').length,
  971.                                     first = \$(this).siblings('.items').find('.item').first(),
  972.                                     last = \$(this).siblings('.items').find('.item').last(),
  973.                                     isRight = \$(this).hasClass('right'),
  974.                                     marginL = isRight ? -wd : 0,
  975.                                     marginL0 = isRight ? 0: -wd,
  976.                                     opacOn = isRight ? 1 : 0,
  977.                                     opacOff = isRight ? 0 : 1;
  978.                                 if (!isRight){
  979.                                     \$(last).insertBefore(first);
  980.                                     \$(last).css({marginLeft: -wd, opacity: 0});
  981.                                     item++;
  982.                                     if (item == max+1) {item = 1};
  983.                                 } else {
  984.                                     item--;
  985.                                     if (item == 0) {item = max};
  986.                                 };
  987.                                 counter(item, max);
  988.                                 var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
  989.                                 itemWidth(img);
  990.                                 \$(this).siblings('.items').find('.item').eq(1).animate(
  991.                                     {opacity: opacOn},
  992.                                     500,
  993.                                     'swing');
  994.                                 \$(this).siblings('.items').find('.item').eq(0).animate(
  995.                                     {marginLeft: marginL, opacity: 1},
  996.                                     500,
  997.                                     'swing',
  998.                                     function(){
  999.                                         if (isRight){
  1000.                                             \$(this).insertAfter(last);
  1001.                                             \$(this).css({ marginLeft: 0, opacity: 1});
  1002.                                         }
  1003.                                     }
  1004.                                 );
  1005.                             });
  1006.                             if (_ww > 768){
  1007.                                 \$('.div-img-hover-2').hover(function (e) {
  1008.                                     \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  1009.                                     var htext = \$(this).find('.project-content').height();
  1010.                                     if (htext == undefined){htext = 0};
  1011.                                     \$(this).find('.div-hover-2').animate({height : htext+180}, 150);
  1012.                                     \$(this).find('.project-content').css({'visibility': 'visible'});
  1013.                                     \$(this).find('.project-content').animate({opacity: 1}, 150);
  1014.                                 }, function() {
  1015.                                     console.log('down');
  1016.                                     \$(this).find('.div-hover-2').animate({height : 85}, 150);
  1017.                                     \$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
  1018.                                     \$(this).find('.project-content').animate({opacity: 0}, 150, function(){
  1019.                                         \$(this).find('.project-content').css({'visibility': 'hidden'});
  1020.                                     });
  1021.                                 });
  1022.                             } else {
  1023.                                 \$('.div-img-hover-2').on( \"tap\", function( event ) {
  1024.                                     console.log('tap tap');
  1025.                                     var opened = \$(this).find('.div-hover-2').hasClass('open'),
  1026.                                         ht = opened ? 85 : '100%',
  1027.                                         vis = opened ? 0 : 1;
  1028.                                     \$(this).find('.div-hover-2').toggleClass('open');
  1029.                                     \$(this).find('.div-hover-2').animate({height : ht}, 150);
  1030.                                     \$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
  1031.                                 });
  1032.                             }
  1033.                             \$('.div-hover').hover(function (e) {
  1034.                                 \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  1035.                             }, function() {
  1036.                                 \$(this).find('.project-arrow-2').animate({opacity: 0}, 50);
  1037.                             });
  1038.                         })
  1039.                         .catch((error) => {
  1040.                         });
  1041.                 })
  1042.             }
  1043.         }
  1044.         const filter = document.getElementById('filters')
  1045.         const filterElement = document.getElementById('form-search-filter-ajax')
  1046.         filter.addEventListener('click', function (e) {
  1047.             e.preventDefault()
  1048.             filterElement.classList.toggle('show')
  1049.         })
  1050.         const loader = document.querySelector(\"#loading\");
  1051.         function displayLoading() {
  1052.             loader.classList.add(\"display\");
  1053.             // to stop loading after some time
  1054.             setTimeout(() => {
  1055.                 loader.classList.remove(\"display\");
  1056.             }, 5000);
  1057.         }
  1058.         // hiding loading
  1059.         function hideLoading() {
  1060.             loader.classList.remove(\"display\");
  1061.         }
  1062.     </script>
  1063.     <script>
  1064.         const arrowPrev = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
  1065.                                 <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\"/>
  1066.                             </svg>`;
  1067.         const arrowNext= `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
  1068.                             <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\"/>
  1069.                         </svg>`;
  1070.         var countProperties = '";
  1071.         // line 903
  1072.         echo twig_escape_filter($this->envtwig_length_filter($this->env, (isset($context["properties"]) || array_key_exists("properties"$context) ? $context["properties"] : (function () { throw new RuntimeError('Variable "properties" does not exist.'903$this->source); })())), "html"nulltrue);
  1073.         echo "';
  1074.         var loopProp = 1;
  1075.         while (loopProp <= countProperties+3) {
  1076.             \$('.slick-slide-single-'+loopProp).slick({
  1077.                 'slidesToShow': 1,
  1078.                 'prevArrow': `<div class=\"arrow-left square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowPrev}</div>`,
  1079.                 'nextArrow': `<div class=\"arrow-right square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowNext}</div>`
  1080.             });
  1081.             ";
  1082.         // line 923
  1083.         echo "
  1084.             loopProp++;
  1085.         }
  1086.     </script>
  1087. ";
  1088.         
  1089.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  1090.         
  1091.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  1092.     }
  1093.     public function getTemplateName()
  1094.     {
  1095.         return "property.html.twig";
  1096.     }
  1097.     public function isTraitable()
  1098.     {
  1099.         return false;
  1100.     }
  1101.     public function getDebugInfo()
  1102.     {
  1103.         return array (  1200 => 923,  1186 => 903,  731 => 450,  729 => 449,  725 => 446,  723 => 445,  721 => 444,  719 => 443,  717 => 442,  715 => 441,  713 => 440,  711 => 439,  709 => 438,  707 => 437,  705 => 436,  703 => 435,  701 => 434,  699 => 433,  697 => 432,  695 => 431,  691 => 428,  689 => 427,  687 => 426,  685 => 425,  683 => 424,  681 => 423,  679 => 422,  676 => 420,  674 => 419,  672 => 418,  670 => 417,  668 => 416,  666 => 415,  664 => 414,  662 => 413,  659 => 411,  657 => 410,  655 => 409,  653 => 408,  651 => 407,  649 => 406,  647 => 405,  645 => 404,  643 => 403,  641 => 402,  639 => 401,  637 => 400,  635 => 399,  633 => 398,  631 => 397,  629 => 396,  627 => 395,  625 => 394,  623 => 393,  621 => 392,  619 => 391,  617 => 390,  615 => 389,  613 => 388,  611 => 387,  609 => 386,  607 => 385,  605 => 384,  603 => 383,  601 => 382,  599 => 381,  597 => 380,  594 => 378,  592 => 377,  590 => 376,  586 => 373,  584 => 372,  582 => 371,  580 => 370,  578 => 369,  576 => 368,  574 => 367,  572 => 366,  570 => 365,  565 => 361,  561 => 359,  555 => 357,  553 => 356,  543 => 349,  536 => 344,  524 => 295,  520 => 293,  517 => 292,  514 => 291,  511 => 290,  508 => 289,  505 => 288,  503 => 287,  499 => 285,  482 => 282,  478 => 281,  472 => 278,  464 => 274,  459 => 270,  453 => 268,  448 => 265,  436 => 262,  434 => 261,  430 => 260,  425 => 259,  422 => 258,  418 => 255,  415 => 232,  398 => 231,  390 => 225,  383 => 224,  380 => 223,  377 => 222,  374 => 221,  371 => 220,  368 => 219,  365 => 218,  362 => 217,  359 => 216,  357 => 215,  345 => 205,  342 => 201,  335 => 199,  319 => 196,  315 => 195,  309 => 192,  305 => 190,  297 => 187,  294 => 186,  292 => 185,  286 => 183,  281 => 177,  275 => 175,  270 => 172,  258 => 169,  256 => 168,  252 => 167,  247 => 166,  244 => 165,  240 => 162,  233 => 139,  215 => 138,  203 => 128,  165 => 70,  162 => 45,  160 => 44,  153 => 39,  150 => 24,  147 => 23,  144 => 22,  141 => 21,  138 => 20,  136 => 19,  133 => 18,  131 => 17,  118 => 15,  107 => 12,  103 => 10,  97 => 8,  95 => 7,  92 => 6,  89 => 5,  79 => 4,  60 => 3,  37 => 1,);
  1104.     }
  1105.     public function getSourceContext()
  1106.     {
  1107.         return new Source("{% extends 'base.html.twig' %}
  1108. {% block title %}Biens{% endblock %}
  1109. {% block metaDescription %}
  1110.     {% set headerContent = content('Biens', 'Header') %}
  1111.     <meta name=\"description\" content=\"
  1112.     {% if headerContent.content is defined %}
  1113.         {{ headerContent.content|striptags }}
  1114.     {% else %}
  1115.          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.
  1116.     {% endif %}
  1117.     \">
  1118. {% endblock %}
  1119. {% block body %} 
  1120.     {% set headerContent = content('Biens', 'Header') %}
  1121.     {% if headerContent.picture is defined and headerContent.picture is not empty %}
  1122.         {% set backgroundImage = headerContent.picture[0].path %}
  1123.     {% else %}
  1124.         {% set backgroundImage = 'empty' %}
  1125.     {% endif %}
  1126.     {#
  1127.     <header class=\"header-tracol slider-home slider-not-home who-is bottom-right-border position-relative overflow-hidden to-right\" id=\"sliderHeader\"  style=\"background: url({% if backgroundImage == 'empty' %}'https://tracol.lu/uploads/images/residences-61c0b1dd3141b610699350.jpeg'{% else %}'/uploads/images/{{ backgroundImage }}'{% endif %}) center center no-repeat;background-size:cover;\">
  1128.         <div class=\"container-fluid\">
  1129.             <div id=\"header-habiter\" class=\"col-lg-8 mx-auto div-svg-header\">
  1130.                 <div class=\"header-habiter-div2\">
  1131.                     {% if headerContent.name is defined %}
  1132.                         <svg id=\"svg-habiter\" width=\"10\" height=\"16\" 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 10 16\"><defs></defs><desc>Generated with Avocode.</desc><g><g><title>Tracé 76</title><path d=\"M9.08929,0.51465v0h-9.08929v0v14.77002v0l9.08929,-1.93109v0z\" fill=\"#f6a400\" fill-opacity=\"1\"></path></g></g></svg>
  1133.                         <h2 class=\"header-habiter-title col-lg-8\">{{ headerContent.name }}</h2>
  1134.                     {% endif %}
  1135.                 </div>
  1136.             </div>
  1137.         </div>
  1138.     </header>
  1139.     #}
  1140.     <div class=\"container-fluid\">
  1141.         {% set sectionContent1 = content('Biens', 'Section-1') %}
  1142.         {#
  1143.         <div class=\"col-lg-8 mx-auto div-svg-header pre-section\">
  1144.             <div class=\"col-lg-5 property-title\" style=\"font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;\">
  1145.                 <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
  1146.                     <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\"/>
  1147.                 </svg>
  1148.                 {% if properties|length == 0 %}
  1149.                     <h1 class=\"lowercase-title\">Nous n'avons aucun bien correspondant à votre recherche.</h1>
  1150.                 {% elseif properties|length == 1 %}
  1151.                     <h1 class=\"project-title\">{{ properties|length }} bien disponible</h1>
  1152.                 {% else %}
  1153.                     <h1 class=\"project-title\">{{properties|length }} biens disponibles</h1>
  1154.                 {% endif %}
  1155.             </div>
  1156.             <div class=\"separator\"></div>
  1157.             <div class=\"col-lg-6 pre-section-content\">
  1158.                 {% if sectionContent1.content is defined %}
  1159.                     {{ sectionContent1.content|raw }}
  1160.                 {% else %}
  1161.                     Que vous soyez un particulier ou un professionnel, que vous recherchiez un appartement, une maison, un bureau ou un commerce, nos équipes d’experts vous accompagnent tout au long de votre projet immobilier.
  1162.                 {% endif %}
  1163.             </div>
  1164.         </div>
  1165.         #}
  1166.         <section class=\"project\" style=\"margin-bottom: 120px; margin-top: 60px\">
  1167.             
  1168.             <div id=\"button-property-page\"  class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; align-items: center; padding-left: 7px\">
  1169.                 <button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
  1170.                 <button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
  1171.                 <button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
  1172.             </div>
  1173.             <div id=\"button-property-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
  1174.                 <div id=\"flick3\" class=\"flicking-viewport\">
  1175.                     <div class=\"flicking-camera\">
  1176.                         <button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
  1177.                         <button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
  1178.                         <button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
  1179.                     </div>
  1180.                 </div>
  1181.             </div>
  1182.             <div class=\"col-lg-8 mx-auto div-svg-header deactive-tablet\" style=\"display: flex; flex-direction: column; justify-content: center\">
  1183.                 <div class=\"col-md-4\" style=\"margin-top:20px\">
  1184.                     <p>Trier par :</p>
  1185.                     <form>
  1186.                         <select name=\"subfilter\" class=\"form-control with-appearance\" id=\"filterProperties\">
  1187.                             <option value=\"\">Sélectionner</option>
  1188.                             <option value=\"date\">Date de publication</option>
  1189.                             <option value=\"asc\">Prix croissant</option>
  1190.                             <option value=\"desc\">Prix décroissant</option>
  1191.                         </select>
  1192.                     </form>
  1193.                 </div>
  1194.                 {#
  1195.                 <div style=\"display: flex; flex-direction: row; padding-left: 7px; align-items: center; margin-top: 15px;\">
  1196.                     <div id=\"filter-desktop\" class=\"filters-biens\">
  1197.                         {% for key, subType in getTypeProperties() %}
  1198.                             <button data-id=\"{{ key }}\" class=\"select-projet\">{{ subType }} <i class=\"fas fa-times\"></i></button>
  1199.                         {% endfor %}
  1200.                     </div>
  1201.                     <div id=\"filter-mobile\" class=\"col-lg-3 div-form selectSubFilter property\" style=\"display: none\">
  1202.                         <div class=\"input-group dropdown show\">
  1203.                             <label class=\"label-search-filter\" for=\"location\">Filtrer par Type</label>
  1204.                             <input style=\"height: 75px; width: 60px;\" type=\"text\" autocomplete=\"off\" name=\"filters\" id=\"filters\"
  1205.                                    class=\"form-control\" aria-expanded=\"false\">
  1206.                             <ul id=\"form-search-filter-ajax\" class=\"dropdown-menu form-search-filter-ajax\" aria-labelledby=\"\">
  1207.                                 {% for key, subType in getTypeProperties() %}
  1208.                                     <li value=\"{{ key }}\" data-id=\"{{ key }}\" class=\"select-filter\"><i class=\"fas fa-times\"></i>{{ subType }}</li>
  1209.                                 {% endfor %}
  1210.                             </ul>
  1211.                         </div>
  1212.                     </div>
  1213.                 </div>
  1214.                 #}
  1215.                 <div id=\"loading\">
  1216.                     <h1 id=\"showOutput\"></h1>
  1217.                 </div>
  1218.                 <div id=\"properties\" class=\"col-lg-12\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
  1219.                     {% for property in properties %}
  1220.                         <div  class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" data-date=\"{{ property.created_at }}\" data-price=\"{{ property.price.value }}\" style=\"cursor: pointer\">
  1221.                             {#
  1222.                             <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\">
  1223.                                                             {% if property.comments[0].comment is not empty %}
  1224.                                                                 <p class=\"project-content\">
  1225.                                                                     {{ property.comments[0].comment|slice(0, 350) }}</p>
  1226.                                                                 <a href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
  1227.                                                                     <span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  1228.                                                                 </a>
  1229.                                                             {% else %}
  1230.                                                                 <a style=\"margin-top: 180px\" href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
  1231.                                                                     <span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  1232.                                                                 </a>
  1233.                                                             {% endif %}
  1234.                                                         </div>
  1235.                                                         <div class=\"col-lg-3 properties-price-absolute\" style=\"background-color: #c48300; height: 56px;\">
  1236.                                                             <p style=\"font-size: 20px;\" class=\"properties-price\">
  1237.                                                                 {{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value ~  property.price.currency|replace({\"EUR\": \" €\"})  }}
  1238.                                                             </p>
  1239.                                                         </div>
  1240.                             #}
  1241.                             {# <div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ specialPropertyCategory(property.category) }}</span></div> #}
  1242.                             {% if property.pictures is not empty %}
  1243.                                 <div class=\"position-relative properties-slide slick-slide-single-{{ loop.index }}\" style=\"height:265px;\">
  1244.                                     {% for picture in property.pictures|slice(0,3) %}
  1245.                                         {#                                    <img class=\"img-100\" src=\"{{ picture.url }}\">#}
  1246.                                         <div class=\"img\" style=\"background: url('{{ picture.url }}')no-repeat center;background-size:cover;\"  onclick=\"location.href='{{ path('property-detail', {'id': property.id}) }}'\">
  1247.                                         </div>
  1248.                                     {% endfor %}
  1249.                                 </div>
  1250.                             {% else %}
  1251.                                 <div class=\"img\" style=\"background: url('{{ asset('build/Hudson_Ontario2.png') }}')no-repeat center;background-size:cover;\"></div>
  1252.                             {% endif %}
  1253.                             <div class=\"row col-md-12 justify-content-between\">
  1254.                                 <ul class=\"col-md-4 items\">
  1255.                                     <li class=\"item surface\">
  1256.                                         {#
  1257.                                         <img src=\"{{ asset('img/surface.svg') }}\" class=\"surface-logo\">
  1258.                                         #}
  1259.                                          {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
  1260.                                     </li>
  1261.                                     {% if property.bedrooms != 0 %}
  1262.                                         <li class=\"item surface\">
  1263.                                             <img src=\"{{ asset('img/icons/chambre.svg') }}\" alt=\"Icone chambre\" style=\"width:22px;margin-right:10px;margin-top:5px;\"> {{ property.bedrooms }}
  1264.                                         </li>
  1265.                                     {% endif %}
  1266.                                 </ul>
  1267.                                 <div class=\"col-md-8 properties-price d-flex justify-content-end\">
  1268.                                     {{ property.price.value == null ? '<span style=\"font-size: 21px !important;\">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({\"EUR\": \" €\"})  }}
  1269.                                 </div>
  1270.                             </div>
  1271.                             <p class=\"city\">{{ property.city.name }}</p>
  1272.                             <p class=\"project-name\">{{ getTypeProperty(property.type) }}</p>
  1273.                         </div>
  1274.                     {% else %}
  1275.                         <h4>Aucun bien disponible avec ces critères</h4>
  1276.                     {% endfor %}
  1277.                 </div>
  1278.                 {#<div class=\"text-center text-capitalize more-projects\">
  1279.                     <p>AFFICHER PLUS DE BIENS</p>
  1280.                 </div>#}
  1281.             </div>
  1282.         </section>
  1283.         <section class=\"other-properties pt-5 pb-5\" style=\"background:#F7F7F7\">
  1284.             <div class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; margin-top: 30px\">
  1285.                 <div class=\"col-lg-6\">
  1286.                     <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
  1287.                         <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>
  1288.                     </svg>
  1289.                     <h1 class=\"project-title\">
  1290.                         {% if app.request.attributes.get('_route_params')['keyword'] is defined or idCategory is defined %}
  1291.                             {% if (app.request.attributes.get('_route_params')['keyword'] is defined and app.request.attributes.get('_route_params')['keyword'] == 'location') or (idCategory is defined and idCategory == 1) %}
  1292.                                 {% set otherDispo = 'vente' %}
  1293.                             {% else %}
  1294.                                 {% set otherDispo = 'location' %}
  1295.                             {% endif %}
  1296.                         {% else %}
  1297.                             {% set otherDispo = null %}
  1298.                         {% endif %}
  1299.                         NOS biens disponibles<br> {% if otherDispo %}À la <span style=\"color:#F6A400\">{{ otherDispo }}</span>{% endif %}
  1300.                     </h1>
  1301.                 </div>
  1302.             </div>
  1303.             <div  class=\"col-lg-8 mx-auto\">
  1304.                 <div id=\"propertiesOther\" class=\"col-lg-12 mt-5 property-other-list\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
  1305.                     {% for property in otherProperties %}
  1306.                         <div  class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" style=\"cursor: pointer\">
  1307.                             {#
  1308.                             <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\">
  1309.                                                             {% if property.comments[0].comment is not empty %}
  1310.                                                                 <p class=\"project-content\">
  1311.                                                                     {{ property.comments[0].comment|slice(0, 350) }}</p>
  1312.                                                                 <a href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
  1313.                                                                     <span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  1314.                                                                 </a>
  1315.                                                             {% else %}
  1316.                                                                 <a style=\"margin-top: 180px\" href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
  1317.                                                                     <span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  1318.                                                                 </a>
  1319.                                                             {% endif %}
  1320.                                                         </div>
  1321.                                                         <div class=\"col-lg-3 properties-price-absolute\" style=\"background-color: #c48300; height: 56px;\">
  1322.                                                             <p style=\"font-size: 20px;\" class=\"properties-price\">
  1323.                                                                 {{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value ~  property.price.currency|replace({\"EUR\": \" €\"})  }}
  1324.                                                             </p>
  1325.                                                         </div>
  1326.                             #}
  1327.                             {# <div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ specialPropertyCategory(property.category) }}</span></div> #}
  1328.                             {% if property.pictures is not empty %}
  1329.                                 <div class=\"position-relative properties-slide slick-slide-single-{{ loop.index }}\">
  1330.                                     {% for picture in property.pictures|slice(0,3) %}
  1331.                                         {#                                    <img class=\"img-100\" src=\"{{ picture.url }}\">#}
  1332.                                         <div class=\"img\" style=\"background-image: url('{{ picture.url }}')\"  onclick=\"location.href='{{ path('property-detail', {'id': property.id}) }}'\">
  1333.                                         </div>
  1334.                                     {% endfor %}
  1335.                                 </div>
  1336.                             {% else %}
  1337.                                 <div class=\"img\" style=\"background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')\"></div>
  1338.                             {% endif %}
  1339.                             <div class=\"row col-md-12 justify-content-between infos-list\">
  1340.                                 <ul class=\"col-md-4 items\">
  1341.                                     <li class=\"item surface\">
  1342.                                         {# <img src=\"{{ asset('img/surface.svg') }}\" alt=\"icon surface\" class=\"surface-logo\"> #}
  1343.                                         {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
  1344.                                     </li>
  1345.                                 </ul>
  1346.                                 <div class=\"col-md-8 properties-price d-flex justify-content-end\">
  1347.                                     {{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({\"EUR\": \" €\"})  }}
  1348.                                 </div>
  1349.                             </div>
  1350.                             <p class=\"city\">{{ property.city.name }}</p>
  1351.                             <p class=\"project-name\">{{ getTypeProperty(property.type) }}</p>
  1352.                         </div>
  1353.                     {% endfor %}
  1354.                 </div>
  1355.                 {% set paramUrl = app.request.get('keyword') %}
  1356.                 {% if app.request.get('keyword') == 'location' %}
  1357.                     {% set paramUrl = 'vente' %}
  1358.                 {% elseif app.request.get('keyword') == 'vente' %}
  1359.                     {% set paramUrl = 'location' %}
  1360.                 {% endif %}
  1361.                 <div id=\"link-none\" class=\"col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end\">
  1362.                     <div>
  1363.                         <a id=\"link-none-a d-flex\" class=\"property-span-arrow\" href=\"{{ path('properties', {'keyword': paramUrl}) }}\">Découvrir plus
  1364.                             <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 -->
  1365.                         </a>
  1366.                     </div>
  1367.                 </div>
  1368.             </div>
  1369.         </section>
  1370.         {#
  1371.         <section style=\"margin-bottom: 80px; margin-top: 150px;\">
  1372.             <div class=\"col-lg-8 mx-auto div-svg-header\">
  1373.                 {% set sectionContent1 = content('Biens', 'Section-2') %}
  1374.                 <div id=\"habiter-content-id\" class=\"col-lg-6 habiter-content\">
  1375.                     <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
  1376.                         <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\"/>
  1377.                     </svg>
  1378.                     <div class=\"col-lg-7\">
  1379.                         <h1 class=\"habiter-title mb-5\">
  1380.                             {% if sectionContent1.name is defined %}
  1381.                                 {{ sectionContent1.name }}
  1382.                             {% else %}
  1383.                                 HABITER AU LUXEMBOURG
  1384.                             {% endif %}
  1385.                         </h1>
  1386.                         {% if sectionContent1.content is defined %}
  1387.                             {{ sectionContent1.content|raw }}
  1388.                         {% else %}
  1389.                             Vous avez découvert l’appartement ou la maison de vos rêves ? Parfait ! En achetant au Luxembourg vous pouvez bénéficier de plusieurs avantages fiscaux.
  1390.                         {% endif %}
  1391.                     </div>
  1392.                 </div>
  1393.                 <div id=\"display-none-mobile\" class=\"col-lg-6 habiter-img\">
  1394.                     {% if sectionContent1.picture is defined %}
  1395.                         <img id=\"img-property-section\" class=\"img-100\" src=\"/uploads/images/{{ sectionContent1.picture[0].path }}\">
  1396.                     {% else %}
  1397.                         <img id=\"img-property-section\" class=\"img-100\" src=\"https://tracol.lu/uploads/images/millebierg-6194cb6331d44212004123.png\">
  1398.                     {% endif %}
  1399.                 </div>
  1400.             </div>
  1401.             <div id=\"link-none\" class=\"col-lg-8 mx-auto div-svg-header\">
  1402.                 <div style=\"display: flex; align-content: center\">
  1403.                     <a id=\"link-none-a\" class=\"property-span-arrow\" href=\"{{ path('habiter') }}\">Découvrir les avantages
  1404.                         <i class=\"fas fa-arrow-right property-arrow\"></i>
  1405.                     </a>
  1406.                 </div>
  1407.             </div>
  1408.         </section>
  1409.         #}
  1410.     </div>
  1411.     
  1412.     <div id=\"img-property-section\" class=\"container-fluid\" style=\"display: none\">
  1413.         <div id=\"link-ok\" class=\"col-lg-3\" style=\"display: flex; align-content: center\">
  1414.             <a class=\"property-span-arrow\" href=\"{{ path('habiter') }}\">Découvrir les avantages
  1415.                 <i class=\"fas fa-arrow-right property-arrow\"></i>
  1416.             </a>
  1417.         </div>
  1418.         <div class=\"col-lg-6 habiter-img\">
  1419.             {% if sectionContent1.picture is defined %}
  1420.                 <img style=\"padding: 0px;\"  class=\"img-100\" src=\"/uploads/images/{{ sectionContent1.picture[0].path }}\">
  1421.             {% else %}
  1422.                 <img style=\"padding: 0px;\"  class=\"img-100\" src=\"https://tracol.lu/uploads/images/millebierg-6194cb6331d44212004123.png\">
  1423.             {% endif %}
  1424.         </div>
  1425.     </div>
  1426.     <script>
  1427.         {#const slideNextHeader = document.getElementById('slideNextHeader');#}
  1428.         {#const slidePreviousHeader = document.getElementById('slidePreviousHeader');#}
  1429.         {#const propertiesCity = document.getElementsByClassName('properties-city')#}
  1430.         {#const propertiesArea = document.getElementsByClassName('properties-area')#}
  1431.         {#const propertiesReference = document.getElementsByClassName('properties-reference')#}
  1432.         {#const propertiesPrice = document.getElementsByClassName('properties-price')#}
  1433.         {#const propertiesLink = document.getElementsByClassName('properties-link')#}
  1434.         {#const currentFigure = document.getElementsByClassName('current-figure')#}
  1435.         {#const lastFigure = document.getElementsByClassName('last-figure')#}
  1436.         {#let slideHeader = document.getElementById('sliderHeader');#}
  1437.         {#let positionHeader = 0;#}
  1438.         {#let positionThumbHeader = 1;#}
  1439.         {#arraySlidesHeader = [#}
  1440.         {#    {#}
  1441.         {#        'position': 1,#}
  1442.         {#        'img': '{{ saleProperties[0].pictures[0].url }}',#}
  1443.         {#        'city': '{{ saleProperties[0].city.name }}',#}
  1444.         {#        'area': '{{ saleProperties[0].area.value == null ? '' : saleProperties[0].area.value ~ areaConversion(saleProperties[0].area.unit) }}',#}
  1445.         {#        'reference': '{{ saleProperties[0].reference }}',#}
  1446.         {#        'price':  '{{ saleProperties[0].price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : saleProperties[0].price.value ~  saleProperties[0].price.currency|replace({\"EUR\": \" €\"})  }}',#}
  1447.         {#        'link': '{{ path('property-detail', {'id': saleProperties[0].id}) }}',#}
  1448.         {#        'dot': 'dot1'#}
  1449.         {#    },#}
  1450.         {#    {#}
  1451.         {#        'position': 2,#}
  1452.         {#        'img': '{{ saleProperties[1].pictures[0].url }}',#}
  1453.         {#        'city': '{{ saleProperties[1].city.name }}',#}
  1454.         {#        'area': '{{ saleProperties[1].area.value == null ? '' : saleProperties[1].area.value ~ areaConversion(saleProperties[1].area.unit) }}',#}
  1455.         {#        'reference': '{{ saleProperties[1].reference }}',#}
  1456.         {#        'price':  '{{ saleProperties[1].price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : saleProperties[1].price.value ~  saleProperties[1].price.currency|replace({\"EUR\": \" €\"})  }}',#}
  1457.         {#        'link': '{{ path('property-detail', {'id': saleProperties[1].id}) }}',#}
  1458.         {#        'dot': 'dot2'#}
  1459.         {#    },#}
  1460.         {#    {#}
  1461.         {#        'position': 3,#}
  1462.         {#        'img': '{{ saleProperties[2].pictures[0].url }}',#}
  1463.         {#        'city': '{{ saleProperties[2].city.name }}',#}
  1464.         {#        'area': '{{ saleProperties[2].area.value == null ? '' : saleProperties[2].area.value ~ areaConversion(saleProperties[2].area.unit) }}',#}
  1465.         {#        'reference': '{{ saleProperties[2].reference }}',#}
  1466.         {#        'price':  '{{ saleProperties[2].price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : saleProperties[2].price.value ~  saleProperties[2].price.currency|replace({\"EUR\": \" €\"})  }}',#}
  1467.         {#        'link': '{{ path('property-detail', {'id': saleProperties[2].id}) }}',#}
  1468.         {#        'dot': 'dot3'#}
  1469.         {#    },#}
  1470.         {#];#}
  1471.         {#slidePreviousHeader.addEventListener('click', () => {#}
  1472.         {#    if (arraySlidesHeader.length < (positionThumbHeader  + 1)) {#}
  1473.         {#        positionHeader = 0;#}
  1474.         {#        positionThumbHeader = 1;#}
  1475.         {#    } else {#}
  1476.         {#        positionHeader++;#}
  1477.         {#        positionThumbHeader++;#}
  1478.         {#    }#}
  1479.         {#    slideHeader.style.background =  `url(\${arraySlidesHeader[positionHeader].img})no-repeat center`;#}
  1480.         {#    propertiesCity[0].innerHTML = arraySlidesHeader[positionHeader].city#}
  1481.         {#    propertiesArea[0].innerHTML = arraySlidesHeader[positionHeader].area#}
  1482.         {#    propertiesReference[0].innerHTML = arraySlidesHeader[positionHeader].reference#}
  1483.         {#    propertiesPrice[0].innerHTML = arraySlidesHeader[positionHeader].price#}
  1484.         {#    propertiesLink[0].setAttribute('href', arraySlidesHeader[positionHeader].link)#}
  1485.         {#    currentFigure[0].innerHTML = '0'+positionThumbHeader#}
  1486.         {#    slideHeader.style.backgroundSize = `cover`;#}
  1487.         {#});#}
  1488.         {#slideNextHeader.addEventListener('click', () => {#}
  1489.         {#    if (positionThumbHeader === 1) {#}
  1490.         {#        positionHeader = (arraySlidesHeader.length - 1);#}
  1491.         {#        positionThumbHeader = arraySlidesHeader.length;#}
  1492.         {#    } else {#}
  1493.         {#        positionHeader = positionHeader - 1;#}
  1494.         {#        positionThumbHeader = positionThumbHeader - 1;#}
  1495.         {#    }#}
  1496.         {#    slideHeader.style.background =  `url(\${arraySlidesHeader[positionHeader].img})no-repeat center`;#}
  1497.         {#    propertiesCity[0].innerHTML = arraySlidesHeader[positionHeader].city#}
  1498.         {#    propertiesArea[0].innerHTML = arraySlidesHeader[positionHeader].area#}
  1499.         {#    propertiesReference[0].innerHTML = arraySlidesHeader[positionHeader].reference#}
  1500.         {#    propertiesPrice[0].innerHTML = arraySlidesHeader[positionHeader].price#}
  1501.         {#    currentFigure[0].innerHTML = '0'+positionThumbHeader#}
  1502.         {#    slideHeader.style.backgroundSize = `cover`;#}
  1503.         {#});#}
  1504.         const futurProjects = document.getElementById('properties')
  1505.         let buttons = document.getElementsByClassName('projectButton')
  1506.         for (const eElement of buttons) {
  1507.             eElement.addEventListener('click', function (e) {
  1508.                 e.preventDefault()
  1509.                 for (let button of buttons) {
  1510.                     if (button.classList.contains('all')){
  1511.                         button.classList.remove('all')
  1512.                         button.classList.add('come')
  1513.                         button.querySelector('span').classList.replace('span-all', 'span-projects')
  1514.                     }
  1515.                 }
  1516.                 eElement.classList.remove('come')
  1517.                 eElement.classList.add('all')
  1518.                 eElement.querySelector('span').classList.replace('span-projects', 'span-all')
  1519.                 fetch('properties/display/'+this.dataset.id, {
  1520.                     method: 'GET',
  1521.                 })
  1522.                     .then(response => response.json())
  1523.                     .then(data => {
  1524.                         futurProjects.innerHTML = ''
  1525.                         futurProjects.innerHTML = data.data
  1526.                         _ww = \$(window).width();
  1527.                         var lightbox = \$('.lightbox'),
  1528.                             item = 0;
  1529.                         \$('.lightbox-on').click(function(e){
  1530.                             e.stopPropagation();
  1531.                             item = 0;
  1532.                             console.log('click btn');
  1533.                             var id = \$(this).attr('data-id'),
  1534.                                 max = 0;
  1535.                             \$('#'+id).toggle();
  1536.                             \$('#'+id).animate({opacity: 1}, 300);
  1537.                             \$('#'+id).find('img').each(function( i ) {
  1538.                                 //console.log('h : '+\$(this).height());
  1539.                                 //console.log('w : '+\$(this).width());
  1540.                                 max = i;
  1541.                                 item = 1;
  1542.                                 counter(item, max+1);
  1543.                                 itemWidth(\$(this));
  1544.                             });
  1545.                         });
  1546.                         lightbox.click(function(e) {
  1547.                             e.stopPropagation();
  1548.                             \$(this).animate({opacity: 0}, 300, function(){
  1549.                                 \$(this).toggle();
  1550.                             });
  1551.                         });
  1552.                         \$('.closer').on('click', function (e) {
  1553.                             e.stopPropagation();
  1554.                             \$(this).parent().animate(
  1555.                                 {opacity: 0},
  1556.                                 300,
  1557.                                 function(){
  1558.                                     \$(this).toggle();
  1559.                                 }
  1560.                             );
  1561.                         });
  1562.                         function itemWidth(img){
  1563.                             img.closest('.items').width(img.width());
  1564.                         }
  1565.                         function counter(item, max){
  1566.                             \$('.counter').text(item + ' / ' + max);
  1567.                         }
  1568.                         \$('.item', lightbox).on('click, swipeleft', function (e) {
  1569.                             var wd = \$(this).width(),
  1570.                                 last = \$(this).parent().find('.item').last(),
  1571.                                 img = \$(this).find('.img');
  1572.                             itemWidth(img);
  1573.                             \$(this).animate(
  1574.                                 {marginLeft: -wd, opacity: 0},
  1575.                                 500,
  1576.                                 'swing',
  1577.                                 function(){
  1578.                                     \$(this).insertAfter(last);
  1579.                                     \$(this).css({marginLeft: 0, opacity: 1});
  1580.                                 }
  1581.                             );
  1582.                         });
  1583.                         \$('.item', lightbox).on('swiperight', function (e) {
  1584.                             var wd = \$(this).width(),
  1585.                                 first = \$(this).parent().find('.item').first(),
  1586.                                 last = \$(this).parent().find('.item').last(),
  1587.                                 img = \$(this).find('.img');
  1588.                             itemWidth(img);
  1589.                             \$(last).insertBefore(\$(this));
  1590.                             \$(last).css({marginLeft: -wd, opacity: 0});
  1591.                             \$(this).parent().find('.item').eq(0).animate(
  1592.                                 {marginLeft: 0, opacity: 1},
  1593.                                 500,
  1594.                                 'swing'
  1595.                             );
  1596.                         });
  1597.                         \$('.arrows', lightbox).on('click', function (e) {
  1598.                             e.stopPropagation();
  1599.                             var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
  1600.                                 max = \$(this)
  1601.                                     .siblings('.items').find('.item').length,
  1602.                                 first = \$(this).siblings('.items').find('.item').first(),
  1603.                                 last = \$(this).siblings('.items').find('.item').last(),
  1604.                                 isRight = \$(this).hasClass('right'),
  1605.                                 marginL = isRight ? -wd : 0,
  1606.                                 marginL0 = isRight ? 0: -wd,
  1607.                                 opacOn = isRight ? 1 : 0,
  1608.                                 opacOff = isRight ? 0 : 1;
  1609.                             if (!isRight){
  1610.                                 \$(last).insertBefore(first);
  1611.                                 \$(last).css({marginLeft: -wd, opacity: 0});
  1612.                                 item++;
  1613.                                 if (item == max+1) {item = 1};
  1614.                             } else {
  1615.                                 item--;
  1616.                                 if (item == 0) {item = max};
  1617.                             };
  1618.                             counter(item, max);
  1619.                             var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
  1620.                             itemWidth(img);
  1621.                             \$(this).siblings('.items').find('.item').eq(1).animate(
  1622.                                 {opacity: opacOn},
  1623.                                 500,
  1624.                                 'swing');
  1625.                             \$(this).siblings('.items').find('.item').eq(0).animate(
  1626.                                 {marginLeft: marginL, opacity: 1},
  1627.                                 500,
  1628.                                 'swing',
  1629.                                 function(){
  1630.                                     if (isRight){
  1631.                                         \$(this).insertAfter(last);
  1632.                                         \$(this).css({ marginLeft: 0, opacity: 1});
  1633.                                     }
  1634.                                 }
  1635.                             );
  1636.                         });
  1637.                         if (_ww > 768){
  1638.                             \$('.div-img-hover-2').hover(function (e) {
  1639.                                 \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  1640.                                 var htext = \$(this).find('.project-content').height();
  1641.                                 if (htext == undefined){htext = 0};
  1642.                                 \$(this).find('.div-hover-2').animate({height : htext+180}, 150);
  1643.                                 \$(this).find('.project-content').css({'visibility': 'visible'});
  1644.                                 \$(this).find('.project-content').animate({opacity: 1}, 150);
  1645.                             }, function() {
  1646.                                 console.log('down');
  1647.                                 \$(this).find('.div-hover-2').animate({height : 85}, 150);
  1648.                                 \$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
  1649.                                 \$(this).find('.project-content').animate({opacity: 0}, 150, function(){
  1650.                                     \$(this).find('.project-content').css({'visibility': 'hidden'});
  1651.                                 });
  1652.                             });
  1653.                         } else {
  1654.                             \$('.div-img-hover-2').on( \"tap\", function( event ) {
  1655.                                 console.log('tap tap');
  1656.                                 var opened = \$(this).find('.div-hover-2').hasClass('open'),
  1657.                                     ht = opened ? 85 : '100%',
  1658.                                     vis = opened ? 0 : 1;
  1659.                                 \$(this).find('.div-hover-2').toggleClass('open');
  1660.                                 \$(this).find('.div-hover-2').animate({height : ht}, 150);
  1661.                                 \$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
  1662.                             });
  1663.                         }
  1664.                     })
  1665.                     .catch((error) => {
  1666.                         console.error('Error:', error);
  1667.                     });
  1668.             })
  1669.         }
  1670.         if (window.matchMedia(\"(max-width: 768px)\").matches) {
  1671.             new Flicking(\"#flick3\", {
  1672.                 moveType: \"freeScroll\",
  1673.                 bound: true
  1674.             });
  1675.         }
  1676.         if (window.matchMedia(\"(max-width: 768px)\").matches) {
  1677.             const test = document.getElementsByClassName('select-filter')
  1678.             for (const testElement of test) {
  1679.                 testElement.addEventListener('click', function (e) {
  1680.                     e.preventDefault()
  1681.                     testElement.classList.toggle('select-projet-active')
  1682.                     const infos = document.querySelector('.projectButton.all')
  1683.                     const dataId = []
  1684.                     const tests = document.querySelectorAll('.select-filter.select-projet-active')
  1685.                     for (const test1 of tests) {
  1686.                         dataId.push(parseFloat(test1.dataset.id))
  1687.                     }
  1688.                     fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
  1689.                         method: 'GET',
  1690.                     })
  1691.                         .then(response => response.json())
  1692.                         .then(data => {
  1693.                             futurProjects.innerHTML = data.data
  1694.                         })
  1695.                         .catch((error) => {
  1696.                             console.error('Error:', error);
  1697.                         });
  1698.                 })
  1699.             }
  1700.         } else {
  1701.             const test = document.getElementsByClassName('select-projet')
  1702.             const textOutput = document.querySelector(\"#showOutput\");
  1703.             for (const testElement of test) {
  1704.                 testElement.addEventListener('click', function (e) {
  1705.                     displayLoading()
  1706.                     e.preventDefault()
  1707.                     testElement.classList.toggle('select-projet-active')
  1708.                     const infos = document.querySelector('.projectButton.all')
  1709.                     const dataId = []
  1710.                     const tests = document.querySelectorAll('.select-projet.select-projet-active')
  1711.                     for (const test1 of tests) {
  1712.                         dataId.push(parseFloat(test1.dataset.id))
  1713.                     }
  1714.                     fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
  1715.                         method: 'GET'
  1716.                     })
  1717.                         .then(response => response.json())
  1718.                         .then(data => {
  1719.                             hideLoading()
  1720.                             futurProjects.innerHTML = data.data
  1721.                             _ww = \$(window).width();
  1722.                             var lightbox = \$('.lightbox'),
  1723.                                 item = 0;
  1724.                             \$('.lightbox-on').click(function(e){
  1725.                                 e.stopPropagation();
  1726.                                 item = 0;
  1727.                                 console.log('click btn');
  1728.                                 var id = \$(this).attr('data-id'),
  1729.                                     max = 0;
  1730.                                 \$('#'+id).toggle();
  1731.                                 \$('#'+id).animate({opacity: 1}, 300);
  1732.                                 \$('#'+id).find('img').each(function( i ) {
  1733.                                     //console.log('h : '+\$(this).height());
  1734.                                     //console.log('w : '+\$(this).width());
  1735.                                     max = i;
  1736.                                     item = 1;
  1737.                                     counter(item, max+1);
  1738.                                     itemWidth(\$(this));
  1739.                                 });
  1740.                             });
  1741.                             lightbox.click(function(e) {
  1742.                                 e.stopPropagation();
  1743.                                 \$(this).animate({opacity: 0}, 300, function(){
  1744.                                     \$(this).toggle();
  1745.                                 });
  1746.                             });
  1747.                             \$('.closer').on('click', function (e) {
  1748.                                 e.stopPropagation();
  1749.                                 \$(this).parent().animate(
  1750.                                     {opacity: 0},
  1751.                                     300,
  1752.                                     function(){
  1753.                                         \$(this).toggle();
  1754.                                     }
  1755.                                 );
  1756.                             });
  1757.                             function itemWidth(img){
  1758.                                 img.closest('.items').width(img.width());
  1759.                             }
  1760.                             function counter(item, max){
  1761.                                 \$('.counter').text(item + ' / ' + max);
  1762.                             }
  1763.                             \$('.item', lightbox).on('click, swipeleft', function (e) {
  1764.                                 var wd = \$(this).width(),
  1765.                                     last = \$(this).parent().find('.item').last(),
  1766.                                     img = \$(this).find('.img');
  1767.                                 itemWidth(img);
  1768.                                 \$(this).animate(
  1769.                                     {marginLeft: -wd, opacity: 0},
  1770.                                     500,
  1771.                                     'swing',
  1772.                                     function(){
  1773.                                         \$(this).insertAfter(last);
  1774.                                         \$(this).css({marginLeft: 0, opacity: 1});
  1775.                                     }
  1776.                                 );
  1777.                             });
  1778.                             \$('.item', lightbox).on('swiperight', function (e) {
  1779.                                 var wd = \$(this).width(),
  1780.                                     first = \$(this).parent().find('.item').first(),
  1781.                                     last = \$(this).parent().find('.item').last(),
  1782.                                     img = \$(this).find('.img');
  1783.                                 itemWidth(img);
  1784.                                 \$(last).insertBefore(\$(this));
  1785.                                 \$(last).css({marginLeft: -wd, opacity: 0});
  1786.                                 \$(this).parent().find('.item').eq(0).animate(
  1787.                                     {marginLeft: 0, opacity: 1},
  1788.                                     500,
  1789.                                     'swing'
  1790.                                 );
  1791.                             });
  1792.                             \$('.arrows', lightbox).on('click', function (e) {
  1793.                                 e.stopPropagation();
  1794.                                 var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
  1795.                                     max = \$(this)
  1796.                                         .siblings('.items').find('.item').length,
  1797.                                     first = \$(this).siblings('.items').find('.item').first(),
  1798.                                     last = \$(this).siblings('.items').find('.item').last(),
  1799.                                     isRight = \$(this).hasClass('right'),
  1800.                                     marginL = isRight ? -wd : 0,
  1801.                                     marginL0 = isRight ? 0: -wd,
  1802.                                     opacOn = isRight ? 1 : 0,
  1803.                                     opacOff = isRight ? 0 : 1;
  1804.                                 if (!isRight){
  1805.                                     \$(last).insertBefore(first);
  1806.                                     \$(last).css({marginLeft: -wd, opacity: 0});
  1807.                                     item++;
  1808.                                     if (item == max+1) {item = 1};
  1809.                                 } else {
  1810.                                     item--;
  1811.                                     if (item == 0) {item = max};
  1812.                                 };
  1813.                                 counter(item, max);
  1814.                                 var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
  1815.                                 itemWidth(img);
  1816.                                 \$(this).siblings('.items').find('.item').eq(1).animate(
  1817.                                     {opacity: opacOn},
  1818.                                     500,
  1819.                                     'swing');
  1820.                                 \$(this).siblings('.items').find('.item').eq(0).animate(
  1821.                                     {marginLeft: marginL, opacity: 1},
  1822.                                     500,
  1823.                                     'swing',
  1824.                                     function(){
  1825.                                         if (isRight){
  1826.                                             \$(this).insertAfter(last);
  1827.                                             \$(this).css({ marginLeft: 0, opacity: 1});
  1828.                                         }
  1829.                                     }
  1830.                                 );
  1831.                             });
  1832.                             if (_ww > 768){
  1833.                                 \$('.div-img-hover-2').hover(function (e) {
  1834.                                     \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  1835.                                     var htext = \$(this).find('.project-content').height();
  1836.                                     if (htext == undefined){htext = 0};
  1837.                                     \$(this).find('.div-hover-2').animate({height : htext+180}, 150);
  1838.                                     \$(this).find('.project-content').css({'visibility': 'visible'});
  1839.                                     \$(this).find('.project-content').animate({opacity: 1}, 150);
  1840.                                 }, function() {
  1841.                                     console.log('down');
  1842.                                     \$(this).find('.div-hover-2').animate({height : 85}, 150);
  1843.                                     \$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
  1844.                                     \$(this).find('.project-content').animate({opacity: 0}, 150, function(){
  1845.                                         \$(this).find('.project-content').css({'visibility': 'hidden'});
  1846.                                     });
  1847.                                 });
  1848.                             } else {
  1849.                                 \$('.div-img-hover-2').on( \"tap\", function( event ) {
  1850.                                     console.log('tap tap');
  1851.                                     var opened = \$(this).find('.div-hover-2').hasClass('open'),
  1852.                                         ht = opened ? 85 : '100%',
  1853.                                         vis = opened ? 0 : 1;
  1854.                                     \$(this).find('.div-hover-2').toggleClass('open');
  1855.                                     \$(this).find('.div-hover-2').animate({height : ht}, 150);
  1856.                                     \$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
  1857.                                 });
  1858.                             }
  1859.                             \$('.div-hover').hover(function (e) {
  1860.                                 \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  1861.                             }, function() {
  1862.                                 \$(this).find('.project-arrow-2').animate({opacity: 0}, 50);
  1863.                             });
  1864.                         })
  1865.                         .catch((error) => {
  1866.                         });
  1867.                 })
  1868.             }
  1869.         }
  1870.         const filter = document.getElementById('filters')
  1871.         const filterElement = document.getElementById('form-search-filter-ajax')
  1872.         filter.addEventListener('click', function (e) {
  1873.             e.preventDefault()
  1874.             filterElement.classList.toggle('show')
  1875.         })
  1876.         const loader = document.querySelector(\"#loading\");
  1877.         function displayLoading() {
  1878.             loader.classList.add(\"display\");
  1879.             // to stop loading after some time
  1880.             setTimeout(() => {
  1881.                 loader.classList.remove(\"display\");
  1882.             }, 5000);
  1883.         }
  1884.         // hiding loading
  1885.         function hideLoading() {
  1886.             loader.classList.remove(\"display\");
  1887.         }
  1888.     </script>
  1889.     <script>
  1890.         const arrowPrev = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
  1891.                                 <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\"/>
  1892.                             </svg>`;
  1893.         const arrowNext= `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
  1894.                             <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\"/>
  1895.                         </svg>`;
  1896.         var countProperties = '{{ properties|length }}';
  1897.         var loopProp = 1;
  1898.         while (loopProp <= countProperties+3) {
  1899.             \$('.slick-slide-single-'+loopProp).slick({
  1900.                 'slidesToShow': 1,
  1901.                 'prevArrow': `<div class=\"arrow-left square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowPrev}</div>`,
  1902.                 'nextArrow': `<div class=\"arrow-right square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowNext}</div>`
  1903.             });
  1904.             {#
  1905.             if (window.innerWidth > 768) {
  1906.                 \$('.slick-slide-single-'+loopProp).slick({
  1907.                     'slidesToShow': 1,
  1908.                     'prevArrow': `<div class=\"arrow-left square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowPrev}</div>`,
  1909.                     'nextArrow': `<div class=\"arrow-right square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowNext}</div>`
  1910.                 });
  1911.             }
  1912.             #}
  1913.             loopProp++;
  1914.         }
  1915.     </script>
  1916. {% endblock %}
  1917. ""property.html.twig""/home/jumo/sites/sym/tracol/templates/property.html.twig");
  1918.     }
  1919. }