<?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;
/* reference.html.twig */
class __TwigTemplate_fee0d79c2c4ab3514d68ff232e02ec1b32bd761f9fcb6a8f955840be525076a4 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);
$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 "References";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 6
echo "
";
// line 7
$context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Reference", "Header");
// line 8
echo "
";
// line 9
if ((twig_get_attribute($this->env, $this->source, ($context["headerContent"] ?? null), "picture", [], "any", true, true, false, 9) && !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["headerContent"]) || array_key_exists("headerContent", $context) ? $context["headerContent"] : (function () { throw new RuntimeError('Variable "headerContent" does not exist.', 9, $this->source); })()), "picture", [], "any", false, false, false, 9)))) {
// line 10
echo " ";
$context["backgroundImage"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["headerContent"]) || array_key_exists("headerContent", $context) ? $context["headerContent"] : (function () { throw new RuntimeError('Variable "headerContent" does not exist.', 10, $this->source); })()), "picture", [], "any", false, false, false, 10), 0, [], "array", false, false, false, 10), "path", [], "any", false, false, false, 10);
// line 11
echo " ";
} else {
// line 12
echo " ";
$context["backgroundImage"] = "empty";
// line 13
echo " ";
}
// line 14
echo " ";
// line 26
echo "
<div class=\"container-fluid reference-page\">
";
// line 29
$context["sectionContent1"] = $this->extensions['App\Twig\ContentExtension']->Content("Reference", "Section-1");
// line 30
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 35
if ((0 === twig_compare(twig_length_filter($this->env, (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
echo " <h1 class=\"project-title\">pas de reference</h1>
";
} elseif ((0 === twig_compare(twig_length_filter($this->env, // 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
echo " <h1 class=\"project-title\">";
echo twig_escape_filter($this->env, twig_length_filter($this->env, (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);
echo " référence</h1>
";
} else {
// line 40
echo " <h1 class=\"project-title\">";
echo twig_escape_filter($this->env, twig_length_filter($this->env, (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);
echo " références</h1>
";
}
// line 42
echo " </div>
";
// line 43
if (twig_get_attribute($this->env, $this->source, ($context["sectionContent1"] ?? null), "content", [], "any", true, true, false, 43)) {
// line 44
echo " <div class=\"separator\"></div>
<div id=\"section-1-reference\" class=\"col-lg-6 pre-section-content\">
";
// line 46
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.', 46, $this->source); })()), "content", [], "any", false, false, false, 46);
echo "
</div>
";
}
// line 49
echo " </div>
<section class=\"project\" style=\"margin-bottom: 120px\">
<div id=\"button-reference-page\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; align-items: center; padding-left: 7px\">
<div class=\"input-filter\">
<label for=\"all-references\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-references\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"residences-references\">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\">MAISONS</label>
<input data-id=\"maisons\" type=\"radio\" name=\"type\" id=\"maisons-references\" class=\" projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"commerces-references\">COMMERCES</label>
<input data-id=\"commerces\" type=\"radio\" name=\"type\" id=\"commerces-references\" class=\" projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"bureaux-references\">BUREAUX</label>
<input data-id=\"bureaux\" type=\"radio\" name=\"type\" id=\"bureaux-references\" class=\" projectButton\">
</div>
";
// line 80
echo "
</div>
<div id=\"button-reference-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
<div id=\"flick5\" class=\"flicking-viewport\">
<div class=\"flicking-camera\">
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"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>
</div>
<div id=\"reference\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; flex-direction: column; justify-content: center\">
";
// line 96
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["references"]) || array_key_exists("references", $context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.', 96, $this->source); })()));
foreach ($context['_seq'] as $context["key"] => $context["reference"]) {
// line 97
echo " <div class=\"col-lg-12 div-img-hover-2 position-relative reference-list-single\">
<div class=\"div-hover-2\" id=\"div-hover-2\" style=\"position: absolute; bottom: 8px; left: 8px; background-color: #242424; color: white; height: 85px\">
<div class=\"d-flex justify-content-between\">
<p class=\"city\">";
// line 101
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["reference"], "city", [], "any", false, false, false, 101), "name", [], "any", false, false, false, 101), "html", null, true);
echo "</p>
<p class=\"date-ref\">";
// line 102
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["reference"], "updated_at", [], "any", false, false, false, 102), "d/m/Y"), "html", null, true);
echo "</p>
</div>
<p class=\"project-name\">";
// line 105
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["reference"], "reference", [], "any", false, false, false, 105), "html", null, true);
echo "</p>
";
// line 106
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["reference"], "comments", [], "any", false, false, false, 106), 0, [], "array", false, false, false, 106), "comment", [], "any", false, false, false, 106))) {
// line 107
echo " <p class=\"project-content\" style=\"visibility: hidden\">
";
// line 108
echo twig_escape_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["reference"], "comments", [], "any", false, false, false, 108), 0, [], "array", false, false, false, 108), "comment", [], "any", false, false, false, 108), 0, 350), "html", null, true);
echo "
</p>
<a href=\"javascript:void(0);\" class=\"project-arrow-2 lightbox-on\" data-id=\"modul-";
// line 110
echo twig_escape_filter($this->env, $context["key"], "html", null, true);
echo "\">
<span class=\"galerry-ref\">GALERIES PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
";
} else {
// line 114
echo " <a style=\"margin-top: 180px\" href=\"javascript:void(0);\" class=\"project-arrow-2 lightbox-on\">
<span class=\"galerry-ref\">GALERIES PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
</a>
";
}
// line 118
echo " </div>
<div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">";
// line 120
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ContentExtension']->getTypeReferences(twig_get_attribute($this->env, $this->source, $context["reference"], "type", [], "any", false, false, false, 120)), "html", null, true);
echo "</span></div>
";
// line 121
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["reference"], "pictures", [], "any", false, false, false, 121))) {
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["reference"], "pictures", [], "any", false, false, false, 122), 0, 1));
foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
// line 123
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 123), "html", null, true);
echo "')\"></div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 125
echo " ";
} else {
// line 126
echo " <div class=\"img\" style=\"background-image: url('";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html", null, true);
echo "')\"></div>
";
}
// line 128
echo " </div>
<div class=\"lightbox\" id=\"modul-";
// line 130
echo twig_escape_filter($this->env, $context["key"], "html", null, true);
echo "\">
<div class=\"closer\"></div>
<div class=\"arrows left\">←</div>
<div class=\"arrows right\">→</div>
<div class=\"counter\">1/1</div>
<ul class=\"items\">
";
// line 136
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["reference"], "pictures", [], "any", false, false, false, 136));
foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
// line 137
echo " <li class=\"item\">
<img class=\"img\" src=\"";
// line 138
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["picture"], "url", [], "any", false, false, false, 138), "html", null, true);
echo "\">
</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 141
echo " </ul>
</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 145
echo "
<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 => {
console.log(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;
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) {
new Flicking(\"#flick5\", {
moveType: \"freeScroll\",
bound: true
});
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "reference.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 322 => 145, 313 => 141, 304 => 138, 301 => 137, 297 => 136, 288 => 130, 284 => 128, 278 => 126, 275 => 125, 266 => 123, 261 => 122, 259 => 121, 255 => 120, 251 => 118, 245 => 114, 238 => 110, 233 => 108, 230 => 107, 228 => 106, 224 => 105, 218 => 102, 214 => 101, 208 => 97, 204 => 96, 186 => 80, 160 => 49, 154 => 46, 150 => 44, 148 => 43, 145 => 42, 139 => 40, 133 => 38, 131 => 37, 128 => 36, 126 => 35, 119 => 30, 117 => 29, 112 => 26, 110 => 14, 107 => 13, 104 => 12, 101 => 11, 98 => 10, 96 => 9, 93 => 8, 91 => 7, 88 => 6, 78 => 5, 59 => 3, 36 => 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\" style=\"margin-bottom: 120px\">
<div id=\"button-reference-page\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; align-items: center; padding-left: 7px\">
<div class=\"input-filter\">
<label for=\"all-references\">TOUS</label>
<input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-references\" class=\"mr-3 projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"residences-references\">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\">MAISONS</label>
<input data-id=\"maisons\" type=\"radio\" name=\"type\" id=\"maisons-references\" class=\" projectButton\">
</div>
<div class=\"input-filter\">
<label for=\"commerces-references\">COMMERCES</label>
<input data-id=\"commerces\" type=\"radio\" name=\"type\" id=\"commerces-references\" class=\" projectButton\">
</div>
<div class=\"input-filter\">
<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=\"button-reference-page-mobile\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: none; align-items: center\">
<div id=\"flick5\" class=\"flicking-viewport\">
<div class=\"flicking-camera\">
<button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
<button data-id=\"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>
</div>
<div id=\"reference\" class=\"col-lg-8 mx-auto div-svg-header\" style=\"display: flex; flex-direction: column; justify-content: center\">
{% for key, reference in references %}
<div class=\"col-lg-12 div-img-hover-2 position-relative reference-list-single\">
<div class=\"div-hover-2\" id=\"div-hover-2\" style=\"position: absolute; bottom: 8px; left: 8px; background-color: #242424; color: white; height: 85px\">
<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 lightbox-on\" data-id=\"modul-{{ key }}\">
<span class=\"galerry-ref\">GALERIES 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 lightbox-on\">
<span class=\"galerry-ref\">GALERIES 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) %}
<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 %}
</div>
<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\">
<img class=\"img\" src=\"{{ picture.url }}\">
</li>
{% endfor %}
</ul>
</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 => {
console.log(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;
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) {
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/juca-stage/sites/sym/tracol/templates/reference.html.twig");
}
}