var/cache/dev/twig/2b/2b83e11da16d442c204fe87fb25da7feb7b5e3412003ab7e25f3fce303a4ccbc.php line 50

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* reference.html.twig */
  15. class __TwigTemplate_a5944d2bdba562b771006f9aafe46ca7dc331600e2d58e485c3aca0ee8d29439 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'title' => [$this'block_title'],
  25.             'body' => [$this'block_body'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""reference.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""reference.html.twig"));
  40.         $this->parent $this->loadTemplate("base.html.twig""reference.html.twig"1);
  41.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 3
  48.     public function block_title($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         yield "References";
  56.         
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  58.         
  59.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  60.         return; yield '';
  61.     }
  62.     // line 5
  63.     public function block_body($context, array $blocks = [])
  64.     {
  65.         $macros $this->macros;
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  67.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  68.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  69.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  70.         // line 6
  71.         yield "
  72.     ";
  73.         // line 7
  74.         $context["headerContent"] = $this->extensions['App\Twig\ContentExtension']->Content("Reference""Header");
  75.         // line 8
  76.         yield "
  77.     ";
  78.         // line 9
  79.         if ((CoreExtension::getAttribute($this->env$this->source, ($context["headerContent"] ?? null), "picture", [], "any"truetruefalse9) &&  !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"falsefalsefalse9)))) {
  80.             // line 10
  81.             yield "        ";
  82.             $context["backgroundImage"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse10), 0, [], "array"falsefalsefalse10), "path", [], "any"falsefalsefalse10);
  83.             // line 11
  84.             yield "    ";
  85.         } else {
  86.             // line 12
  87.             yield "        ";
  88.             $context["backgroundImage"] = "empty";
  89.             // line 13
  90.             yield "    ";
  91.         }
  92.         // line 14
  93.         yield "    ";
  94.         // line 26
  95.         yield "
  96.     <div class=\"container-fluid reference-page\">
  97.         ";
  98.         // line 29
  99.         $context["sectionContent1"] = $this->extensions['App\Twig\ContentExtension']->Content("Reference""Section-1");
  100.         // line 30
  101.         yield "        <div class=\"col-lg-8 mx-auto div-svg-header pre-section\">
  102.             <div class=\"col-lg-4\" style=\"font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;\">
  103.                 <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
  104.                     <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\"/>
  105.                 </svg>
  106.                 ";
  107.         // line 35
  108.         if ((=== 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))) {
  109.             // line 36
  110.             yield "                    <h1 class=\"project-title\">pas de reference</h1>
  111.                 ";
  112.         } elseif ((=== CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(),         // line 37
  113. (isset($context["references"]) || array_key_exists("references"$context) ? $context["references"] : (function () { throw new RuntimeError('Variable "references" does not exist.'37$this->source); })())), 1))) {
  114.             // line 38
  115.             yield "                    <h1 class=\"project-title\">";
  116.             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"nulltrue);
  117.             yield " référence</h1>
  118.                 ";
  119.         } else {
  120.             // line 40
  121.             yield "                    <h1 class=\"project-title\">";
  122.             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"nulltrue);
  123.             yield " références</h1>
  124.                 ";
  125.         }
  126.         // line 42
  127.         yield "            </div>
  128.             ";
  129.         // line 43
  130.         if (CoreExtension::getAttribute($this->env$this->source, ($context["sectionContent1"] ?? null), "content", [], "any"truetruefalse43)) {
  131.             // line 44
  132.             yield "                <div class=\"separator\"></div>
  133.                 <div id=\"section-1-reference\" class=\"col-lg-6 pre-section-content\">
  134.                     ";
  135.             // line 46
  136.             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"falsefalsefalse46);
  137.             yield "
  138.                 </div>
  139.             ";
  140.         }
  141.         // line 49
  142.         yield "        </div>
  143.         <section class=\"project filter\" style=\"margin-bottom: 60px\">
  144.             <div id=\"button-reference-page\"  class=\"col-lg-8 mx-auto div-svg-header\">
  145.                 <div class=\"input-filter\">
  146.                     <label for=\"all-references\" class=\"mr-1\">TOUS</label>
  147.                     <input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-references\" class=\"mr-1 projectButton\">
  148.                 </div>
  149.                 <div class=\"input-filter\">
  150.                     <label for=\"residences-references\" class=\"mr-2\">RÉSIDENCES</label>
  151.                     <input data-id=\"residences\" type=\"radio\" name=\"type\" id=\"residences-references\" class=\"mr-3 projectButton\">
  152.                 </div>
  153.                 <div class=\"input-filter\">
  154.                     <label for=\"maisons-references\" class=\"mr-2\">MAISONS</label>
  155.                     <input data-id=\"maisons\" type=\"radio\" name=\"type\" id=\"maisons-references\" class=\" projectButton\">
  156.                 </div>
  157.                 ";
  158.         // line 75
  159.         yield "
  160.                 ";
  161.         // line 83
  162.         yield "
  163.             </div>
  164.             <div id=\"reference\" class=\"col-lg-8 mx-auto div-svg-header row\" style=\"display: flex;justify-content: center\">
  165.                 ";
  166.         // line 87
  167.         $context['_parent'] = $context;
  168.         $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); })()));
  169.         foreach ($context['_seq'] as $context["key"] => $context["reference"]) {
  170.             // line 88
  171.             yield "                    <div class=\"col-lg-6 div-img-hover-2 position-relative reference-list-single lightbox-on\" data-id=\"modul-";
  172.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["key"], "html"nulltrue);
  173.             yield "\" style=\"cursor: pointer\">
  174.                         <div class=\"div-hover-2\" id=\"div-hover-2\">
  175.                             <div class=\"d-flex justify-content-between\">
  176.                                 <p class=\"city\">";
  177.             // line 92
  178.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["reference"], "city", [], "any"falsefalsefalse92), "name", [], "any"falsefalsefalse92), "html"nulltrue);
  179.             yield "</p>
  180.                                 <p class=\"date-ref\">";
  181.             // line 93
  182.             yield "</p>
  183.                             </div>
  184.                             <p class=\"project-name\">";
  185.             // line 96
  186.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["reference"], "reference", [], "any"falsefalsefalse96), "html"nulltrue);
  187.             yield "</p>
  188.                             ";
  189.             // line 97
  190.             if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["reference"], "comments", [], "any"falsefalsefalse97), 0, [], "array"falsefalsefalse97), "comment", [], "any"falsefalsefalse97))) {
  191.                 // line 98
  192.                 yield "                                <p class=\"project-content\" style=\"visibility: hidden\">
  193.                                     ";
  194.                 // line 99
  195.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["reference"], "comments", [], "any"falsefalsefalse99), 0, [], "array"falsefalsefalse99), "comment", [], "any"falsefalsefalse99), 0350), "html"nulltrue);
  196.                 yield "
  197.                                 </p>
  198.                                 <a href=\"javascript:void(0);\" class=\"project-arrow-2\">
  199.                                     <span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  200.                                 </a>
  201.                             ";
  202.             } else {
  203.                 // line 105
  204.                 yield "                                <a style=\"margin-top: 180px\" href=\"javascript:void(0);\" class=\"project-arrow-2 \">
  205.                                     <span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  206.                                 </a>
  207.                             ";
  208.             }
  209.             // line 109
  210.             yield "                        </div>
  211.                         <div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">";
  212.             // line 111
  213.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\ContentExtension']->getTypeReferences(CoreExtension::getAttribute($this->env$this->source$context["reference"], "type", [], "any"falsefalsefalse111)), "html"nulltrue);
  214.             yield "</span></div>
  215.                         ";
  216.             // line 112
  217.             if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["reference"], "pictures", [], "any"falsefalsefalse112))) {
  218.                 // line 113
  219.                 yield "                            ";
  220.                 $context['_parent'] = $context;
  221.                 $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source$context["reference"], "pictures", [], "any"falsefalsefalse113), 01));
  222.                 foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
  223.                     // line 114
  224.                     yield "                                ";
  225.                     $context["url"] = ((CoreExtension::inFilter("http"CoreExtension::getAttribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse114))) ? (CoreExtension::getAttribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse114)) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(((("uploads/images/properties/" CoreExtension::getAttribute($this->env$this->source$context["reference"], "id", [], "any"falsefalsefalse114)) . "/") . CoreExtension::getAttribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse114)))));
  226.                     // line 115
  227.                     yield "                                <div class=\"img\" style=\"background-image: url('";
  228.                     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"nulltrue);
  229.                     yield "')\"></div>
  230.                             ";
  231.                 }
  232.                 $_parent $context['_parent'];
  233.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
  234.                 $context array_intersect_key($context$_parent) + $_parent;
  235.                 // line 117
  236.                 yield "                        ";
  237.             } else {
  238.                 // line 118
  239.                 yield "                            <div class=\"img\" style=\"background-image: url('";
  240.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/Hudson_Ontario2.png"), "html"nulltrue);
  241.                 yield "')\"></div>
  242.                         ";
  243.             }
  244.             // line 120
  245.             yield "
  246.                         <div class=\"lightbox\" id=\"modul-";
  247.             // line 121
  248.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["key"], "html"nulltrue);
  249.             yield "\">
  250.                             <div class=\"closer\"></div>
  251.                             <div class=\"arrows left\">&#8592;</div>
  252.                             <div class=\"arrows right\">&#8594;</div>
  253.                             <div class=\"counter\">1/1</div>
  254.                             <ul class=\"items\">
  255.                                 ";
  256.             // line 127
  257.             $context['_parent'] = $context;
  258.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$context["reference"], "pictures", [], "any"falsefalsefalse127));
  259.             foreach ($context['_seq'] as $context["_key"] => $context["picture"]) {
  260.                 // line 128
  261.                 yield "                                    <li class=\"item\">
  262.                                         ";
  263.                 // line 129
  264.                 $context["url"] = ((CoreExtension::inFilter("http"CoreExtension::getAttribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse129))) ? (CoreExtension::getAttribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse129)) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(((("uploads/images/properties/" CoreExtension::getAttribute($this->env$this->source$context["reference"], "id", [], "any"falsefalsefalse129)) . "/") . CoreExtension::getAttribute($this->env$this->source$context["picture"], "url", [], "any"falsefalsefalse129)))));
  265.                 // line 130
  266.                 yield "                                        <img class=\"img\" src=\"";
  267.                 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"nulltrue);
  268.                 yield "\">
  269.                                     </li>
  270.                                 ";
  271.             }
  272.             $_parent $context['_parent'];
  273.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['picture'], $context['_parent'], $context['loop']);
  274.             $context array_intersect_key($context$_parent) + $_parent;
  275.             // line 133
  276.             yield "                            </ul>
  277.                         </div>
  278.                     </div>
  279.                 ";
  280.         }
  281.         $_parent $context['_parent'];
  282.         unset($context['_seq'], $context['_iterated'], $context['key'], $context['reference'], $context['_parent'], $context['loop']);
  283.         $context array_intersect_key($context$_parent) + $_parent;
  284.         // line 138
  285.         yield "
  286.                 <div class=\"text-center text-capitalize more-projects\">
  287.                     <p>AFFICHER PLUS DE REFERENCES</p>
  288.                 </div>
  289.             </div>
  290.         </section>
  291.     </div>
  292.     <script>
  293.         for (const eElement of document.getElementsByClassName('projectButton')) {
  294.             eElement.addEventListener('click', function (e) {
  295.                 e.preventDefault()
  296.                 for (let button of document.getElementsByClassName('projectButton')) {
  297.                     if (button.classList.contains('all')){
  298.                         button.classList.remove('all')
  299.                         button.classList.add('come')
  300.                         //button.querySelector('span').classList.replace('span-all', 'span-projects')
  301.                     }
  302.                 }
  303.                 eElement.classList.remove('come')
  304.                 eElement.classList.add('all')
  305.                 //eElement.querySelector('span').classList.replace('span-projects', 'span-all')
  306.                 fetch('references/display/'+this.dataset.id, {
  307.                     method: 'GET',
  308.                 })
  309.                     .then(response => response.json())
  310.                     .then(data => {
  311.                         document.getElementById('reference').innerHTML = ''
  312.                         document.getElementById('reference').innerHTML = data.data
  313.                         _ww = \$(window).width();
  314.                         var lightbox = \$('.lightbox'),
  315.                             item = 0;
  316.                         \$('.lightbox-on').click(function(e){
  317.                             e.stopPropagation();
  318.                             item = 0;
  319.                             var id = \$(this).attr('data-id'),
  320.                                 max = 0;
  321.                             \$('#'+id).toggle();
  322.                             \$('#'+id).animate({opacity: 1}, 300);
  323.                             \$('#'+id).find('img').each(function( i ) {
  324.                                 max = i;
  325.                                 item = 1;
  326.                                 counter(item, max+1);
  327.                                 itemWidth(\$(this));
  328.                             });
  329.                         });
  330.                         lightbox.click(function(e) {
  331.                             e.stopPropagation();
  332.                             \$(this).animate({opacity: 0}, 300, function(){
  333.                                 \$(this).toggle();
  334.                             });
  335.                         });
  336.                         \$('.closer').on('click', function (e) {
  337.                             e.stopPropagation();
  338.                             \$(this).parent().animate(
  339.                                 {opacity: 0},
  340.                                 300,
  341.                                 function(){
  342.                                     \$(this).toggle();
  343.                                 }
  344.                             );
  345.                         });
  346.                         function itemWidth(img){
  347.                             img.closest('.items').width(img.width());
  348.                         }
  349.                         function counter(item, max){
  350.                             \$('.counter').text(item + ' / ' + max);
  351.                         }
  352.                         \$('.item', lightbox).on('click, swipeleft', function (e) {
  353.                             var wd = \$(this).width(),
  354.                                 last = \$(this).parent().find('.item').last(),
  355.                                 img = \$(this).find('.img');
  356.                             itemWidth(img);
  357.                             \$(this).animate(
  358.                                 {marginLeft: -wd, opacity: 0},
  359.                                 500,
  360.                                 'swing',
  361.                                 function(){
  362.                                     \$(this).insertAfter(last);
  363.                                     \$(this).css({marginLeft: 0, opacity: 1});
  364.                                 }
  365.                             );
  366.                         });
  367.                         \$('.item', lightbox).on('swiperight', function (e) {
  368.                             var wd = \$(this).width(),
  369.                                 first = \$(this).parent().find('.item').first(),
  370.                                 last = \$(this).parent().find('.item').last(),
  371.                                 img = \$(this).find('.img');
  372.                             itemWidth(img);
  373.                             \$(last).insertBefore(\$(this));
  374.                             \$(last).css({marginLeft: -wd, opacity: 0});
  375.                             \$(this).parent().find('.item').eq(0).animate(
  376.                                 {marginLeft: 0, opacity: 1},
  377.                                 500,
  378.                                 'swing'
  379.                             );
  380.                         });
  381.                         \$('.arrows', lightbox).on('click', function (e) {
  382.                             e.stopPropagation();
  383.                             var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
  384.                                 max = \$(this)
  385.                                     .siblings('.items').find('.item').length,
  386.                                 first = \$(this).siblings('.items').find('.item').first(),
  387.                                 last = \$(this).siblings('.items').find('.item').last(),
  388.                                 isRight = \$(this).hasClass('right'),
  389.                                 marginL = isRight ? -wd : 0,
  390.                                 marginL0 = isRight ? 0: -wd,
  391.                                 opacOn = isRight ? 1 : 0,
  392.                                 opacOff = isRight ? 0 : 1;
  393.                             if (!isRight){
  394.                                 \$(last).insertBefore(first);
  395.                                 \$(last).css({marginLeft: -wd, opacity: 0});
  396.                                 item++;
  397.                                 if (item == max+1) {item = 1};
  398.                             } else {
  399.                                 item--;
  400.                                 if (item == 0) {item = max};
  401.                             };
  402.                             counter(item, max);
  403.                             var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
  404.                             itemWidth(img);
  405.                             \$(this).siblings('.items').find('.item').eq(1).animate(
  406.                                 {opacity: opacOn},
  407.                                 500,
  408.                                 'swing');
  409.                             \$(this).siblings('.items').find('.item').eq(0).animate(
  410.                                 {marginLeft: marginL, opacity: 1},
  411.                                 500,
  412.                                 'swing',
  413.                                 function(){
  414.                                     if (isRight){
  415.                                         \$(this).insertAfter(last);
  416.                                         \$(this).css({ marginLeft: 0, opacity: 1});
  417.                                     }
  418.                                 }
  419.                             );
  420.                         });
  421.                         if (_ww > 768){
  422.                             \$('.div-img-hover-2').hover(function (e) {
  423.                                 \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  424.                                 var htext = \$(this).find('.project-content').height();
  425.                                 if (htext == undefined){htext = 0};
  426.                                 \$(this).find('.div-hover-2').animate({height : htext+180}, 150);
  427.                                 \$(this).find('.project-content').css({'visibility': 'visible'});
  428.                                 \$(this).find('.project-content').animate({opacity: 1}, 150);
  429.                             }, function() {
  430.                                 \$(this).find('.div-hover-2').animate({height : 85}, 150);
  431.                                 \$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
  432.                                 \$(this).find('.project-content').animate({opacity: 0}, 150, function(){
  433.                                     \$(this).find('.project-content').css({'visibility': 'hidden'});
  434.                                 });
  435.                             });
  436.                         } else {
  437.                             \$('.div-img-hover-2').on( \"tap\", function( event ) {
  438.                                 var opened = \$(this).find('.div-hover-2').hasClass('open'),
  439.                                     ht = opened ? 85 : '100%',
  440.                                     vis = opened ? 0 : 1;
  441.                                 \$(this).find('.div-hover-2').toggleClass('open');
  442.                                 \$(this).find('.div-hover-2').animate({height : ht}, 150);
  443.                                 \$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
  444.                             });
  445.                         }
  446.                         \$('.div-hover').hover(function (e) {
  447.                             \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  448.                         }, function() {
  449.                             \$(this).find('.project-arrow-2').animate({opacity: 0}, 50);
  450.                         });
  451.                     })
  452.                     .catch((error) => {
  453.                         console.error('Error:', error);
  454.                     });
  455.             })
  456.         }
  457.         if (window.matchMedia(\"(max-width: 768px)\").matches) {
  458.             new Flicking(\"#flick5\", {
  459.                 moveType: \"freeScroll\",
  460.                 bound: true
  461.             });
  462.         }
  463.     </script>
  464. ";
  465.         
  466.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  467.         
  468.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  469.         return; yield '';
  470.     }
  471.     /**
  472.      * @codeCoverageIgnore
  473.      */
  474.     public function getTemplateName()
  475.     {
  476.         return "reference.html.twig";
  477.     }
  478.     /**
  479.      * @codeCoverageIgnore
  480.      */
  481.     public function isTraitable()
  482.     {
  483.         return false;
  484.     }
  485.     /**
  486.      * @codeCoverageIgnore
  487.      */
  488.     public function getDebugInfo()
  489.     {
  490.         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,);
  491.     }
  492.     public function getSourceContext()
  493.     {
  494.         return new Source("{% extends 'base.html.twig' %}
  495. {% block title %}References{% endblock %}
  496. {% block body %}
  497.     {% set headerContent = content('Reference', 'Header') %}
  498.     {% if headerContent.picture is defined and headerContent.picture is not empty %}
  499.         {% set backgroundImage = headerContent.picture[0].path %}
  500.     {% else %}
  501.         {% set backgroundImage = 'empty' %}
  502.     {% endif %}
  503.     {#
  504.     <header class=\"header-tracol\" style=\"background-image: url('/uploads/images/{{ backgroundImage }}');\">
  505.         <div class=\"col-lg-8 mx-auto div-svg-header\">
  506.             {% if headerContent.name is defined %}
  507.                 <div class=\"header-habiter-div\">
  508.                     <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>
  509.                     <h2 class=\"header-habiter-title col-lg-12\">{{ headerContent.name }}</h2>
  510.                 </div>
  511.             {% endif %}
  512.         </div>
  513.     </header>
  514.     #}
  515.     <div class=\"container-fluid reference-page\">
  516.         {% set sectionContent1 = content('Reference', 'Section-1') %}
  517.         <div class=\"col-lg-8 mx-auto div-svg-header pre-section\">
  518.             <div class=\"col-lg-4\" style=\"font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;\">
  519.                 <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.089\" height=\"14.77\" viewBox=\"0 0 9.089 14.77\">
  520.                     <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\"/>
  521.                 </svg>
  522.                 {% if references|length == 0 %}
  523.                     <h1 class=\"project-title\">pas de reference</h1>
  524.                 {% elseif references|length == 1  %}
  525.                     <h1 class=\"project-title\">{{ references|length }} référence</h1>
  526.                 {% else %}
  527.                     <h1 class=\"project-title\">{{ references|length }} références</h1>
  528.                 {% endif %}
  529.             </div>
  530.             {% if sectionContent1.content is defined %}
  531.                 <div class=\"separator\"></div>
  532.                 <div id=\"section-1-reference\" class=\"col-lg-6 pre-section-content\">
  533.                     {{ sectionContent1.content|raw }}
  534.                 </div>
  535.             {% endif %}
  536.         </div>
  537.         <section class=\"project filter\" style=\"margin-bottom: 60px\">
  538.             <div id=\"button-reference-page\"  class=\"col-lg-8 mx-auto div-svg-header\">
  539.                 <div class=\"input-filter\">
  540.                     <label for=\"all-references\" class=\"mr-1\">TOUS</label>
  541.                     <input data-id=\"all\" type=\"radio\" name=\"type\" id=\"all-references\" class=\"mr-1 projectButton\">
  542.                 </div>
  543.                 <div class=\"input-filter\">
  544.                     <label for=\"residences-references\" class=\"mr-2\">RÉSIDENCES</label>
  545.                     <input data-id=\"residences\" type=\"radio\" name=\"type\" id=\"residences-references\" class=\"mr-3 projectButton\">
  546.                 </div>
  547.                 <div class=\"input-filter\">
  548.                     <label for=\"maisons-references\" class=\"mr-2\">MAISONS</label>
  549.                     <input data-id=\"maisons\" type=\"radio\" name=\"type\" id=\"maisons-references\" class=\" projectButton\">
  550.                 </div>
  551.                 {#
  552.                 <div class=\"input-filter\" style=\"padding-right:20px;\">
  553.                    <label for=\"commerces-references\">COMMERCES</label>
  554.                    <input data-id=\"commerces\" type=\"radio\" name=\"type\" id=\"commerces-references\" class=\" projectButton\">
  555.                </div>
  556.                <div class=\"input-filter\" style=\"padding-right:20px;\">
  557.                    <label for=\"bureaux-references\">BUREAUX</label>
  558.                    <input data-id=\"bureaux\" type=\"radio\" name=\"type\" id=\"bureaux-references\" class=\" projectButton\">
  559.                </div>
  560.                 #}
  561.                 {#
  562.                 <button data-id=\"all\" class=\"btn btn-primary all border-radius projectButton\"><span class=\"span-all\">TOUS</span></button>
  563.                 <button data-id=\"residences\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">RÉSIDENCES</span></button>
  564.                 <button data-id=\"maisons\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">MAISONS</span></button>
  565.                 <button data-id=\"commerces\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">COMMERCES</span></button>
  566.                 <button data-id=\"bureaux\" class=\"btn btn-primary come border-radius projectButton\"><span class=\"span-projects\">BUREAUX</span></button>
  567.                 #}
  568.             </div>
  569.             <div id=\"reference\" class=\"col-lg-8 mx-auto div-svg-header row\" style=\"display: flex;justify-content: center\">
  570.                 {% for key, reference in references %}
  571.                     <div class=\"col-lg-6 div-img-hover-2 position-relative reference-list-single lightbox-on\" data-id=\"modul-{{ key }}\" style=\"cursor: pointer\">
  572.                         <div class=\"div-hover-2\" id=\"div-hover-2\">
  573.                             <div class=\"d-flex justify-content-between\">
  574.                                 <p class=\"city\">{{ reference.city.name }}</p>
  575.                                 <p class=\"date-ref\">{# {{ reference.updated_at|date(\"d/m/Y\") }} #}</p>
  576.                             </div>
  577.                             <p class=\"project-name\">{{ reference.reference }}</p>
  578.                             {% if reference.comments[0].comment is not empty %}
  579.                                 <p class=\"project-content\" style=\"visibility: hidden\">
  580.                                     {{ reference.comments[0].comment|slice(0, 350) }}
  581.                                 </p>
  582.                                 <a href=\"javascript:void(0);\" class=\"project-arrow-2\">
  583.                                     <span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  584.                                 </a>
  585.                             {% else %}
  586.                                 <a style=\"margin-top: 180px\" href=\"javascript:void(0);\" class=\"project-arrow-2 \">
  587.                                     <span class=\"galerry-ref\">GALERIE PHOTOS</span><i class=\"fas fa-arrow-right project-svg-arrow-2\"></i>
  588.                                 </a>
  589.                             {% endif %}
  590.                         </div>
  591.                         <div class=\"tag-ref-projet-2\"><span class=\"text-tag-ref\">{{ getTypeReferences(reference.type) }}</span></div>
  592.                         {% if reference.pictures is not empty %}
  593.                             {% for picture in reference.pictures|slice(0,1) %}
  594.                                 {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~reference.id~'/'~picture.url) %}
  595.                                 <div class=\"img\" style=\"background-image: url('{{ url }}')\"></div>
  596.                             {% endfor %}
  597.                         {% else %}
  598.                             <div class=\"img\" style=\"background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')\"></div>
  599.                         {% endif %}
  600.                         <div class=\"lightbox\" id=\"modul-{{ key }}\">
  601.                             <div class=\"closer\"></div>
  602.                             <div class=\"arrows left\">&#8592;</div>
  603.                             <div class=\"arrows right\">&#8594;</div>
  604.                             <div class=\"counter\">1/1</div>
  605.                             <ul class=\"items\">
  606.                                 {% for picture in reference.pictures %}
  607.                                     <li class=\"item\">
  608.                                         {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~reference.id~'/'~picture.url) %}
  609.                                         <img class=\"img\" src=\"{{ url }}\">
  610.                                     </li>
  611.                                 {% endfor %}
  612.                             </ul>
  613.                         </div>
  614.                     </div>
  615.                 {% endfor %}
  616.                 <div class=\"text-center text-capitalize more-projects\">
  617.                     <p>AFFICHER PLUS DE REFERENCES</p>
  618.                 </div>
  619.             </div>
  620.         </section>
  621.     </div>
  622.     <script>
  623.         for (const eElement of document.getElementsByClassName('projectButton')) {
  624.             eElement.addEventListener('click', function (e) {
  625.                 e.preventDefault()
  626.                 for (let button of document.getElementsByClassName('projectButton')) {
  627.                     if (button.classList.contains('all')){
  628.                         button.classList.remove('all')
  629.                         button.classList.add('come')
  630.                         //button.querySelector('span').classList.replace('span-all', 'span-projects')
  631.                     }
  632.                 }
  633.                 eElement.classList.remove('come')
  634.                 eElement.classList.add('all')
  635.                 //eElement.querySelector('span').classList.replace('span-projects', 'span-all')
  636.                 fetch('references/display/'+this.dataset.id, {
  637.                     method: 'GET',
  638.                 })
  639.                     .then(response => response.json())
  640.                     .then(data => {
  641.                         document.getElementById('reference').innerHTML = ''
  642.                         document.getElementById('reference').innerHTML = data.data
  643.                         _ww = \$(window).width();
  644.                         var lightbox = \$('.lightbox'),
  645.                             item = 0;
  646.                         \$('.lightbox-on').click(function(e){
  647.                             e.stopPropagation();
  648.                             item = 0;
  649.                             var id = \$(this).attr('data-id'),
  650.                                 max = 0;
  651.                             \$('#'+id).toggle();
  652.                             \$('#'+id).animate({opacity: 1}, 300);
  653.                             \$('#'+id).find('img').each(function( i ) {
  654.                                 max = i;
  655.                                 item = 1;
  656.                                 counter(item, max+1);
  657.                                 itemWidth(\$(this));
  658.                             });
  659.                         });
  660.                         lightbox.click(function(e) {
  661.                             e.stopPropagation();
  662.                             \$(this).animate({opacity: 0}, 300, function(){
  663.                                 \$(this).toggle();
  664.                             });
  665.                         });
  666.                         \$('.closer').on('click', function (e) {
  667.                             e.stopPropagation();
  668.                             \$(this).parent().animate(
  669.                                 {opacity: 0},
  670.                                 300,
  671.                                 function(){
  672.                                     \$(this).toggle();
  673.                                 }
  674.                             );
  675.                         });
  676.                         function itemWidth(img){
  677.                             img.closest('.items').width(img.width());
  678.                         }
  679.                         function counter(item, max){
  680.                             \$('.counter').text(item + ' / ' + max);
  681.                         }
  682.                         \$('.item', lightbox).on('click, swipeleft', function (e) {
  683.                             var wd = \$(this).width(),
  684.                                 last = \$(this).parent().find('.item').last(),
  685.                                 img = \$(this).find('.img');
  686.                             itemWidth(img);
  687.                             \$(this).animate(
  688.                                 {marginLeft: -wd, opacity: 0},
  689.                                 500,
  690.                                 'swing',
  691.                                 function(){
  692.                                     \$(this).insertAfter(last);
  693.                                     \$(this).css({marginLeft: 0, opacity: 1});
  694.                                 }
  695.                             );
  696.                         });
  697.                         \$('.item', lightbox).on('swiperight', function (e) {
  698.                             var wd = \$(this).width(),
  699.                                 first = \$(this).parent().find('.item').first(),
  700.                                 last = \$(this).parent().find('.item').last(),
  701.                                 img = \$(this).find('.img');
  702.                             itemWidth(img);
  703.                             \$(last).insertBefore(\$(this));
  704.                             \$(last).css({marginLeft: -wd, opacity: 0});
  705.                             \$(this).parent().find('.item').eq(0).animate(
  706.                                 {marginLeft: 0, opacity: 1},
  707.                                 500,
  708.                                 'swing'
  709.                             );
  710.                         });
  711.                         \$('.arrows', lightbox).on('click', function (e) {
  712.                             e.stopPropagation();
  713.                             var wd = \$(this).siblings('.items').find('.item').eq(0).width(),
  714.                                 max = \$(this)
  715.                                     .siblings('.items').find('.item').length,
  716.                                 first = \$(this).siblings('.items').find('.item').first(),
  717.                                 last = \$(this).siblings('.items').find('.item').last(),
  718.                                 isRight = \$(this).hasClass('right'),
  719.                                 marginL = isRight ? -wd : 0,
  720.                                 marginL0 = isRight ? 0: -wd,
  721.                                 opacOn = isRight ? 1 : 0,
  722.                                 opacOff = isRight ? 0 : 1;
  723.                             if (!isRight){
  724.                                 \$(last).insertBefore(first);
  725.                                 \$(last).css({marginLeft: -wd, opacity: 0});
  726.                                 item++;
  727.                                 if (item == max+1) {item = 1};
  728.                             } else {
  729.                                 item--;
  730.                                 if (item == 0) {item = max};
  731.                             };
  732.                             counter(item, max);
  733.                             var img = \$(this).siblings('.items').find('.item').eq(0).find('.img');
  734.                             itemWidth(img);
  735.                             \$(this).siblings('.items').find('.item').eq(1).animate(
  736.                                 {opacity: opacOn},
  737.                                 500,
  738.                                 'swing');
  739.                             \$(this).siblings('.items').find('.item').eq(0).animate(
  740.                                 {marginLeft: marginL, opacity: 1},
  741.                                 500,
  742.                                 'swing',
  743.                                 function(){
  744.                                     if (isRight){
  745.                                         \$(this).insertAfter(last);
  746.                                         \$(this).css({ marginLeft: 0, opacity: 1});
  747.                                     }
  748.                                 }
  749.                             );
  750.                         });
  751.                         if (_ww > 768){
  752.                             \$('.div-img-hover-2').hover(function (e) {
  753.                                 \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  754.                                 var htext = \$(this).find('.project-content').height();
  755.                                 if (htext == undefined){htext = 0};
  756.                                 \$(this).find('.div-hover-2').animate({height : htext+180}, 150);
  757.                                 \$(this).find('.project-content').css({'visibility': 'visible'});
  758.                                 \$(this).find('.project-content').animate({opacity: 1}, 150);
  759.                             }, function() {
  760.                                 \$(this).find('.div-hover-2').animate({height : 85}, 150);
  761.                                 \$(this).find('.project-arrow-2').animate({opacity: 0}, 150);
  762.                                 \$(this).find('.project-content').animate({opacity: 0}, 150, function(){
  763.                                     \$(this).find('.project-content').css({'visibility': 'hidden'});
  764.                                 });
  765.                             });
  766.                         } else {
  767.                             \$('.div-img-hover-2').on( \"tap\", function( event ) {
  768.                                 var opened = \$(this).find('.div-hover-2').hasClass('open'),
  769.                                     ht = opened ? 85 : '100%',
  770.                                     vis = opened ? 0 : 1;
  771.                                 \$(this).find('.div-hover-2').toggleClass('open');
  772.                                 \$(this).find('.div-hover-2').animate({height : ht}, 150);
  773.                                 \$(this).find('.project-arrow-2').animate({opacity: vis}, 150);
  774.                             });
  775.                         }
  776.                         \$('.div-hover').hover(function (e) {
  777.                             \$(this).find('.project-arrow-2').animate({opacity: 1}, 150);
  778.                         }, function() {
  779.                             \$(this).find('.project-arrow-2').animate({opacity: 0}, 50);
  780.                         });
  781.                     })
  782.                     .catch((error) => {
  783.                         console.error('Error:', error);
  784.                     });
  785.             })
  786.         }
  787.         if (window.matchMedia(\"(max-width: 768px)\").matches) {
  788.             new Flicking(\"#flick5\", {
  789.                 moveType: \"freeScroll\",
  790.                 bound: true
  791.             });
  792.         }
  793.     </script>
  794. {#    <script>#}
  795. {#        \$('.slider-ref-detail').slick({#}
  796. {#            dots: false,#}
  797. {#            infinite: true,#}
  798. {#            speed: 300,#}
  799. {#            slidesToShow: 1,#}
  800. {#            slidesToScroll: 1,#}
  801. {#            autoplay: true,#}
  802. {#            responsive: [#}
  803. {#                {#}
  804. {#                    breakpoint: 576,#}
  805. {#                    settings: {#}
  806. {#                        slidesToShow: 1,#}
  807. {#                        slidesToScroll: 1#}
  808. {#                    }#}
  809. {#                }#}
  810. {#                // You can unslick at a given breakpoint now by adding:#}
  811. {#                // settings: \"unslick\"#}
  812. {#                // instead of a settings object#}
  813. {#            ]#}
  814. {#        });#}
  815. {#    </script>#}
  816. {% endblock %}
  817. ""reference.html.twig""/home/fuzxzwq/www/templates/reference.html.twig");
  818.     }
  819. }