var/cache/dev/twig/61/619c99646fc27c5ba1552116b4f923b5ca0d2b7a133e16c100d93f9bfa749832.php line 91

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