<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* property.html.twig */
class __TwigTemplate_03567e1563397c803ab2dbed3b4ad14b7e236c21c538fd46adc5ae424dd6c9c5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "property.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "property.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "property.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo "Biens";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
echo "
";
// line 7
$context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Biens", "Header");
// line 8
echo "
";
// line 9
if ((twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "picture", [], "any", true, true, false, 9) && !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.', 9, $this->source); })()), "picture", [], "any", false, false, false, 9)))) {
// line 10
echo " ";
$context["backgroundImage"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 10, $this->source); })()), "picture", [], "any", false, false, false, 10), 0, [], "array", false, false, false, 10), "path", [], "any", false, false, false, 10);
// line 11
echo " ";
} else {
// line 12
echo " ";
$context["backgroundImage"] = "empty";
// line 13
echo " ";
}
// line 14
echo "
";
// line 29
echo "
<div class=\"container-fluid\">
";
// line 34
$context["sectionContent1"] = $this->extensions['App\Twig\ContentExtension']->Content("Biens", "Section-1");
// line 35
echo "
";
// line 60
echo "
<section class=\"project\" style=\"margin-bottom: 120px; margin-top: 60px\">
<div id=\"button-property-page\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; align-items: center; padding-left: 7px\">
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
<button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
</div>
<div id=\"button-property-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
<div id=\"flick3\" class=\"flicking-viewport\">
<div class=\"flicking-camera\">
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
<button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
</div>
</div>
</div>
<div class=\"col-lg-8 mx-auto div-svg-header deactive-tablet\" style=\"display: flex; flex-direction: column; justify-content: center\">
";
// line 104
echo "
<div id=\"loading\">
<h1 id=\"showOutput\"></h1>
</div>
<div id=\"properties\" class=\"col-lg-12 mt-5\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
";
// line 113
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["properties"]) || array_key_exists("properties", $context) ? $context["properties"] : (function () { throw new RuntimeError('Variable "properties" does not exist.', 113, $this->source); })()));
$context['_iterated'] = false;
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["property"]) {
// line 114
echo " <div class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" style=\"cursor: pointer\">
";
// line 137
echo "
";
// line 140
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["property"], "pictures", [], "any", false, false, false, 140))) {
// line 141
echo " <div class=\"position-relative properties-slide slick-slide-single-";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 141), "html", null, true);
echo "\" style=\"height:300px;\">
";
// line 142
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["property"], "pictures", [], "any", false, false, false, 142), 0, 3));
foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
// line 143
echo " ";
// line 144
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 144), "html", null, true);
echo "')\" onclick=\"location.href='";
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", false, false, false, 144)]), "html", null, true);
echo "'\">
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 147
echo " </div>
";
} else {
// line 150
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html", null, true);
echo "')\"></div>
";
}
// line 152
echo " <div class=\"row col-md-12 justify-content-between\">
<ul class=\"col-md-4 items\">
<li class=\"item surface\">
<img src=\"";
// line 155
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/surface.svg"), "html", null, true);
echo "\" class=\"surface-logo\"> ";
(((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "area", [], "any", false, false, false, 155), "value", [], "any", false, false, false, 155), null))) ? (print ("")) : (print (twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "area", [], "any", false, false, false, 155), "value", [], "any", false, false, false, 155) . $this->extensions['App\Twig\ContentExtension']->areaConversion(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "area", [], "any", false, false, false, 155), "unit", [], "any", false, false, false, 155))), "html", null, true))));
echo "
</li>
</ul>
<div class=\"col-md-8 properties-price d-flex justify-content-end\">
";
// line 159
(((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "price", [], "any", false, false, false, 159), "value", [], "any", false, false, false, 159), null))) ? (print ("<span style=\"font-size: 14px !important;\">sur demande</span>")) : (print (twig_escape_filter($this->env, (twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "price", [], "any", false, false, false, 159), "value", [], "any", false, false, false, 159), 2, ",", " ") . twig_replace_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "price", [], "any", false, false, false, 159), "currency", [], "any", false, false, false, 159), ["EUR" => " €"])), "html", null, true))));
echo "
</div>
</div>
<p class=\"city\">";
// line 162
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "city", [], "any", false, false, false, 162), "name", [], "any", false, false, false, 162), "html", null, true);
echo "</p>
<p class=\"project-name\">";
// line 163
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["property"], "reference", [], "any", false, false, false, 163), "html", null, true);
echo "</p>
</div>
";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 166
echo " <h4>Aucun bien disponible avec ces critères</h4>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['property'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 168
echo " </div>
";
// line 172
echo " </div>
</section>
<section class=\"other-properties pt-5 pb-5\" style=\"background:#F7F7F7\">
<div class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; margin-top: 30px\">
<div class=\"col-lg-6\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
<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>
</svg>
<h1 class=\"project-title\">
";
// line 182
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 182), "attributes", [], "any", false, true, false, 182), "get", [0 => "_route_params"], "method", false, true, false, 182), "keyword", [], "array", true, true, false, 182)) {
// line 183
echo " ";
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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.', 183, $this->source); })()), "request", [], "any", false, false, false, 183), "attributes", [], "any", false, false, false, 183), "get", [0 => "_route_params"], "method", false, false, false, 183), "keyword", [], "array", false, false, false, 183), "location"))) {
// line 184
echo " ";
$context["otherDispo"] = "vente";
// line 185
echo " ";
} else {
// line 186
echo " ";
$context["otherDispo"] = "location";
// line 187
echo " ";
}
// line 188
echo " ";
} else {
// line 189
echo " ";
$context["otherDispo"] = null;
// line 190
echo " ";
}
// line 191
echo " NOS biens disponibles<br> ";
if ((isset($context["otherDispo"]) || array_key_exists("otherDispo", $context) ? $context["otherDispo"] : (function () { throw new RuntimeError('Variable "otherDispo" does not exist.', 191, $this->source); })())) {
echo "À la <span style=\"color:#F6A400\">";
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.', 191, $this->source); })()), "html", null, true);
echo "</span>";
}
// line 192
echo " </h1>
</div>
</div>
<div class=\"col-lg-8 mx-auto\">
<div id=\"propertiesOther\" class=\"col-lg-12 mt-5 property-other-list\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
";
// line 198
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["otherProperties"]) || array_key_exists("otherProperties", $context) ? $context["otherProperties"] : (function () { throw new RuntimeError('Variable "otherProperties" does not exist.', 198, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["property"]) {
// line 199
echo " <div class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" style=\"cursor: pointer\">
";
// line 222
echo "
";
// line 225
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["property"], "pictures", [], "any", false, false, false, 225))) {
// line 226
echo " <div class=\"position-relative properties-slide slick-slide-single-";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 226), "html", null, true);
echo "\">
";
// line 227
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["property"], "pictures", [], "any", false, false, false, 227), 0, 3));
foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
// line 228
echo " ";
// line 229
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 229), "html", null, true);
echo "')\" onclick=\"location.href='";
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", false, false, false, 229)]), "html", null, true);
echo "'\">
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 232
echo " </div>
";
} else {
// line 235
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html", null, true);
echo "')\"></div>
";
}
// line 237
echo " <div class=\"row col-md-12 justify-content-between infos-list\">
<ul class=\"col-md-4 items\">
<li class=\"item surface\">
<img src=\"";
// line 240
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/surface.svg"), "html", null, true);
echo "\" class=\"surface-logo\"> ";
(((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "area", [], "any", false, false, false, 240), "value", [], "any", false, false, false, 240), null))) ? (print ("")) : (print (twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "area", [], "any", false, false, false, 240), "value", [], "any", false, false, false, 240) . $this->extensions['App\Twig\ContentExtension']->areaConversion(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "area", [], "any", false, false, false, 240), "unit", [], "any", false, false, false, 240))), "html", null, true))));
echo "
</li>
</ul>
<div class=\"col-md-8 properties-price d-flex justify-content-end\">
";
// line 244
(((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "price", [], "any", false, false, false, 244), "value", [], "any", false, false, false, 244), null))) ? (print ("<span style=\"font-size: 14px !important;\">sur demande</span>")) : (print (twig_escape_filter($this->env, (twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "price", [], "any", false, false, false, 244), "value", [], "any", false, false, false, 244), 2, ",", " ") . twig_replace_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "price", [], "any", false, false, false, 244), "currency", [], "any", false, false, false, 244), ["EUR" => " €"])), "html", null, true))));
echo "
</div>
</div>
<p class=\"city\">";
// line 247
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "city", [], "any", false, false, false, 247), "name", [], "any", false, false, false, 247), "html", null, true);
echo "</p>
<p class=\"project-name\">";
// line 248
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["property"], "reference", [], "any", false, false, false, 248), "html", null, true);
echo "</p>
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['property'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 251
echo " </div>
";
// line 253
$context["paramUrl"] = twig_get_attribute($this->env, $this->source, twig_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.', 253, $this->source); })()), "request", [], "any", false, false, false, 253), "get", [0 => "keyword"], "method", false, false, false, 253);
// line 254
echo " ";
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_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.', 254, $this->source); })()), "request", [], "any", false, false, false, 254), "get", [0 => "keyword"], "method", false, false, false, 254), "location"))) {
// line 255
echo " ";
$context["paramUrl"] = "vente";
// line 256
echo " ";
} elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_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.', 256, $this->source); })()), "request", [], "any", false, false, false, 256), "get", [0 => "keyword"], "method", false, false, false, 256), "vente"))) {
// line 257
echo " ";
$context["paramUrl"] = "location";
// line 258
echo " ";
}
// line 259
echo " <div id=\"link-none\" class=\"col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end\">
<div>
<a id=\"link-none-a d-flex\" class=\"property-span-arrow\" href=\"";
// line 261
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.', 261, $this->source); })())]), "html", null, true);
echo "\">Découvrir plus
<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 -->
</a>
</div>
</div>
</div>
</section>
";
// line 310
echo "
</div>
<div id=\"img-property-section\" class=\"container-fluid\" style=\"display: none\">
<div id=\"link-ok\" class=\"col-lg-3\" style=\"display: flex; align-content: center\">
<a class=\"property-span-arrow\" href=\"";
// line 314
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("habiter");
echo "\">Découvrir les avantages
<i class=\"fas fa-arrow-right property-arrow\"></i>
</a>
</div>
<div class=\"col-lg-6 habiter-img\">
";
// line 320
if (twig_get_attribute($this->env, $this->source, ($context["sectionContent1"] ?? null), "picture", [], "any", true, true, false, 320)) {
// line 321
echo " <img style=\"padding: 0px;\" class=\"img-100\" src=\"/uploads/images/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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.', 321, $this->source); })()), "picture", [], "any", false, false, false, 321), 0, [], "array", false, false, false, 321), "path", [], "any", false, false, false, 321), "html", null, true);
echo "\">
";
} else {
// line 323
echo " <img style=\"padding: 0px;\" class=\"img-100\" src=\"https://tracol.lu/uploads/images/millebierg-6194cb6331d44212004123.png\">
";
}
// line 325
echo " </div>
</div>
<script>
";
// line 329
echo " ";
// line 330
echo " ";
// line 331
echo " ";
// line 332
echo " ";
// line 333
echo " ";
// line 334
echo " ";
// line 335
echo " ";
// line 336
echo " ";
// line 337
echo "
";
// line 340
echo " ";
// line 341
echo " ";
// line 342
echo "
";
// line 344
echo " ";
// line 345
echo " ";
// line 346
echo " ";
// line 347
echo " ";
// line 348
echo " ";
// line 349
echo " ";
// line 350
echo " ";
// line 351
echo " ";
// line 352
echo " ";
// line 353
echo " ";
// line 354
echo " ";
// line 355
echo " ";
// line 356
echo " ";
// line 357
echo " ";
// line 358
echo " ";
// line 359
echo " ";
// line 360
echo " ";
// line 361
echo " ";
// line 362
echo " ";
// line 363
echo " ";
// line 364
echo " ";
// line 365
echo " ";
// line 366
echo " ";
// line 367
echo " ";
// line 368
echo " ";
// line 369
echo " ";
// line 370
echo " ";
// line 371
echo " ";
// line 372
echo " ";
// line 373
echo " ";
// line 374
echo " ";
// line 375
echo "
";
// line 377
echo " ";
// line 378
echo " ";
// line 379
echo " ";
// line 380
echo " ";
// line 381
echo " ";
// line 382
echo " ";
// line 383
echo " ";
// line 384
echo "
";
// line 386
echo " ";
// line 387
echo " ";
// line 388
echo " ";
// line 389
echo " ";
// line 390
echo " ";
// line 391
echo " ";
// line 392
echo "
";
// line 395
echo " ";
// line 396
echo " ";
// line 397
echo " ";
// line 398
echo " ";
// line 399
echo " ";
// line 400
echo " ";
// line 401
echo " ";
// line 402
echo " ";
// line 403
echo " ";
// line 404
echo " ";
// line 405
echo " ";
// line 406
echo " ";
// line 407
echo " ";
// line 408
echo " ";
// line 409
echo " ";
// line 410
echo "
";
// line 413
echo " ";
// line 414
echo "
const futurProjects = document.getElementById('properties')
let buttons = document.getElementsByClassName('projectButton')
for (const eElement of buttons) {
eElement.addEventListener('click', function (e) {
e.preventDefault()
for (let button of buttons) {
if (button.classList.contains('all')){
button.classList.remove('all')
button.classList.add('come')
button.querySelector('span').classList.replace('span-all', 'span-projects')
}
}
eElement.classList.remove('come')
eElement.classList.add('all')
eElement.querySelector('span').classList.replace('span-projects', 'span-all')
fetch('properties/display/'+this.dataset.id, {
method: 'GET',
})
.then(response => response.json())
.then(data => {
futurProjects.innerHTML = ''
futurProjects.innerHTML = data.data
_ww = \$(window).width();
var lightbox = \$('.lightbox'),
item = 0;
\$('.lightbox-on').click(function(e){
e.stopPropagation();
item = 0;
console.log('click btn');
var id = \$(this).attr('data-id'),
max = 0;
\$('#'+id).toggle();
\$('#'+id).animate({opacity: 1}, 300);
\$('#'+id).find('img').each(function( i ) {
//console.log('h : '+\$(this).height());
//console.log('w : '+\$(this).width());
max = i;
item = 1;
counter(item, max+1);
itemWidth(\$(this));
});
});
lightbox.click(function(e) {
e.stopPropagation();
\$(this).animate({opacity: 0}, 300, function(){
\$(this).toggle();
});
});
\$('.closer').on('click', function (e) {
e.stopPropagation();
\$(this).parent().animate(
{opacity: 0},
300,
function(){
\$(this).toggle();
}
);
});
function itemWidth(img){
img.closest('.items').width(img.width());
}
function counter(item, max){
\$('.counter').text(item + ' / ' + max);
}
\$('.item', lightbox).on('click, swipeleft', function (e) {
var wd = \$(this).width(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(this).animate(
{marginLeft: -wd, opacity: 0},
500,
'swing',
function(){
\$(this).insertAfter(last);
\$(this).css({marginLeft: 0, opacity: 1});
}
);
});
\$('.item', lightbox).on('swiperight', function (e) {
var wd = \$(this).width(),
first = \$(this).parent().find('.item').first(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(last).insertBefore(\$(this));
\$(last).css({marginLeft: -wd, opacity: 0});
\$(this).parent().find('.item').eq(0).animate(
{marginLeft: 0, opacity: 1},
500,
'swing'
);
});
\$('.arrows', lightbox).on('click', function (e) {
e.stopPropagation();
var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
max = \$(this)
.siblings('.items').find('.item').length,
first = \$(this).siblings('.items').find('.item').first(),
last = \$(this).siblings('.items').find('.item').last(),
isRight = \$(this).hasClass('right'),
marginL = isRight ? -wd : 0,
marginL0 = isRight ? 0: -wd,
opacOn = isRight ? 1 : 0,
opacOff = isRight ? 0 : 1;
if (!isRight){
\$(last).insertBefore(first);
\$(last).css({marginLeft: -wd, opacity: 0});
item++;
if (item == max+1) {item = 1};
} else {
item--;
if (item == 0) {item = max};
};
counter(item, max);
var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
itemWidth(img);
\$(this).siblings('.items').find('.item').eq(1).animate(
{opacity: opacOn},
500,
'swing');
\$(this).siblings('.items').find('.item').eq(0).animate(
{marginLeft: marginL, opacity: 1},
500,
'swing',
function(){
if (isRight){
\$(this).insertAfter(last);
\$(this).css({ marginLeft: 0, opacity: 1});
}
}
);
});
if (_ww > 768){
\$('.div-img-hover-2').hover(function (e) {
\$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
var htext = \$(this).find('.project-content').height();
if (htext == undefined){htext = 0};
\$(this).find('.div-hover-2').animate({height : htext+180}, 150);
\$(this).find('.project-content').css({'visibility': 'visible'});
\$(this).find('.project-content').animate({opacity: 1}, 150);
}, function() {
console.log('down');
\$(this).find('.div-hover-2').animate({height : 85}, 150);
\$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
\$(this).find('.project-content').animate({opacity: 0}, 150, function(){
\$(this).find('.project-content').css({'visibility': 'hidden'});
});
});
} else {
\$('.div-img-hover-2').on( \"tap\", function( event ) {
console.log('tap tap');
var opened = \$(this).find('.div-hover-2').hasClass('open'),
ht = opened ? 85 : '100%',
vis = opened ? 0 : 1;
\$(this).find('.div-hover-2').toggleClass('open');
\$(this).find('.div-hover-2').animate({height : ht}, 150);
\$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
});
}
})
.catch((error) => {
console.error('Error:', error);
});
})
}
if (window.matchMedia(\"(max-width: 768px)\").matches) {
new Flicking(\"#flick3\", {
moveType: \"freeScroll\",
bound: true
});
}
if (window.matchMedia(\"(max-width: 768px)\").matches) {
const test = document.getElementsByClassName('select-filter')
for (const testElement of test) {
testElement.addEventListener('click', function (e) {
e.preventDefault()
testElement.classList.toggle('select-projet-active')
const infos = document.querySelector('.projectButton.all')
const dataId = []
const tests = document.querySelectorAll('.select-filter.select-projet-active')
for (const test1 of tests) {
dataId.push(parseFloat(test1.dataset.id))
}
fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
method: 'GET',
})
.then(response => response.json())
.then(data => {
futurProjects.innerHTML = data.data
})
.catch((error) => {
console.error('Error:', error);
});
})
}
} else {
const test = document.getElementsByClassName('select-projet')
const textOutput = document.querySelector(\"#showOutput\");
for (const testElement of test) {
testElement.addEventListener('click', function (e) {
displayLoading()
e.preventDefault()
testElement.classList.toggle('select-projet-active')
const infos = document.querySelector('.projectButton.all')
const dataId = []
const tests = document.querySelectorAll('.select-projet.select-projet-active')
for (const test1 of tests) {
dataId.push(parseFloat(test1.dataset.id))
}
fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
method: 'GET'
})
.then(response => response.json())
.then(data => {
hideLoading()
futurProjects.innerHTML = data.data
_ww = \$(window).width();
var lightbox = \$('.lightbox'),
item = 0;
\$('.lightbox-on').click(function(e){
e.stopPropagation();
item = 0;
console.log('click btn');
var id = \$(this).attr('data-id'),
max = 0;
\$('#'+id).toggle();
\$('#'+id).animate({opacity: 1}, 300);
\$('#'+id).find('img').each(function( i ) {
//console.log('h : '+\$(this).height());
//console.log('w : '+\$(this).width());
max = i;
item = 1;
counter(item, max+1);
itemWidth(\$(this));
});
});
lightbox.click(function(e) {
e.stopPropagation();
\$(this).animate({opacity: 0}, 300, function(){
\$(this).toggle();
});
});
\$('.closer').on('click', function (e) {
e.stopPropagation();
\$(this).parent().animate(
{opacity: 0},
300,
function(){
\$(this).toggle();
}
);
});
function itemWidth(img){
img.closest('.items').width(img.width());
}
function counter(item, max){
\$('.counter').text(item + ' / ' + max);
}
\$('.item', lightbox).on('click, swipeleft', function (e) {
var wd = \$(this).width(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(this).animate(
{marginLeft: -wd, opacity: 0},
500,
'swing',
function(){
\$(this).insertAfter(last);
\$(this).css({marginLeft: 0, opacity: 1});
}
);
});
\$('.item', lightbox).on('swiperight', function (e) {
var wd = \$(this).width(),
first = \$(this).parent().find('.item').first(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(last).insertBefore(\$(this));
\$(last).css({marginLeft: -wd, opacity: 0});
\$(this).parent().find('.item').eq(0).animate(
{marginLeft: 0, opacity: 1},
500,
'swing'
);
});
\$('.arrows', lightbox).on('click', function (e) {
e.stopPropagation();
var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
max = \$(this)
.siblings('.items').find('.item').length,
first = \$(this).siblings('.items').find('.item').first(),
last = \$(this).siblings('.items').find('.item').last(),
isRight = \$(this).hasClass('right'),
marginL = isRight ? -wd : 0,
marginL0 = isRight ? 0: -wd,
opacOn = isRight ? 1 : 0,
opacOff = isRight ? 0 : 1;
if (!isRight){
\$(last).insertBefore(first);
\$(last).css({marginLeft: -wd, opacity: 0});
item++;
if (item == max+1) {item = 1};
} else {
item--;
if (item == 0) {item = max};
};
counter(item, max);
var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
itemWidth(img);
\$(this).siblings('.items').find('.item').eq(1).animate(
{opacity: opacOn},
500,
'swing');
\$(this).siblings('.items').find('.item').eq(0).animate(
{marginLeft: marginL, opacity: 1},
500,
'swing',
function(){
if (isRight){
\$(this).insertAfter(last);
\$(this).css({ marginLeft: 0, opacity: 1});
}
}
);
});
if (_ww > 768){
\$('.div-img-hover-2').hover(function (e) {
\$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
var htext = \$(this).find('.project-content').height();
if (htext == undefined){htext = 0};
\$(this).find('.div-hover-2').animate({height : htext+180}, 150);
\$(this).find('.project-content').css({'visibility': 'visible'});
\$(this).find('.project-content').animate({opacity: 1}, 150);
}, function() {
console.log('down');
\$(this).find('.div-hover-2').animate({height : 85}, 150);
\$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
\$(this).find('.project-content').animate({opacity: 0}, 150, function(){
\$(this).find('.project-content').css({'visibility': 'hidden'});
});
});
} else {
\$('.div-img-hover-2').on( \"tap\", function( event ) {
console.log('tap tap');
var opened = \$(this).find('.div-hover-2').hasClass('open'),
ht = opened ? 85 : '100%',
vis = opened ? 0 : 1;
\$(this).find('.div-hover-2').toggleClass('open');
\$(this).find('.div-hover-2').animate({height : ht}, 150);
\$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
});
}
\$('.div-hover').hover(function (e) {
\$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
}, function() {
\$(this).find('.project-arrow-2').animate({opacity: 0}, 50);
});
})
.catch((error) => {
});
})
}
}
const filter = document.getElementById('filters')
const filterElement = document.getElementById('form-search-filter-ajax')
filter.addEventListener('click', function (e) {
e.preventDefault()
filterElement.classList.toggle('show')
})
const loader = document.querySelector(\"#loading\");
function displayLoading() {
loader.classList.add(\"display\");
// to stop loading after some time
setTimeout(() => {
loader.classList.remove(\"display\");
}, 5000);
}
// hiding loading
function hideLoading() {
loader.classList.remove(\"display\");
}
</script>
<script>
const arrowPrev = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
<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\"/>
</svg>`;
const arrowNext= `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
<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\"/>
</svg>`;
var countProperties = '";
// line 867
echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["properties"]) || array_key_exists("properties", $context) ? $context["properties"] : (function () { throw new RuntimeError('Variable "properties" does not exist.', 867, $this->source); })())), "html", null, true);
echo "';
var loopProp = 1;
while (loopProp <= countProperties) {
if (window.innerWidth > 768) {
\$('.slick-slide-single-'+loopProp).slick({
'slidesToShow': 1,
'prevArrow': `<div class=\"arrow-left square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowPrev}</div>`,
'nextArrow': `<div class=\"arrow-right square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowNext}</div>`
});
}
loopProp++;
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "property.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1112 => 867, 657 => 414, 655 => 413, 651 => 410, 649 => 409, 647 => 408, 645 => 407, 643 => 406, 641 => 405, 639 => 404, 637 => 403, 635 => 402, 633 => 401, 631 => 400, 629 => 399, 627 => 398, 625 => 397, 623 => 396, 621 => 395, 617 => 392, 615 => 391, 613 => 390, 611 => 389, 609 => 388, 607 => 387, 605 => 386, 602 => 384, 600 => 383, 598 => 382, 596 => 381, 594 => 380, 592 => 379, 590 => 378, 588 => 377, 585 => 375, 583 => 374, 581 => 373, 579 => 372, 577 => 371, 575 => 370, 573 => 369, 571 => 368, 569 => 367, 567 => 366, 565 => 365, 563 => 364, 561 => 363, 559 => 362, 557 => 361, 555 => 360, 553 => 359, 551 => 358, 549 => 357, 547 => 356, 545 => 355, 543 => 354, 541 => 353, 539 => 352, 537 => 351, 535 => 350, 533 => 349, 531 => 348, 529 => 347, 527 => 346, 525 => 345, 523 => 344, 520 => 342, 518 => 341, 516 => 340, 512 => 337, 510 => 336, 508 => 335, 506 => 334, 504 => 333, 502 => 332, 500 => 331, 498 => 330, 496 => 329, 491 => 325, 487 => 323, 481 => 321, 479 => 320, 470 => 314, 464 => 310, 452 => 261, 448 => 259, 445 => 258, 442 => 257, 439 => 256, 436 => 255, 433 => 254, 431 => 253, 427 => 251, 410 => 248, 406 => 247, 400 => 244, 391 => 240, 386 => 237, 380 => 235, 375 => 232, 363 => 229, 361 => 228, 357 => 227, 352 => 226, 349 => 225, 345 => 222, 342 => 199, 325 => 198, 317 => 192, 310 => 191, 307 => 190, 304 => 189, 301 => 188, 298 => 187, 295 => 186, 292 => 185, 289 => 184, 286 => 183, 284 => 182, 272 => 172, 269 => 168, 262 => 166, 246 => 163, 242 => 162, 236 => 159, 227 => 155, 222 => 152, 216 => 150, 211 => 147, 199 => 144, 197 => 143, 193 => 142, 188 => 141, 185 => 140, 181 => 137, 178 => 114, 160 => 113, 149 => 104, 125 => 60, 122 => 35, 120 => 34, 113 => 29, 110 => 14, 107 => 13, 104 => 12, 101 => 11, 98 => 10, 96 => 9, 93 => 8, 91 => 7, 78 => 5, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}Biens{% endblock %}
{% block body %}
{% set headerContent = content('Biens', 'Header') %}
{% if headerContent.picture is defined and headerContent.picture is not empty %}
{% set backgroundImage = headerContent.picture[0].path %}
{% else %}
{% set backgroundImage = 'empty' %}
{% endif %}
{#
<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;\">
<div class=\"container-fluid\">
<div id=\"header-habiter\" class=\"col-lg-8 mx-auto div-svg-header\">
<div class=\"header-habiter-div2\">
{% if headerContent.name is defined %}
<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>
<h2 class=\"header-habiter-title col-lg-8\">{{ headerContent.name }}</h2>
{% endif %}
</div>
</div>
</div>
</header>
#}
<div class=\"container-fluid\">
{% set sectionContent1 = content('Biens', 'Section-1') %}
{#
<div class=\"col-lg-8 mx-auto div-svg-header pre-section\">
<div class=\"col-lg-5 property-title\" style=\"font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
<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\"/>
</svg>
{% if properties|length == 0 %}
<h1 class=\"lowercase-title\">Nous n'avons aucun bien correspondant à votre recherche.</h1>
{% elseif properties|length == 1 %}
<h1 class=\"project-title\">{{ properties|length }} bien disponible</h1>
{% else %}
<h1 class=\"project-title\">{{properties|length }} biens disponibles</h1>
{% endif %}
</div>
<div class=\"separator\"></div>
<div class=\"col-lg-6 pre-section-content\">
{% if sectionContent1.content is defined %}
{{ sectionContent1.content|raw }}
{% else %}
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.
{% endif %}
</div>
</div>
#}
<section class=\"project\" style=\"margin-bottom: 120px; margin-top: 60px\">
<div id=\"button-property-page\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; align-items: center; padding-left: 7px\">
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
<button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
</div>
<div id=\"button-property-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
<div id=\"flick3\" class=\"flicking-viewport\">
<div class=\"flicking-camera\">
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"sale\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">ACHAT</span></button>
<button data-id=\"rental\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">LOCATION</span></button>
</div>
</div>
</div>
<div class=\"col-lg-8 mx-auto div-svg-header deactive-tablet\" style=\"display: flex; flex-direction: column; justify-content: center\">
{#
<div style=\"display: flex; flex-direction: row; padding-left: 7px; align-items: center; margin-top: 15px;\">
<div id=\"filter-desktop\" class=\"filters-biens\">
{% for key, subType in getTypeProperties() %}
<button data-id=\"{{ key }}\" class=\"select-projet\">{{ subType }} <i class=\"fas fa-times\"></i></button>
{% endfor %}
</div>
<div id=\"filter-mobile\" class=\"col-lg-3 div-form selectSubFilter property\" style=\"display: none\">
<div class=\"input-group dropdown show\">
<label class=\"label-search-filter\" for=\"location\">Filtrer par Type</label>
<input style=\"height: 75px; width: 60px;\" type=\"text\" autocomplete=\"off\" name=\"filters\" id=\"filters\"
class=\"form-control\" aria-expanded=\"false\">
<ul id=\"form-search-filter-ajax\" class=\"dropdown-menu form-search-filter-ajax\" aria-labelledby=\"\">
{% for key, subType in getTypeProperties() %}
<li value=\"{{ key }}\" data-id=\"{{ key }}\" class=\"select-filter\"><i class=\"fas fa-times\"></i>{{ subType }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
#}
<div id=\"loading\">
<h1 id=\"showOutput\"></h1>
</div>
<div id=\"properties\" class=\"col-lg-12 mt-5\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
{% for property in properties %}
<div class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" style=\"cursor: pointer\">
{#
<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\">
{% if property.comments[0].comment is not empty %}
<p class=\"project-content\">
{{ property.comments[0].comment|slice(0, 350) }}</p>
<a href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
<span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
{% else %}
<a style=\"margin-top: 180px\" href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
<span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
{% endif %}
</div>
<div class=\"col-lg-3 properties-price-absolute\" style=\"background-color: #c48300; height: 56px;\">
<p style=\"font-size: 20px;\" class=\"properties-price\">
{{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value ~ property.price.currency|replace({\"EUR\": \" €\"}) }}
</p>
</div>
#}
{# <div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ specialPropertyCategory(property.category) }}</span></div> #}
{% if property.pictures is not empty %}
<div class=\"position-relative properties-slide slick-slide-single-{{ loop.index }}\" style=\"height:300px;\">
{% for picture in property.pictures|slice(0,3) %}
{# <img class=\"img-100\" src=\"{{ picture.url }}\">#}
<div class=\"img\" style=\"background-image: url('{{ picture.url }}')\" onclick=\"location.href='{{ path('property-detail', {'id': property.id}) }}'\">
</div>
{% endfor %}
</div>
{% else %}
<div class=\"img\" style=\"background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')\"></div>
{% endif %}
<div class=\"row col-md-12 justify-content-between\">
<ul class=\"col-md-4 items\">
<li class=\"item surface\">
<img src=\"{{ asset('img/surface.svg') }}\" class=\"surface-logo\"> {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
</li>
</ul>
<div class=\"col-md-8 properties-price d-flex justify-content-end\">
{{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~ property.price.currency|replace({\"EUR\": \" €\"}) }}
</div>
</div>
<p class=\"city\">{{ property.city.name }}</p>
<p class=\"project-name\">{{ property.reference }}</p>
</div>
{% else %}
<h4>Aucun bien disponible avec ces critères</h4>
{% endfor %}
</div>
{#<div class=\"text-center text-capitalize more-projects\">
<p>AFFICHER PLUS DE BIENS</p>
</div>#}
</div>
</section>
<section class=\"other-properties pt-5 pb-5\" style=\"background:#F7F7F7\">
<div class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; margin-top: 30px\">
<div class=\"col-lg-6\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
<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>
</svg>
<h1 class=\"project-title\">
{% if app.request.attributes.get('_route_params')['keyword'] is defined %}
{% if app.request.attributes.get('_route_params')['keyword'] == 'location' %}
{% set otherDispo = 'vente' %}
{% else %}
{% set otherDispo = 'location' %}
{% endif %}
{% else %}
{% set otherDispo = null %}
{% endif %}
NOS biens disponibles<br> {% if otherDispo %}À la <span style=\"color:#F6A400\">{{ otherDispo }}</span>{% endif %}
</h1>
</div>
</div>
<div class=\"col-lg-8 mx-auto\">
<div id=\"propertiesOther\" class=\"col-lg-12 mt-5 property-other-list\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
{% for property in otherProperties %}
<div class=\"col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2\" style=\"cursor: pointer\">
{#
<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\">
{% if property.comments[0].comment is not empty %}
<p class=\"project-content\">
{{ property.comments[0].comment|slice(0, 350) }}</p>
<a href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
<span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
{% else %}
<a style=\"margin-top: 180px\" href=\"{{ path('property-detail', {'id': property.id}) }}\" class=\"project-arrow-2\">
<span class=\"galerry-ref\"></span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
{% endif %}
</div>
<div class=\"col-lg-3 properties-price-absolute\" style=\"background-color: #c48300; height: 56px;\">
<p style=\"font-size: 20px;\" class=\"properties-price\">
{{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value ~ property.price.currency|replace({\"EUR\": \" €\"}) }}
</p>
</div>
#}
{# <div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ specialPropertyCategory(property.category) }}</span></div> #}
{% if property.pictures is not empty %}
<div class=\"position-relative properties-slide slick-slide-single-{{ loop.index }}\">
{% for picture in property.pictures|slice(0,3) %}
{# <img class=\"img-100\" src=\"{{ picture.url }}\">#}
<div class=\"img\" style=\"background-image: url('{{ picture.url }}')\" onclick=\"location.href='{{ path('property-detail', {'id': property.id}) }}'\">
</div>
{% endfor %}
</div>
{% else %}
<div class=\"img\" style=\"background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')\"></div>
{% endif %}
<div class=\"row col-md-12 justify-content-between infos-list\">
<ul class=\"col-md-4 items\">
<li class=\"item surface\">
<img src=\"{{ asset('img/surface.svg') }}\" class=\"surface-logo\"> {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
</li>
</ul>
<div class=\"col-md-8 properties-price d-flex justify-content-end\">
{{ property.price.value == null ? '<span style=\"font-size: 14px !important;\">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~ property.price.currency|replace({\"EUR\": \" €\"}) }}
</div>
</div>
<p class=\"city\">{{ property.city.name }}</p>
<p class=\"project-name\">{{ property.reference }}</p>
</div>
{% endfor %}
</div>
{% set paramUrl = app.request.get('keyword') %}
{% if app.request.get('keyword') == 'location' %}
{% set paramUrl = 'vente' %}
{% elseif app.request.get('keyword') == 'vente' %}
{% set paramUrl = 'location' %}
{% endif %}
<div id=\"link-none\" class=\"col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end\">
<div>
<a id=\"link-none-a d-flex\" class=\"property-span-arrow\" href=\"{{ path('properties', {'keyword': paramUrl}) }}\">Découvrir plus
<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 -->
</a>
</div>
</div>
</div>
</section>
{#
<section style=\"margin-bottom: 80px; margin-top: 150px;\">
<div class=\"col-lg-8 mx-auto div-svg-header\">
{% set sectionContent1 = content('Biens', 'Section-2') %}
<div id=\"habiter-content-id\" class=\"col-lg-6 habiter-content\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
<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\"/>
</svg>
<div class=\"col-lg-7\">
<h1 class=\"habiter-title mb-5\">
{% if sectionContent1.name is defined %}
{{ sectionContent1.name }}
{% else %}
HABITER AU LUXEMBOURG
{% endif %}
</h1>
{% if sectionContent1.content is defined %}
{{ sectionContent1.content|raw }}
{% else %}
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.
{% endif %}
</div>
</div>
<div id=\"display-none-mobile\" class=\"col-lg-6 habiter-img\">
{% if sectionContent1.picture is defined %}
<img id=\"img-property-section\" class=\"img-100\" src=\"/uploads/images/{{ sectionContent1.picture[0].path }}\">
{% else %}
<img id=\"img-property-section\" class=\"img-100\" src=\"https://tracol.lu/uploads/images/millebierg-6194cb6331d44212004123.png\">
{% endif %}
</div>
</div>
<div id=\"link-none\" class=\"col-lg-8 mx-auto div-svg-header\">
<div style=\"display: flex; align-content: center\">
<a id=\"link-none-a\" class=\"property-span-arrow\" href=\"{{ path('habiter') }}\">Découvrir les avantages
<i class=\"fas fa-arrow-right property-arrow\"></i>
</a>
</div>
</div>
</section>
#}
</div>
<div id=\"img-property-section\" class=\"container-fluid\" style=\"display: none\">
<div id=\"link-ok\" class=\"col-lg-3\" style=\"display: flex; align-content: center\">
<a class=\"property-span-arrow\" href=\"{{ path('habiter') }}\">Découvrir les avantages
<i class=\"fas fa-arrow-right property-arrow\"></i>
</a>
</div>
<div class=\"col-lg-6 habiter-img\">
{% if sectionContent1.picture is defined %}
<img style=\"padding: 0px;\" class=\"img-100\" src=\"/uploads/images/{{ sectionContent1.picture[0].path }}\">
{% else %}
<img style=\"padding: 0px;\" class=\"img-100\" src=\"https://tracol.lu/uploads/images/millebierg-6194cb6331d44212004123.png\">
{% endif %}
</div>
</div>
<script>
{#const slideNextHeader = document.getElementById('slideNextHeader');#}
{#const slidePreviousHeader = document.getElementById('slidePreviousHeader');#}
{#const propertiesCity = document.getElementsByClassName('properties-city')#}
{#const propertiesArea = document.getElementsByClassName('properties-area')#}
{#const propertiesReference = document.getElementsByClassName('properties-reference')#}
{#const propertiesPrice = document.getElementsByClassName('properties-price')#}
{#const propertiesLink = document.getElementsByClassName('properties-link')#}
{#const currentFigure = document.getElementsByClassName('current-figure')#}
{#const lastFigure = document.getElementsByClassName('last-figure')#}
{#let slideHeader = document.getElementById('sliderHeader');#}
{#let positionHeader = 0;#}
{#let positionThumbHeader = 1;#}
{#arraySlidesHeader = [#}
{# {#}
{# 'position': 1,#}
{# 'img': '{{ saleProperties[0].pictures[0].url }}',#}
{# 'city': '{{ saleProperties[0].city.name }}',#}
{# 'area': '{{ saleProperties[0].area.value == null ? '' : saleProperties[0].area.value ~ areaConversion(saleProperties[0].area.unit) }}',#}
{# 'reference': '{{ saleProperties[0].reference }}',#}
{# '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\": \" €\"}) }}',#}
{# 'link': '{{ path('property-detail', {'id': saleProperties[0].id}) }}',#}
{# 'dot': 'dot1'#}
{# },#}
{# {#}
{# 'position': 2,#}
{# 'img': '{{ saleProperties[1].pictures[0].url }}',#}
{# 'city': '{{ saleProperties[1].city.name }}',#}
{# 'area': '{{ saleProperties[1].area.value == null ? '' : saleProperties[1].area.value ~ areaConversion(saleProperties[1].area.unit) }}',#}
{# 'reference': '{{ saleProperties[1].reference }}',#}
{# '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\": \" €\"}) }}',#}
{# 'link': '{{ path('property-detail', {'id': saleProperties[1].id}) }}',#}
{# 'dot': 'dot2'#}
{# },#}
{# {#}
{# 'position': 3,#}
{# 'img': '{{ saleProperties[2].pictures[0].url }}',#}
{# 'city': '{{ saleProperties[2].city.name }}',#}
{# 'area': '{{ saleProperties[2].area.value == null ? '' : saleProperties[2].area.value ~ areaConversion(saleProperties[2].area.unit) }}',#}
{# 'reference': '{{ saleProperties[2].reference }}',#}
{# '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\": \" €\"}) }}',#}
{# 'link': '{{ path('property-detail', {'id': saleProperties[2].id}) }}',#}
{# 'dot': 'dot3'#}
{# },#}
{#];#}
{#slidePreviousHeader.addEventListener('click', () => {#}
{# if (arraySlidesHeader.length < (positionThumbHeader + 1)) {#}
{# positionHeader = 0;#}
{# positionThumbHeader = 1;#}
{# } else {#}
{# positionHeader++;#}
{# positionThumbHeader++;#}
{# }#}
{# slideHeader.style.background = `url(\${arraySlidesHeader[positionHeader].img})no-repeat center`;#}
{# propertiesCity[0].innerHTML = arraySlidesHeader[positionHeader].city#}
{# propertiesArea[0].innerHTML = arraySlidesHeader[positionHeader].area#}
{# propertiesReference[0].innerHTML = arraySlidesHeader[positionHeader].reference#}
{# propertiesPrice[0].innerHTML = arraySlidesHeader[positionHeader].price#}
{# propertiesLink[0].setAttribute('href', arraySlidesHeader[positionHeader].link)#}
{# currentFigure[0].innerHTML = '0'+positionThumbHeader#}
{# slideHeader.style.backgroundSize = `cover`;#}
{#});#}
{#slideNextHeader.addEventListener('click', () => {#}
{# if (positionThumbHeader === 1) {#}
{# positionHeader = (arraySlidesHeader.length - 1);#}
{# positionThumbHeader = arraySlidesHeader.length;#}
{# } else {#}
{# positionHeader = positionHeader - 1;#}
{# positionThumbHeader = positionThumbHeader - 1;#}
{# }#}
{# slideHeader.style.background = `url(\${arraySlidesHeader[positionHeader].img})no-repeat center`;#}
{# propertiesCity[0].innerHTML = arraySlidesHeader[positionHeader].city#}
{# propertiesArea[0].innerHTML = arraySlidesHeader[positionHeader].area#}
{# propertiesReference[0].innerHTML = arraySlidesHeader[positionHeader].reference#}
{# propertiesPrice[0].innerHTML = arraySlidesHeader[positionHeader].price#}
{# currentFigure[0].innerHTML = '0'+positionThumbHeader#}
{# slideHeader.style.backgroundSize = `cover`;#}
{#});#}
const futurProjects = document.getElementById('properties')
let buttons = document.getElementsByClassName('projectButton')
for (const eElement of buttons) {
eElement.addEventListener('click', function (e) {
e.preventDefault()
for (let button of buttons) {
if (button.classList.contains('all')){
button.classList.remove('all')
button.classList.add('come')
button.querySelector('span').classList.replace('span-all', 'span-projects')
}
}
eElement.classList.remove('come')
eElement.classList.add('all')
eElement.querySelector('span').classList.replace('span-projects', 'span-all')
fetch('properties/display/'+this.dataset.id, {
method: 'GET',
})
.then(response => response.json())
.then(data => {
futurProjects.innerHTML = ''
futurProjects.innerHTML = data.data
_ww = \$(window).width();
var lightbox = \$('.lightbox'),
item = 0;
\$('.lightbox-on').click(function(e){
e.stopPropagation();
item = 0;
console.log('click btn');
var id = \$(this).attr('data-id'),
max = 0;
\$('#'+id).toggle();
\$('#'+id).animate({opacity: 1}, 300);
\$('#'+id).find('img').each(function( i ) {
//console.log('h : '+\$(this).height());
//console.log('w : '+\$(this).width());
max = i;
item = 1;
counter(item, max+1);
itemWidth(\$(this));
});
});
lightbox.click(function(e) {
e.stopPropagation();
\$(this).animate({opacity: 0}, 300, function(){
\$(this).toggle();
});
});
\$('.closer').on('click', function (e) {
e.stopPropagation();
\$(this).parent().animate(
{opacity: 0},
300,
function(){
\$(this).toggle();
}
);
});
function itemWidth(img){
img.closest('.items').width(img.width());
}
function counter(item, max){
\$('.counter').text(item + ' / ' + max);
}
\$('.item', lightbox).on('click, swipeleft', function (e) {
var wd = \$(this).width(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(this).animate(
{marginLeft: -wd, opacity: 0},
500,
'swing',
function(){
\$(this).insertAfter(last);
\$(this).css({marginLeft: 0, opacity: 1});
}
);
});
\$('.item', lightbox).on('swiperight', function (e) {
var wd = \$(this).width(),
first = \$(this).parent().find('.item').first(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(last).insertBefore(\$(this));
\$(last).css({marginLeft: -wd, opacity: 0});
\$(this).parent().find('.item').eq(0).animate(
{marginLeft: 0, opacity: 1},
500,
'swing'
);
});
\$('.arrows', lightbox).on('click', function (e) {
e.stopPropagation();
var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
max = \$(this)
.siblings('.items').find('.item').length,
first = \$(this).siblings('.items').find('.item').first(),
last = \$(this).siblings('.items').find('.item').last(),
isRight = \$(this).hasClass('right'),
marginL = isRight ? -wd : 0,
marginL0 = isRight ? 0: -wd,
opacOn = isRight ? 1 : 0,
opacOff = isRight ? 0 : 1;
if (!isRight){
\$(last).insertBefore(first);
\$(last).css({marginLeft: -wd, opacity: 0});
item++;
if (item == max+1) {item = 1};
} else {
item--;
if (item == 0) {item = max};
};
counter(item, max);
var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
itemWidth(img);
\$(this).siblings('.items').find('.item').eq(1).animate(
{opacity: opacOn},
500,
'swing');
\$(this).siblings('.items').find('.item').eq(0).animate(
{marginLeft: marginL, opacity: 1},
500,
'swing',
function(){
if (isRight){
\$(this).insertAfter(last);
\$(this).css({ marginLeft: 0, opacity: 1});
}
}
);
});
if (_ww > 768){
\$('.div-img-hover-2').hover(function (e) {
\$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
var htext = \$(this).find('.project-content').height();
if (htext == undefined){htext = 0};
\$(this).find('.div-hover-2').animate({height : htext+180}, 150);
\$(this).find('.project-content').css({'visibility': 'visible'});
\$(this).find('.project-content').animate({opacity: 1}, 150);
}, function() {
console.log('down');
\$(this).find('.div-hover-2').animate({height : 85}, 150);
\$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
\$(this).find('.project-content').animate({opacity: 0}, 150, function(){
\$(this).find('.project-content').css({'visibility': 'hidden'});
});
});
} else {
\$('.div-img-hover-2').on( \"tap\", function( event ) {
console.log('tap tap');
var opened = \$(this).find('.div-hover-2').hasClass('open'),
ht = opened ? 85 : '100%',
vis = opened ? 0 : 1;
\$(this).find('.div-hover-2').toggleClass('open');
\$(this).find('.div-hover-2').animate({height : ht}, 150);
\$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
});
}
})
.catch((error) => {
console.error('Error:', error);
});
})
}
if (window.matchMedia(\"(max-width: 768px)\").matches) {
new Flicking(\"#flick3\", {
moveType: \"freeScroll\",
bound: true
});
}
if (window.matchMedia(\"(max-width: 768px)\").matches) {
const test = document.getElementsByClassName('select-filter')
for (const testElement of test) {
testElement.addEventListener('click', function (e) {
e.preventDefault()
testElement.classList.toggle('select-projet-active')
const infos = document.querySelector('.projectButton.all')
const dataId = []
const tests = document.querySelectorAll('.select-filter.select-projet-active')
for (const test1 of tests) {
dataId.push(parseFloat(test1.dataset.id))
}
fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
method: 'GET',
})
.then(response => response.json())
.then(data => {
futurProjects.innerHTML = data.data
})
.catch((error) => {
console.error('Error:', error);
});
})
}
} else {
const test = document.getElementsByClassName('select-projet')
const textOutput = document.querySelector(\"#showOutput\");
for (const testElement of test) {
testElement.addEventListener('click', function (e) {
displayLoading()
e.preventDefault()
testElement.classList.toggle('select-projet-active')
const infos = document.querySelector('.projectButton.all')
const dataId = []
const tests = document.querySelectorAll('.select-projet.select-projet-active')
for (const test1 of tests) {
dataId.push(parseFloat(test1.dataset.id))
}
fetch('properties/display/'+infos.dataset.id+'/params/' + JSON.stringify(dataId), {
method: 'GET'
})
.then(response => response.json())
.then(data => {
hideLoading()
futurProjects.innerHTML = data.data
_ww = \$(window).width();
var lightbox = \$('.lightbox'),
item = 0;
\$('.lightbox-on').click(function(e){
e.stopPropagation();
item = 0;
console.log('click btn');
var id = \$(this).attr('data-id'),
max = 0;
\$('#'+id).toggle();
\$('#'+id).animate({opacity: 1}, 300);
\$('#'+id).find('img').each(function( i ) {
//console.log('h : '+\$(this).height());
//console.log('w : '+\$(this).width());
max = i;
item = 1;
counter(item, max+1);
itemWidth(\$(this));
});
});
lightbox.click(function(e) {
e.stopPropagation();
\$(this).animate({opacity: 0}, 300, function(){
\$(this).toggle();
});
});
\$('.closer').on('click', function (e) {
e.stopPropagation();
\$(this).parent().animate(
{opacity: 0},
300,
function(){
\$(this).toggle();
}
);
});
function itemWidth(img){
img.closest('.items').width(img.width());
}
function counter(item, max){
\$('.counter').text(item + ' / ' + max);
}
\$('.item', lightbox).on('click, swipeleft', function (e) {
var wd = \$(this).width(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(this).animate(
{marginLeft: -wd, opacity: 0},
500,
'swing',
function(){
\$(this).insertAfter(last);
\$(this).css({marginLeft: 0, opacity: 1});
}
);
});
\$('.item', lightbox).on('swiperight', function (e) {
var wd = \$(this).width(),
first = \$(this).parent().find('.item').first(),
last = \$(this).parent().find('.item').last(),
img = \$(this).find('.img');
itemWidth(img);
\$(last).insertBefore(\$(this));
\$(last).css({marginLeft: -wd, opacity: 0});
\$(this).parent().find('.item').eq(0).animate(
{marginLeft: 0, opacity: 1},
500,
'swing'
);
});
\$('.arrows', lightbox).on('click', function (e) {
e.stopPropagation();
var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
max = \$(this)
.siblings('.items').find('.item').length,
first = \$(this).siblings('.items').find('.item').first(),
last = \$(this).siblings('.items').find('.item').last(),
isRight = \$(this).hasClass('right'),
marginL = isRight ? -wd : 0,
marginL0 = isRight ? 0: -wd,
opacOn = isRight ? 1 : 0,
opacOff = isRight ? 0 : 1;
if (!isRight){
\$(last).insertBefore(first);
\$(last).css({marginLeft: -wd, opacity: 0});
item++;
if (item == max+1) {item = 1};
} else {
item--;
if (item == 0) {item = max};
};
counter(item, max);
var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
itemWidth(img);
\$(this).siblings('.items').find('.item').eq(1).animate(
{opacity: opacOn},
500,
'swing');
\$(this).siblings('.items').find('.item').eq(0).animate(
{marginLeft: marginL, opacity: 1},
500,
'swing',
function(){
if (isRight){
\$(this).insertAfter(last);
\$(this).css({ marginLeft: 0, opacity: 1});
}
}
);
});
if (_ww > 768){
\$('.div-img-hover-2').hover(function (e) {
\$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
var htext = \$(this).find('.project-content').height();
if (htext == undefined){htext = 0};
\$(this).find('.div-hover-2').animate({height : htext+180}, 150);
\$(this).find('.project-content').css({'visibility': 'visible'});
\$(this).find('.project-content').animate({opacity: 1}, 150);
}, function() {
console.log('down');
\$(this).find('.div-hover-2').animate({height : 85}, 150);
\$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
\$(this).find('.project-content').animate({opacity: 0}, 150, function(){
\$(this).find('.project-content').css({'visibility': 'hidden'});
});
});
} else {
\$('.div-img-hover-2').on( \"tap\", function( event ) {
console.log('tap tap');
var opened = \$(this).find('.div-hover-2').hasClass('open'),
ht = opened ? 85 : '100%',
vis = opened ? 0 : 1;
\$(this).find('.div-hover-2').toggleClass('open');
\$(this).find('.div-hover-2').animate({height : ht}, 150);
\$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
});
}
\$('.div-hover').hover(function (e) {
\$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
}, function() {
\$(this).find('.project-arrow-2').animate({opacity: 0}, 50);
});
})
.catch((error) => {
});
})
}
}
const filter = document.getElementById('filters')
const filterElement = document.getElementById('form-search-filter-ajax')
filter.addEventListener('click', function (e) {
e.preventDefault()
filterElement.classList.toggle('show')
})
const loader = document.querySelector(\"#loading\");
function displayLoading() {
loader.classList.add(\"display\");
// to stop loading after some time
setTimeout(() => {
loader.classList.remove(\"display\");
}, 5000);
}
// hiding loading
function hideLoading() {
loader.classList.remove(\"display\");
}
</script>
<script>
const arrowPrev = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
<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\"/>
</svg>`;
const arrowNext= `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"7.985\" height=\"13.211\" viewBox=\"0 0 7.985 13.211\">
<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\"/>
</svg>`;
var countProperties = '{{ properties|length }}';
var loopProp = 1;
while (loopProp <= countProperties) {
if (window.innerWidth > 768) {
\$('.slick-slide-single-'+loopProp).slick({
'slidesToShow': 1,
'prevArrow': `<div class=\"arrow-left square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowPrev}</div>`,
'nextArrow': `<div class=\"arrow-right square-black d-flex justify-content-center align-items-center position-absolute\">\${arrowNext}</div>`
});
}
loopProp++;
}
</script>
{% endblock %}
", "property.html.twig", "/home/juca-stage/sites/sym/tracol/templates/property.html.twig");
}
}