<?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;
/* project.html.twig */
class __TwigTemplate_13f70910f050a903c91d2cc0b7d3a762f174758d7f6b6d653c908236a1984926 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'metaDescription' => [$this, 'block_metaDescription'],
'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", "project.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "project.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "project.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 "Projets";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 4
public function block_metaDescription($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", "metaDescription"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaDescription"));
// line 5
echo " ";
$context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Projets", "Header");
// line 6
echo " <meta name=\"description\" content=\"
";
// line 7
if (twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "content", [], "any", true, true, false, 7)) {
// line 8
echo " ";
echo twig_escape_filter($this->env, twig_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", false, false, false, 8)), "html", null, true);
echo "
";
} else {
// line 10
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.
";
}
// line 12
echo " \">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 15
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"));
// line 16
echo "
";
// line 17
$context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Projets", "Header");
// line 18
echo "
";
// line 19
if ((twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "picture", [], "any", true, true, false, 19) && !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", false, false, false, 19)))) {
// line 20
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.', 20, $this->source); })()), "picture", [], "any", false, false, false, 20), 0, [], "array", false, false, false, 20), "path", [], "any", false, false, false, 20);
// line 21
echo " ";
} else {
// line 22
echo " ";
$context["backgroundImage"] = "empty";
// line 23
echo " ";
}
// line 24
echo "
<header class=\"header-tracol col-lg-8 mx-auto\" style=\"background-image: url(";
// line 25
if ((0 !== twig_compare((isset($context["backgroundImage"]) || array_key_exists("backgroundImage", $context) ? $context["backgroundImage"] : (function () { throw new RuntimeError('Variable "backgroundImage" does not exist.', 25, $this->source); })()), "empty"))) {
echo "'/uploads/images/";
echo twig_escape_filter($this->env, (isset($context["backgroundImage"]) || array_key_exists("backgroundImage", $context) ? $context["backgroundImage"] : (function () { throw new RuntimeError('Variable "backgroundImage" does not exist.', 25, $this->source); })()), "html", null, true);
echo "'";
} else {
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/projets_header.jpg"), "html", null, true);
}
echo ");margin-top: 165px!important;\">
<div class=\"col-lg-8 mx-auto div-svg-header\">
<div id=\"header-project\" class=\"header-habiter-div\">
";
// line 28
if (twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "name", [], "any", true, true, false, 28)) {
// line 29
echo " <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-6\">";
// line 30
if (twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "name", [], "any", true, true, false, 30)) {
echo twig_escape_filter($this->env, 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.', 30, $this->source); })()), "name", [], "any", false, false, false, 30), "html", null, true);
}
echo "</h2>
<div class=\"col-lg-8 header-content\">
";
// line 32
if (twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "content", [], "any", true, true, false, 32)) {
// line 33
echo " ";
echo 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.', 33, $this->source); })()), "content", [], "any", false, false, false, 33);
echo "
";
} else {
// line 35
echo " <p>Fort de plusieurs années d’expérience, Tracol Immobilier propose des projets adaptés aux besoins de chacun. Répondant aux plus hautes exigences et s’inscrivant dans le temps, ils se caractérisent par une architecture résolument contemporaine, des matériaux de qualité et le soin apporté à chaque détail.</p>
";
}
// line 37
echo " </div>
";
}
// line 39
echo " </div>
</div>
</header>
<div class=\"container-fluid project-page\">
";
// line 44
$context["sectionContent1"] = $this->extensions['App\Twig\ContentExtension']->Content("Projets", "Section-1");
// line 45
echo " <div class=\"col-lg-8 mx-auto div-svg-header pre-section\">
<div class=\"col-lg-4\" 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>
";
// line 50
if ((0 === twig_compare(twig_length_filter($this->env, (isset($context["projects"]) || array_key_exists("projects", $context) ? $context["projects"] : (function () { throw new RuntimeError('Variable "projects" does not exist.', 50, $this->source); })())), 0))) {
// line 51
echo " <h1 class=\"project-title\">pas de projet</h1>
";
} elseif ((0 === twig_compare(twig_length_filter($this->env, // line 52
(isset($context["projects"]) || array_key_exists("projects", $context) ? $context["projects"] : (function () { throw new RuntimeError('Variable "projects" does not exist.', 52, $this->source); })())), 1))) {
// line 53
echo " <h1 class=\"project-title\">";
echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["projects"]) || array_key_exists("projects", $context) ? $context["projects"] : (function () { throw new RuntimeError('Variable "projects" does not exist.', 53, $this->source); })())), "html", null, true);
echo " projet</h1>
";
} else {
// line 55
echo " <h1 class=\"project-title\">";
echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["projects"]) || array_key_exists("projects", $context) ? $context["projects"] : (function () { throw new RuntimeError('Variable "projects" does not exist.', 55, $this->source); })())), "html", null, true);
echo " projets</h1>
";
}
// line 57
echo " </div>
<div class=\"separator\"></div>
<div id=\"section-1-project\" class=\"col-lg-6 pre-section-content\">
";
// line 60
if (twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "content", [], "any", true, true, false, 60)) {
// line 61
echo " ";
echo 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.', 61, $this->source); })()), "content", [], "any", false, false, false, 61);
echo "
";
} else {
// line 63
echo " Fort de plusieurs années d’expérience, Tracol Immobilier propose des projets adaptés aux besoins de chacun. Répondant aux plus hautes exigences et s’inscrivant dans le temps, ils se caractérisent par une architecture résolument contemporaine, des matériaux de qualité et le soin apporté à chaque détail.";
}
// line 64
echo " </div>
</div>
<section class=\"project filter mt-5\" style=\"margin-bottom: 120px\">
<div id=\"button-project-page\" class=\"col-lg-4 div-svg-header mb-4\" style=\"display: flex; align-items: center; padding-left:25px\">
<div class=\"input-filter col-lg-3 d-flex\">
<label for=\"all-projects\" style=\"margin-right:10px\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-projects\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter col-lg-3 d-flex\">
<label for=\"futur-projects\" style=\"margin-right:10px\">À VENIR</label>
<input data-id=\"futur\" type=\"radio\" name=\"type\" id=\"futur-projects\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter col-lg-3 d-flex\">
<label for=\"construction-projects\" style=\"margin-right:10px\">EN COURS</label>
<input data-id=\"construction\" type=\"radio\" name=\"type\" id=\"construction-projects\" class=\" projectButton\">
</div>
";
// line 89
echo " </div>
<div id=\"button-project-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
<div class=\"flicking-viewport\">
<div class=\"flicking-camera\">
<div class=\"input-filter\">
<label for=\"all-projects-mobile\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-projects-mobile\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"futur-projects-mobile\">À VENIR</label>
<input data-id=\"futur\" type=\"radio\" name=\"type\" id=\"futur-projects-mobile\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"construction-projects-mobile\">EN COURS</label>
<input data-id=\"construction\" type=\"radio\" name=\"type\" id=\"construction-projects-mobile\" class=\" projectButton\">
</div>
";
// line 110
echo "
</div>
</div>
</div>
<div class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; justify-content: center; flex-direction: column;\">
";
// line 137
echo "
";
// line 144
echo "
<div id=\"projects\" class=\"row\">
";
// line 178
echo "
<div class=\"col-lg-12 project-desktop\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
";
// line 180
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["projects"]) || array_key_exists("projects", $context) ? $context["projects"] : (function () { throw new RuntimeError('Variable "projects" does not exist.', 180, $this->source); })()));
foreach ($context['_seq'] as $context["key"] => $context["property"]) {
// line 181
echo " <div class=\"col-12 col-xl-6 col-lg-6 col-md-12 col-sm-12\" style=\"position:relative;cursor: pointer\">
";
// line 182
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["property"], "pictures", [], "any", false, false, false, 182))) {
// line 183
echo " <div class=\"position-relative properties-slide\">
<div class=\"img\" style=\"background-image: url('";
// line 184
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, $context["property"], "pictures", [], "any", false, false, false, 184), 0, [], "any", false, false, false, 184), "url", [], "any", false, false, false, 184), "html", null, true);
echo "')\" onclick=\"location.href='";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("project-detail", ["id" => twig_get_attribute($this->env, $this->source, $context["property"], "id", [], "any", false, false, false, 184)]), "html", null, true);
echo "'\">
</div>
</div>
";
} else {
// line 189
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Maisons_H_R1.jpg"), "html", null, true);
echo "')\"></div>
";
}
// line 191
echo " ";
// line 203
echo "
<p class=\"city\">";
// line 204
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, 204), "name", [], "any", false, false, false, 204), "html", null, true);
echo "</p>
<p class=\"project-name\">";
// line 205
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["property"], "reference", [], "any", false, false, false, 205), "html", null, true);
echo "</p>
<div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">";
// line 206
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ContentExtension']->typeProject(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["property"], "construction", [], "any", false, false, false, 206), "construction_step", [], "any", false, false, false, 206)), "html", null, true);
echo "</span></div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['property'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 209
echo " </div>
</div>
<div class=\"text-center text-capitalize more-projects\">
<p>AFFICHER PLUS DE PROJETS</p>
</div>
</div>
";
// line 248
echo "
</section>
</div>
<div id=\"img-property-section\" class=\"container-fluid\" style=\"display: none\">
<div class=\"col-lg-6 habiter-img\">
<img style=\"padding: 0px;\" height=\"430px\" class=\"img-100\" ";
// line 253
if (twig_get_attribute($this->env, $this->source, ($context["sectionContent1"] ?? null), "picture", [], "any", true, true, false, 253)) {
echo "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.', 253, $this->source); })()), "picture", [], "any", false, false, false, 253), 0, [], "array", false, false, false, 253), "path", [], "any", false, false, false, 253), "html", null, true);
echo "\"";
}
echo ">
</div>
</div>
<script>
const futurProjects = document.getElementById('projects')
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('projects/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);
});
}
\$('.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) => {
console.error('Error:', error);
});
})
}
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('projects/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')
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('projects/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-hover-2').on( \"click\", 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) => {
console.error('Error:', error);
});
})
}
}
const buttonFilter = document.getElementsByClassName('select-projet')
for (const buttonFilterElement of buttonFilter) {
buttonFilterElement.addEventListener('click', function () {
})
}
if (window.matchMedia(\"(max-width: 768px)\").matches) {
new Flicking(\"#flick4\", {
moveType: \"freeScroll\",
bound: true
});
}
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>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "project.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 372 => 253, 365 => 248, 355 => 209, 346 => 206, 342 => 205, 338 => 204, 335 => 203, 333 => 191, 327 => 189, 317 => 184, 314 => 183, 312 => 182, 309 => 181, 305 => 180, 301 => 178, 297 => 144, 293 => 137, 284 => 110, 266 => 89, 244 => 64, 241 => 63, 235 => 61, 233 => 60, 228 => 57, 222 => 55, 216 => 53, 214 => 52, 211 => 51, 209 => 50, 202 => 45, 200 => 44, 193 => 39, 189 => 37, 185 => 35, 179 => 33, 177 => 32, 170 => 30, 167 => 29, 165 => 28, 153 => 25, 150 => 24, 147 => 23, 144 => 22, 141 => 21, 138 => 20, 136 => 19, 133 => 18, 131 => 17, 128 => 16, 118 => 15, 107 => 12, 103 => 10, 97 => 8, 95 => 7, 92 => 6, 89 => 5, 79 => 4, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}Projets{% endblock %}
{% block metaDescription %}
{% set headerContent = content('Projets', 'Header') %}
<meta name=\"description\" content=\"
{% if headerContent.content is defined %}
{{ headerContent.content|striptags }}
{% else %}
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.
{% endif %}
\">
{% endblock %}
{% block body %}
{% set headerContent = content('Projets', '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 col-lg-8 mx-auto\" style=\"background-image: url({% if backgroundImage != 'empty' %}'/uploads/images/{{ backgroundImage }}'{% else %}{{ asset('img/projets_header.jpg') }}{% endif %});margin-top: 165px!important;\">
<div class=\"col-lg-8 mx-auto div-svg-header\">
<div id=\"header-project\" class=\"header-habiter-div\">
{% 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-6\">{% if headerContent.name is defined %}{{ headerContent.name }}{% endif %}</h2>
<div class=\"col-lg-8 header-content\">
{% if headerContent.content is defined %}
{{ headerContent.content|raw }}
{% else %}
<p>Fort de plusieurs années d’expérience, Tracol Immobilier propose des projets adaptés aux besoins de chacun. Répondant aux plus hautes exigences et s’inscrivant dans le temps, ils se caractérisent par une architecture résolument contemporaine, des matériaux de qualité et le soin apporté à chaque détail.</p>
{% endif %}
</div>
{% endif %}
</div>
</div>
</header>
<div class=\"container-fluid project-page\">
{% set sectionContent1 = content('Projets', 'Section-1') %}
<div class=\"col-lg-8 mx-auto div-svg-header pre-section\">
<div class=\"col-lg-4\" 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 projects|length == 0 %}
<h1 class=\"project-title\">pas de projet</h1>
{% elseif projects|length == 1 %}
<h1 class=\"project-title\">{{ projects|length }} projet</h1>
{% else %}
<h1 class=\"project-title\">{{ projects|length }} projets</h1>
{% endif %}
</div>
<div class=\"separator\"></div>
<div id=\"section-1-project\" class=\"col-lg-6 pre-section-content\">
{% if headerContent.content is defined %}
{{ sectionContent1.content|raw }}
{% else %}
Fort de plusieurs années d’expérience, Tracol Immobilier propose des projets adaptés aux besoins de chacun. Répondant aux plus hautes exigences et s’inscrivant dans le temps, ils se caractérisent par une architecture résolument contemporaine, des matériaux de qualité et le soin apporté à chaque détail.{% endif %}
</div>
</div>
<section class=\"project filter mt-5\" style=\"margin-bottom: 120px\">
<div id=\"button-project-page\" class=\"col-lg-4 div-svg-header mb-4\" style=\"display: flex; align-items: center; padding-left:25px\">
<div class=\"input-filter col-lg-3 d-flex\">
<label for=\"all-projects\" style=\"margin-right:10px\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-projects\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter col-lg-3 d-flex\">
<label for=\"futur-projects\" style=\"margin-right:10px\">À VENIR</label>
<input data-id=\"futur\" type=\"radio\" name=\"type\" id=\"futur-projects\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter col-lg-3 d-flex\">
<label for=\"construction-projects\" style=\"margin-right:10px\">EN COURS</label>
<input data-id=\"construction\" type=\"radio\" name=\"type\" id=\"construction-projects\" class=\" projectButton\">
</div>
{#
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"futur\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">A VENIR</span></button>
<button data-id=\"construction\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">EN COURS</span></button>
#}
</div>
<div id=\"button-project-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
<div class=\"flicking-viewport\">
<div class=\"flicking-camera\">
<div class=\"input-filter\">
<label for=\"all-projects-mobile\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-projects-mobile\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"futur-projects-mobile\">À VENIR</label>
<input data-id=\"futur\" type=\"radio\" name=\"type\" id=\"futur-projects-mobile\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"construction-projects-mobile\">EN COURS</label>
<input data-id=\"construction\" type=\"radio\" name=\"type\" id=\"construction-projects-mobile\" class=\" projectButton\">
</div>
{#
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"futur\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">A VENIR</span></button>
<button data-id=\"construction\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">EN COURS</span></button>
#}
</div>
</div>
</div>
<div class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; justify-content: center; flex-direction: column;\">
{#
<div id=\"filter-project-desktop\">
{% for key, subType in getSubTypeProject() %}
<button data-id=\"{{ key }}\" class=\"select-projet\">{{ subType }} <i class=\"fas fa-times\"></i></button>
{% endfor %}
</div>
<div id=\"filter-project-mobile\" class=\"col-lg-3 div-form selectSubFilter\" 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 getSubTypeProject() %}
<li value=\"{{ key }}\" data-id=\"{{ key }}\" class=\"select-filter\"><i class=\"fas fa-times\"></i>{{ subType }}</li>
{% endfor %}
</ul>
</div>
</div>
#}
{#
<div id=\"loading\">
<h1 id=\"showOutput\"></h1>
</div>
#}
<div id=\"projects\" class=\"row\">
{#
{% for key, project in projects|slice(0,5) %}
<div onclick=\"location.href='{{ path('project-detail', {'id': project.id}) }}'\" data-id=\"{{ path('project-detail', {'id': project.id}) }}\" class=\"col-lg-12 div-img-hover-2 project-desktop\" style=\"cursor: pointer\">
{% if key == 0 %}
<div class=\"div-hover-2\" id=\"div-hover-2\" style=\"position: absolute; bottom: 8px; left: 8px; background-color: #242424; color: white; width: 291px; height: 85px\">
<p class=\"city\">{{ project.city.name }}</p>
<p class=\"project-name\">{{ project.reference }}</p>
{% if project.comments[0].comment is not empty %}
<p class=\"project-content\">
{{ project.comments[0].comment|slice(0, 250) }}</p>
<a href=\"{{ path('project-detail', {'id': project.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('project-detail', {'id': project.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=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ typeProject(project.construction.construction_step) }}</span></div>
{% if project.pictures is not empty %}
{% for picture in project.pictures|slice(0,1) %}
<div class=\"img\" style=\"background-image: url('{{ picture.url }}')\"></div>
{% endfor %}
{% else %}
<div class=\"img\" style=\"background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')\"></div>
{% endif %}
{% endif %}
</div>
{% endfor %}
#}
<div class=\"col-lg-12 project-desktop\" style=\"display: flex; flex-wrap: wrap; flex-direction: row\">
{% for key, property in projects %}
<div class=\"col-12 col-xl-6 col-lg-6 col-md-12 col-sm-12\" style=\"position:relative;cursor: pointer\">
{% if property.pictures is not empty %}
<div class=\"position-relative properties-slide\">
<div class=\"img\" style=\"background-image: url('{{ property.pictures.0.url }}')\" onclick=\"location.href='{{ path('project-detail', {'id': property.id}) }}'\">
</div>
</div>
{% else %}
<div class=\"img\" style=\"background-image: url('{{ asset('build/Maisons_H_R1.jpg') }}')\"></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 class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ typeProject(property.construction.construction_step) }}</span></div>
</div>
{% endfor %}
</div>
</div>
<div class=\"text-center text-capitalize more-projects\">
<p>AFFICHER PLUS DE PROJETS</p>
</div>
</div>
{#
<div class=\"col-lg-8 mx-auto div-svg-header content-projet\">
{% set sectionContent1 = content('Projets', 'Section-2') %}
<div id=\"section-2-project\" 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-9\">
<h1 class=\"habiter-title mb-5\">
{% if sectionContent1.name is defined %}{{ sectionContent1.name }}{% else %}INVESTIR À LUXEMBOURG{% endif %}
</h1>
{% if sectionContent1.content is defined %}{{ sectionContent1.content|raw }}{% else %}La demande locative est très importante au Luxembourg. En choisissant d’investir dans nos projets, vous avez l’assurance de louer très vite votre bien immobilier sans souci de devoir partir à la recherche de locataires potentiels. Votre investissement devient rapidement rentable. De plus, notre service de gestion locative peut vous accompagner dans votre démarche de A à Z.{% endif %}
</div>
</div>
<div id=\"display-none-mobile\" class=\"col-lg-6 habiter-img\" {% if sectionContent1.picture is defined %}style=\"background-image: url('/uploads/images/{{ sectionContent1.picture[0].path }}')\"{% endif %}>
</div>
</div>
<div class=\"col-lg-12 div-svg-header last-section-project\">
<div id=\"section-projet-margin\" class=\"offset-lg-2 col-lg-2\" style=\"display: flex; justify-content: flex-start;\">
<a id=\"link-more\" class=\"property-span-arrow\" href=\"{{ path('invest') }}\">EN SAVOIR PLUS
<i class=\"fas fa-arrow-right property-arrow\"></i>
</a>
</div>
<div class=\"col-lg-3\" style=\"display: flex;justify-content: flex-start;margin-left: 0;\">
<a href=\"{{ path('location-management') }}\" class=\"property-span-arrow\">LA GESTION LOCATIVE
<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 class=\"col-lg-6 habiter-img\">
<img style=\"padding: 0px;\" height=\"430px\" class=\"img-100\" {% if sectionContent1.picture is defined %}src=\"/uploads/images/{{ sectionContent1.picture[0].path }}\"{% endif %}>
</div>
</div>
<script>
const futurProjects = document.getElementById('projects')
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('projects/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);
});
}
\$('.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) => {
console.error('Error:', error);
});
})
}
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('projects/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')
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('projects/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-hover-2').on( \"click\", 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) => {
console.error('Error:', error);
});
})
}
}
const buttonFilter = document.getElementsByClassName('select-projet')
for (const buttonFilterElement of buttonFilter) {
buttonFilterElement.addEventListener('click', function () {
})
}
if (window.matchMedia(\"(max-width: 768px)\").matches) {
new Flicking(\"#flick4\", {
moveType: \"freeScroll\",
bound: true
});
}
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>
{% endblock %}
", "project.html.twig", "/home/jumo/sites/sym/tracol/templates/project.html.twig");
}
}