{% 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 = '/uploads/images/'~headerContent.picture[0].path %}
{% else %}
{% set backgroundImage = 'img/projets_header.jpg' %}
{% endif %}
<header class="header-tracol col-lg-8 mx-auto" style="background-image: url({{ backgroundImage }});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 and headerContent.name %}
<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: 40px">
<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="item2 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 img-wrapper">
{% set url = 'http' in property.pictures.0.url ? property.pictures.0.url : asset('uploads/images/properties/'~property.id~'/'~property.pictures.0.url) %}
<div class="img" style="background-image: url('{{ url }}')" onclick="location.href='{{ path('project-detail', {'id': property.id}) }}'">
</div>
</div>
{% else %}
<div class="img-wrapper">
<div class="img" style="background-image: url('{{ asset('build/Maisons_H_R1.jpg') }}')"></div>
</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 and sectionContent1.picture[0] 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;
var id = $(this).attr('data-id'),
max = 0;
$('#'+id).toggle();
$('#'+id).animate({opacity: 1}, 300);
$('#'+id).find('img').each(function( i ) {
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() {
$(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 ) {
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;
var id = $(this).attr('data-id'),
max = 0;
$('#'+id).toggle();
$('#'+id).animate({opacity: 1}, 300);
$('#'+id).find('img').each(function( i ) {
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() {
$(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 ) {
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) {
const flick = document.getElementById("flick4")
if(flick){
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 %}