<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* reference.html.twig */
class __TwigTemplate_a5944d2bdba562b771006f9aafe46ca7dc331600e2d58e485c3aca0ee8d29439 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", "reference.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "reference.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "reference.html.twig", 1);
yield from $this->parent->unwrap()->yield($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"));
yield "References";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// 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"));
// line 6
yield "
";
// line 7
$context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Reference", "Header");
// line 8
yield "
";
// line 9
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["headerContent"] ?? null), "picture", [], "any", true, true, false, 9) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($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
yield " ";
$context["backgroundImage"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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
yield " ";
} else {
// line 12
yield " ";
$context["backgroundImage"] = "empty";
// line 13
yield " ";
}
// line 14
yield " ";
// line 26
yield "
<div class=\"container-fluid reference-page\">
";
// line 29
$context["sectionContent1"] = $this->extensions['App\Twig\ContentExtension']->Content("Reference", "Section-1");
// line 30
yield " <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 35
if ((0 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["references"]) || array_key_exists("references", $context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.', 35, $this->source); })())), 0))) {
// line 36
yield " <h1 class=\"project-title\">pas de reference</h1>
";
} elseif ((0 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), // line 37
(isset($context["references"]) || array_key_exists("references", $context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.', 37, $this->source); })())), 1))) {
// line 38
yield " <h1 class=\"project-title\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["references"]) || array_key_exists("references", $context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.', 38, $this->source); })())), "html", null, true);
yield " référence</h1>
";
} else {
// line 40
yield " <h1 class=\"project-title\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["references"]) || array_key_exists("references", $context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.', 40, $this->source); })())), "html", null, true);
yield " références</h1>
";
}
// line 42
yield " </div>
";
// line 43
if (CoreExtension::getAttribute($this->env, $this->source, ($context["sectionContent1"] ?? null), "content", [], "any", true, true, false, 43)) {
// line 44
yield " <div class=\"separator\"></div>
<div id=\"section-1-reference\" class=\"col-lg-6 pre-section-content\">
";
// line 46
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["sectionContent1"]) || array_key_exists("sectionContent1", $context) ? $context["sectionContent1"] : (function () { throw new RuntimeError('Variable "sectionContent1" does not exist.', 46, $this->source); })()), "content", [], "any", false, false, false, 46);
yield "
</div>
";
}
// line 49
yield " </div>
<section class=\"project filter\" style=\"margin-bottom: 60px\">
<div id=\"button-reference-page\" class=\"col-lg-8 mx-auto div-svg-header\">
<div class=\"input-filter\">
<label for=\"all-references\" class=\"mr-1\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-references\" class=\"mr-1 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"residences-references\" class=\"mr-2\">RÉSIDENCES</label>
<input data-id=\"residences\" type=\"radio\" name=\"type\" id=\"residences-references\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"maisons-references\" class=\"mr-2\">MAISONS</label>
<input data-id=\"maisons\" type=\"radio\" name=\"type\" id=\"maisons-references\" class=\" projectButton\">
</div>
";
// line 75
yield "
";
// line 83
yield "
</div>
<div id=\"reference\" class=\"col-lg-8 mx-auto div-svg-header row\" style=\"display: flex;justify-content: center\">
";
// line 87
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["references"]) || array_key_exists("references", $context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.', 87, $this->source); })()));
foreach ($context['_seq'] as $context["key"] => $context["reference"]) {
// line 88
yield " <div class=\"col-lg-6 div-img-hover-2 position-relative reference-list-single lightbox-on\" data-id=\"modul-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["key"], "html", null, true);
yield "\" style=\"cursor: pointer\">
<div class=\"div-hover-2\" id=\"div-hover-2\">
<div class=\"d-flex justify-content-between\">
<p class=\"city\">";
// line 92
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "city", [], "any", false, false, false, 92), "name", [], "any", false, false, false, 92), "html", null, true);
yield "</p>
<p class=\"date-ref\">";
// line 93
yield "</p>
</div>
<p class=\"project-name\">";
// line 96
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "reference", [], "any", false, false, false, 96), "html", null, true);
yield "</p>
";
// line 97
if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "comments", [], "any", false, false, false, 97), 0, [], "array", false, false, false, 97), "comment", [], "any", false, false, false, 97))) {
// line 98
yield " <p class=\"project-content\" style=\"visibility: hidden\">
";
// line 99
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "comments", [], "any", false, false, false, 99), 0, [], "array", false, false, false, 99), "comment", [], "any", false, false, false, 99), 0, 350), "html", null, true);
yield "
</p>
<a href=\"javascript:void(0);\" class=\"project-arrow-2\">
<span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
";
} else {
// line 105
yield " <a style=\"margin-top: 180px\" href=\"javascript:void(0);\" class=\"project-arrow-2 \">
<span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
";
}
// line 109
yield " </div>
<div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">";
// line 111
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\ContentExtension']->getTypeReferences(CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "type", [], "any", false, false, false, 111)), "html", null, true);
yield "</span></div>
";
// line 112
if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "pictures", [], "any", false, false, false, 112))) {
// line 113
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "pictures", [], "any", false, false, false, 113), 0, 1));
foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
// line 114
yield " ";
$context["url"] = ((CoreExtension::inFilter("http", CoreExtension::getAttribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 114))) ? (CoreExtension::getAttribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 114)) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(((("uploads/images/properties/" . CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "id", [], "any", false, false, false, 114)) . "/") . CoreExtension::getAttribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 114)))));
// line 115
yield " <div class=\"img\" style=\"background-image: url('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["url"]) || array_key_exists("url", $context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.', 115, $this->source); })()), "html", null, true);
yield "')\"></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 117
yield " ";
} else {
// line 118
yield " <div class=\"img\" style=\"background-image: url('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html", null, true);
yield "')\"></div>
";
}
// line 120
yield "
<div class=\"lightbox\" id=\"modul-";
// line 121
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["key"], "html", null, true);
yield "\">
<div class=\"closer\"></div>
<div class=\"arrows left\">←</div>
<div class=\"arrows right\">→</div>
<div class=\"counter\">1/1</div>
<ul class=\"items\">
";
// line 127
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "pictures", [], "any", false, false, false, 127));
foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
// line 128
yield " <li class=\"item\">
";
// line 129
$context["url"] = ((CoreExtension::inFilter("http", CoreExtension::getAttribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 129))) ? (CoreExtension::getAttribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 129)) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(((("uploads/images/properties/" . CoreExtension::getAttribute($this->env, $this->source, $context["reference"], "id", [], "any", false, false, false, 129)) . "/") . CoreExtension::getAttribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 129)))));
// line 130
yield " <img class=\"img\" src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["url"]) || array_key_exists("url", $context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.', 130, $this->source); })()), "html", null, true);
yield "\">
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 133
yield " </ul>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['reference'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 138
yield "
<div class=\"text-center text-capitalize more-projects\">
<p>AFFICHER PLUS DE REFERENCES</p>
</div>
</div>
</section>
</div>
<script>
for (const eElement of document.getElementsByClassName('projectButton')) {
eElement.addEventListener('click', function (e) {
e.preventDefault()
for (let button of document.getElementsByClassName('projectButton')) {
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('references/display/'+this.dataset.id, {
method: 'GET',
})
.then(response => response.json())
.then(data => {
document.getElementById('reference').innerHTML = ''
document.getElementById('reference').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) {
new Flicking(\"#flick5\", {
moveType: \"freeScroll\",
bound: true
});
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "reference.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 311 => 138, 301 => 133, 291 => 130, 289 => 129, 286 => 128, 282 => 127, 273 => 121, 270 => 120, 264 => 118, 261 => 117, 252 => 115, 249 => 114, 244 => 113, 242 => 112, 238 => 111, 234 => 109, 228 => 105, 219 => 99, 216 => 98, 214 => 97, 210 => 96, 205 => 93, 201 => 92, 193 => 88, 189 => 87, 183 => 83, 180 => 75, 162 => 49, 156 => 46, 152 => 44, 150 => 43, 147 => 42, 141 => 40, 135 => 38, 133 => 37, 130 => 36, 128 => 35, 121 => 30, 119 => 29, 114 => 26, 112 => 14, 109 => 13, 106 => 12, 103 => 11, 100 => 10, 98 => 9, 95 => 8, 93 => 7, 90 => 6, 80 => 5, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}References{% endblock %}
{% block body %}
{% set headerContent = content('Reference', '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\" style=\"background-image: url('/uploads/images/{{ backgroundImage }}');\">
<div class=\"col-lg-8 mx-auto div-svg-header\">
{% if headerContent.name is defined %}
<div class=\"header-habiter-div\">
<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-12\">{{ headerContent.name }}</h2>
</div>
{% endif %}
</div>
</header>
#}
<div class=\"container-fluid reference-page\">
{% set sectionContent1 = content('Reference', '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 references|length == 0 %}
<h1 class=\"project-title\">pas de reference</h1>
{% elseif references|length == 1 %}
<h1 class=\"project-title\">{{ references|length }} référence</h1>
{% else %}
<h1 class=\"project-title\">{{ references|length }} références</h1>
{% endif %}
</div>
{% if sectionContent1.content is defined %}
<div class=\"separator\"></div>
<div id=\"section-1-reference\" class=\"col-lg-6 pre-section-content\">
{{ sectionContent1.content|raw }}
</div>
{% endif %}
</div>
<section class=\"project filter\" style=\"margin-bottom: 60px\">
<div id=\"button-reference-page\" class=\"col-lg-8 mx-auto div-svg-header\">
<div class=\"input-filter\">
<label for=\"all-references\" class=\"mr-1\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-references\" class=\"mr-1 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"residences-references\" class=\"mr-2\">RÉSIDENCES</label>
<input data-id=\"residences\" type=\"radio\" name=\"type\" id=\"residences-references\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"maisons-references\" class=\"mr-2\">MAISONS</label>
<input data-id=\"maisons\" type=\"radio\" name=\"type\" id=\"maisons-references\" class=\" projectButton\">
</div>
{#
<div class=\"input-filter\" style=\"padding-right:20px;\">
<label for=\"commerces-references\">COMMERCES</label>
<input data-id=\"commerces\" type=\"radio\" name=\"type\" id=\"commerces-references\" class=\" projectButton\">
</div>
<div class=\"input-filter\" style=\"padding-right:20px;\">
<label for=\"bureaux-references\">BUREAUX</label>
<input data-id=\"bureaux\" type=\"radio\" name=\"type\" id=\"bureaux-references\" 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=\"residences\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">RÉSIDENCES</span></button>
<button data-id=\"maisons\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">MAISONS</span></button>
<button data-id=\"commerces\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">COMMERCES</span></button>
<button data-id=\"bureaux\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">BUREAUX</span></button>
#}
</div>
<div id=\"reference\" class=\"col-lg-8 mx-auto div-svg-header row\" style=\"display: flex;justify-content: center\">
{% for key, reference in references %}
<div class=\"col-lg-6 div-img-hover-2 position-relative reference-list-single lightbox-on\" data-id=\"modul-{{ key }}\" style=\"cursor: pointer\">
<div class=\"div-hover-2\" id=\"div-hover-2\">
<div class=\"d-flex justify-content-between\">
<p class=\"city\">{{ reference.city.name }}</p>
<p class=\"date-ref\">{# {{ reference.updated_at|date(\"d/m/Y\") }} #}</p>
</div>
<p class=\"project-name\">{{ reference.reference }}</p>
{% if reference.comments[0].comment is not empty %}
<p class=\"project-content\" style=\"visibility: hidden\">
{{ reference.comments[0].comment|slice(0, 350) }}
</p>
<a href=\"javascript:void(0);\" class=\"project-arrow-2\">
<span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
{% else %}
<a style=\"margin-top: 180px\" href=\"javascript:void(0);\" class=\"project-arrow-2 \">
<span class=\"galerry-ref\">GALERIE PHOTOS</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\">{{ getTypeReferences(reference.type) }}</span></div>
{% if reference.pictures is not empty %}
{% for picture in reference.pictures|slice(0,1) %}
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~reference.id~'/'~picture.url) %}
<div class=\"img\" style=\"background-image: url('{{ url }}')\"></div>
{% endfor %}
{% else %}
<div class=\"img\" style=\"background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')\"></div>
{% endif %}
<div class=\"lightbox\" id=\"modul-{{ key }}\">
<div class=\"closer\"></div>
<div class=\"arrows left\">←</div>
<div class=\"arrows right\">→</div>
<div class=\"counter\">1/1</div>
<ul class=\"items\">
{% for picture in reference.pictures %}
<li class=\"item\">
{% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~reference.id~'/'~picture.url) %}
<img class=\"img\" src=\"{{ url }}\">
</li>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
<div class=\"text-center text-capitalize more-projects\">
<p>AFFICHER PLUS DE REFERENCES</p>
</div>
</div>
</section>
</div>
<script>
for (const eElement of document.getElementsByClassName('projectButton')) {
eElement.addEventListener('click', function (e) {
e.preventDefault()
for (let button of document.getElementsByClassName('projectButton')) {
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('references/display/'+this.dataset.id, {
method: 'GET',
})
.then(response => response.json())
.then(data => {
document.getElementById('reference').innerHTML = ''
document.getElementById('reference').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) {
new Flicking(\"#flick5\", {
moveType: \"freeScroll\",
bound: true
});
}
</script>
{# <script>#}
{# \$('.slider-ref-detail').slick({#}
{# dots: false,#}
{# infinite: true,#}
{# speed: 300,#}
{# slidesToShow: 1,#}
{# slidesToScroll: 1,#}
{# autoplay: true,#}
{# responsive: [#}
{# {#}
{# breakpoint: 576,#}
{# settings: {#}
{# slidesToShow: 1,#}
{# slidesToScroll: 1#}
{# }#}
{# }#}
{# // You can unslick at a given breakpoint now by adding:#}
{# // settings: \"unslick\"#}
{# // instead of a settings object#}
{# ]#}
{# });#}
{# </script>#}
{% endblock %}
", "reference.html.twig", "/home/fuzxzwq/www/templates/reference.html.twig");
}
}