templates/FrontBundle/Page/spectacle-deesses.html.twig line 1

Open in your IDE?
  1. {% extends 'FrontBundle/layout.html.twig' %}
  2. {% block title %}{{ app_sitename }} - {{ page.metaTitle }}{% endblock %}
  3. {% block description %}{{ page.metaDescription }}{% endblock %}
  4. {% block extra_class %}native page_spectacle{% endblock %}
  5. {% block menu_min %}931{% endblock %}
  6. {# {% block menu_max %}3076{% endblock %} #}
  7. {% block sub_header %}
  8.     <div class="sub-header anchor">
  9.         <ul>
  10.             <li><a href="#spectacle">DÉESSES</a></li>
  11.             <li><a href="#artistes">{{ 'spectacle_artistes'|tr(tr)|raw }}</a></li>
  12.             <li><a href="#coulisses">{{ 'spectacle_coulisses'|tr(tr)|raw }}</a></li>
  13.         </ul>
  14.     </div>
  15. {% endblock %}
  16. {% block stylesheets %}
  17.     <link href="/front/css/owl.carousel.min.css" rel="stylesheet">
  18.     <link href="/front/css/owl.theme.default.min.css" rel="stylesheet">
  19.     <link href="/plugins/photoswipe/photoswipe.css" rel="stylesheet">
  20.     <link href="/plugins/photoswipe/default-skin/default-skin.css" rel="stylesheet" type="text/css"/>
  21.     <link href="/front/css/carousel.css" rel="stylesheet">
  22.     <style>
  23.         @media screen and (min-width: 1047px) {
  24.             .full-size-image {
  25.                 position: absolute;
  26.                 top: 0;
  27.                 left: 0;
  28.                 width: 100% !important;
  29.                 height: 100% !important;
  30.                 object-fit: contain;
  31.                 background-image: url("/front/img/home-deesses.jpg");
  32.                 background-position: center;
  33.                 background-repeat: no-repeat;
  34.                 background-size: cover;
  35.             }
  36.         }
  37.    .page_spectacle .mini-suites .subname{
  38.             font-size: 10px;
  39.         }
  40.   .page_spectacle #spectacle {
  41.       background-image: url(/front/img/deesses-bg.svg);
  42.   background-repeat: no-repeat;
  43.     background-position-x: -100px;
  44.     background-position-y: -20px;
  45.   }
  46.         .spectacle-header .order-btn {
  47.             bottom: 130px;
  48.         }
  49.         .video-background {
  50.             position: absolute;
  51.             top: 0;
  52.             left: 0;
  53.             width: 100%;
  54.             height: 100%;
  55.             overflow: hidden;
  56.             z-index: 0; /* Derrière le contenu principal */
  57.             /*      display: flex;
  58.                   justify-content: center;
  59.                   align-items: center;*/
  60.             background-image: url('/front/img/preview.jpg');
  61.             background-size: cover;
  62.             background-repeat: no-repeat;
  63.             background-position: top center;
  64.         }
  65.         .video-background iframe {
  66.             left: 50%;
  67.             position: absolute;
  68.             transform: translateX(-50%);
  69.         }
  70.     </style>
  71. {% endblock %}
  72. {% block body %}
  73.     {#
  74.     <section class="info-header2 anchor">
  75.       <ul>
  76.         <li><a href="#spectacle">Frénésie</a></li>
  77.         <li><a href="#artistes">Artistes</a></li>
  78.         <li><a href="#coulisses">Coulisses</a></li>
  79.       </ul>
  80.     </section>
  81.     #}
  82.     <section class="menus-tarifs-callendar espace-header spectacle-header p-0 home">
  83.         <div class="video-background">
  84.             <iframe
  85.                     src="https://player.vimeo.com/video/1030772014?background=1&autoplay=1&loop=1&muted=1"
  86.                     frameborder="0"
  87.                     allow="autoplay; fullscreen;"
  88.                     allowfullscreen
  89.                     id="video-iframe"
  90.                     class="video-iframe">
  91.             </iframe>
  92.         </div>
  93.         {# <video class="video-slide active" src="/front/videos/palace3.mp4" autoplay muted loop playsinline></video> #}
  94.         <div class="content pt-0">
  95.             <p><img src="/front/img/spectacle-title-line.svg" alt="line" class="page_spectacle_logo_line"  /><img src="/front/img/COVER_DEESES_LOGO.png" alt="line" class="page_spectacle_logo_line w-50" /><img src="/front/img/spectacle-title-line.svg" alt="line" class="page_spectacle_logo_line"  /></p>
  96.             <p class="sub-title mb-0">{{ 'deesse_title'|tr(tr)|raw }}</p>
  97.             <p class="desc mt-5 pt-2 mb-0">{{ 'deesse_subtitle'|tr(tr)|raw }}</p>
  98.         </div>
  99.         <a href="/{{app.request.locale }}/{{ 'reservation'|getUrl(app.request.locale) }}" class="order-btn">{{ 'general_reserver'|tr(tr)|raw }}</a>
  100.         <a href="#spectacle" class="arrow-btn"><img src="/front/img/spectacle-header-arrow-b.svg" alt="next" width="20px" /></a>
  101.          {% set cata_link = '/front/Brochure-deesses-royal-palace-2025.pdf' %}
  102.         {% if app.request.locale == 'de' %}
  103.             {% set cata_link = '/front/Brochure-deesses-royal-palace-2025-de.pdf' %}
  104.         {% endif %}
  105.         <a href="{{cata_link}}" class="cata-btn" target="_blank">{{ 'spectacle_cata'|tr(tr)|raw }} <img src="/front/img/espaces-down-link.svg" alt="dowload" width="33px" /></a>
  106.         <ul>
  107.             <li class="active"><a href="#spectacle">DÉESSES</a></li>
  108.             <li><a href="#artistes">{{ 'spectacle_artistes'|tr(tr)|raw }}</a></li>
  109.             <li><a href="#coulisses">{{ 'spectacle_coulisses'|tr(tr)|raw }}</a></li>
  110.         </ul>
  111.     </section>
  112.     <section id="spectacle" class="espace-content full pt-5 mt-5 overflow-h overflow-y-h">
  113.         <div class="content">
  114.             <h1 class="pt-5 mb-3 no-bar">{{ 'deesse_s1_maintitle'|tr(tr)|upper }}<span class="full-bar"></span></h1>
  115.             <h5 class="mb-3 mt-5">{{ 'grandamour_s1_title'|tr(tr)|raw }}</h5>
  116.             <p class="p-0">{{ 'deesse_s1_title'|tr(tr)|raw }}</p>
  117.             <div class="pre-carousel pt-3 mt-3">
  118.                 <a href="#" class="active photo">{{ 'spectacle_photos'|tr(tr)|raw }}<span>12</span></a>
  119.                 <a href="#" class="video d-none">{{ 'spectacle_video'|tr(tr)|raw }}<span>1</span></a>
  120.             </div>
  121.             <div class="carousel"></div>
  122.             <div class="owl-dots">
  123.                 <button role="button" class="owl-dot"><span></span></button>
  124.                 <button role="button" class="owl-dot"><span></span></button>
  125.                 <button role="button" class="owl-dot"><span></span></button>
  126.                 <button role="button" class="owl-dot"><span></span></button>
  127.                 <button role="button" class="owl-dot"><span></span></button>
  128.             </div>
  129.             <div class="yt">
  130.                 <iframe width="560" height="315" src="https://www.youtube.com/embed/HcDfortoJtU?si=A7z3NFxBwg-Pwb7-" allow="autoplay" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  131.             </div>
  132.         </div>
  133.     </section>
  134.     <section id="artistes" class="espace-content full mt-5 pt-5 overflow-h">
  135.         <div class="content">
  136.             <h2 class="pt-5 mt-0 mb-3 no-bar"><span>{{ 'spectacle_artistes2'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
  137.             <h5 class="mb-5 mt-5"><span>&nbsp;</span></h5>
  138.         </div>
  139.     </section>
  140.     <section class="slider p-0">
  141.         <div class="slider-after"></div>
  142.         <div class="content overflow-h" style="height:620px;">
  143.             <div class="owl-carousel mini-suites">
  144.                 <div class="item" data-link="#">
  145.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/sarita.jpg') }}');">
  146.                         <div class="gradient"></div>
  147.                         <p class="name">Sarita</p>
  148.                         <p class="subname">{{ 'grandamour_a3'|tr(tr)|upper|raw }}</p>
  149.                         <a href="https://www.instagram.com/wanderlustdancer/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  150.                     </div>
  151.                 </div>
  152.                 <div class="item" data-link="#">
  153.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/antony-cesar.jpg') }}');">
  154.                         <div class="gradient"></div>
  155.                         <p class="name">Antony César</p>
  156.                         <p class="subname">{{ 'deesse_a2'|tr(tr)|upper|raw }}</p>
  157.                         <a href="https://www.instagram.com/antony__cesar/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  158.                     </div>
  159.                 </div>
  160.                 <div class="item" data-link="#">
  161.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/troupe-kevin-richter.jpg') }}');">
  162.                         <div class="gradient"></div>
  163.                         <p class="name">Troupe Kevin Richter</p>
  164.                         <p class="subname">{{ 'deesse_a3'|tr(tr)|upper|raw }}</p>
  165.                         <a href="https://www.instagram.com/r.kevin_rkt/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  166.                     </div>
  167.                 </div>
  168.                 <div class="item" data-link="#">
  169.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/jerome-murat.jpg') }}');">
  170.                         <div class="gradient"></div>
  171.                         <p class="name">Jerome Murat</p>
  172.                         <p class="subname">{{ 'deesse_a4'|tr(tr)|upper|raw }}</p>
  173.                         <a href="https://www.instagram.com/jeromemurat/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  174.                     </div>
  175.                 </div>
  176.                 <div class="item" data-link="#">
  177.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/zhang-fan.jpg') }}');">
  178.                         <div class="gradient"></div>
  179.                         <p class="name">Zhang Fan </p>
  180.                         <p class="subname">{{ 'deesse_a5'|tr(tr)|upper|raw }}</p>
  181.                         <!-- <a href="https://www.instagram.com/caiyong1112/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a> -->
  182.                     </div>
  183.                 </div>
  184.                 <div class="item" data-link="#">
  185.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/michail-ermakov.jpg') }}');">
  186.                         <div class="gradient"></div>
  187.                         <p class="name">Michail Ermakov</p>
  188.                         <p class="subname">{{ 'deesse_a6'|tr(tr)|upper|raw }}</p>
  189.                         <!--  <a href="https://www.instagram.com/shakirov_oleg/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a> -->
  190.                     </div>
  191.                 </div>
  192.                 <div class="item" data-link="#">
  193.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/bello-sisters.jpg') }}');">
  194.                         <div class="gradient"></div>
  195.                         <p class="name">Bello Sisters</p>
  196.                         <p class="subname" style="bottom:100px";>{{ 'deesse_a7'|tr(tr)|upper|raw }}</p>
  197.                         <a href="https://www.instagram.com/bellosistersofficial/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  198.                     </div>
  199.                 </div>
  200.     <div class="item" data-link="#">
  201.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/meggy-forget.jpg') }}');">
  202.                         <div class="gradient"></div>
  203.                         <p class="name">Meggy Forget</p>
  204.                         <p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
  205.                         <a href="https://www.instagram.com/meggyforget/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  206.                     </div>
  207.                 </div>
  208.                 <div class="item" data-link="#">
  209.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/margaux-faisandier.jpg') }}');">
  210.                         <div class="gradient"></div>
  211.                         <p class="name">Margaux Faisandier</p>
  212.                         <p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
  213.                        <!-- <a href="https://www.instagram.com/bellosistersofficial/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a> -->
  214.                     </div>
  215.                 </div>
  216.                 <div class="item" data-link="#">
  217.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/leila-veslard.jpg') }}');">
  218.                         <div class="gradient"></div>
  219.                         <p class="name">Leila Veslard</p>
  220.                         <p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
  221.                         <a href="https://www.instagram.com/leilaveslardoff/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  222.                     </div>
  223.                 </div>
  224.                 <div class="item" data-link="#">
  225.                     <div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/charlene-veyrunes.jpg') }}');">
  226.                         <div class="gradient"></div>
  227.                         <p class="name">Charlene Veyrunes</p>
  228.                         <p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
  229.                         <a href="https://www.instagram.com/charleneveyrunes/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
  230.                     </div>
  231.                 </div>
  232.                         
  233.             </div>
  234. <p class="desc">{{ 'frenesie_a3_desc'|tr(tr)|raw }}</p>
  235.         </div>
  236.         <div class="buttons hide">
  237.             <a href="#infos" class="artist-link">Découvrez prochainement l'artiste</a>
  238.         </div>
  239.         <div class="red-bar"></div>
  240.     </section>
  241.     <section id="coulisses" class="espace-content full mt-2 pt-5 overflow-h">
  242.         <div class="content">
  243.             <h2 class="pt-5 mt-5 mb-3 no-bar"><span>{{ 'spectacle_coulisses2'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
  244.             <p class="p-0 mt-5"> {# {{ 'grandamour_s2'|tr(tr)|raw }} #}</p>
  245.         </div>
  246.     </section>
  247.     <section class="coulisses-slider p-0 mt-5 pt-5 overflow-h" style="margin-bottom: 180px;">
  248.         {#
  249.         <div class="content fluid">
  250.           <div class="owl-carousel">
  251.             <div class="item">
  252.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses1.jpg');"> </div>
  253.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses2.jpg');"> </div>
  254.             </div>
  255.             <div class="item">
  256.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses3.jpg');"> </div>
  257.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses4.jpg');"> </div>
  258.             </div>
  259.             <div class="item">
  260.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses5.jpg');"> </div>
  261.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses6.jpg');"> </div>
  262.             </div>
  263.             <div class="item">
  264.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses7.jpg');"> </div>
  265.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses8.jpg');"> </div>
  266.             </div>
  267.             <div class="item">
  268.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses9.jpg');"> </div>
  269.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses10.jpg');"> </div>
  270.             </div>
  271.             <div class="item">
  272.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses11.jpg');"> </div>
  273.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses12.jpg');"> </div>
  274.             </div>
  275.             <div class="item">
  276.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses13.jpg');"> </div>
  277.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses14.jpg');"> </div>
  278.             </div>
  279.             <div class="item">
  280.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses15.jpg');"> </div>
  281.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses16.jpg');"> </div>
  282.             </div>
  283.             <div class="item">
  284.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses17.jpg');"> </div>
  285.               <div class="img" style="background-image: url('/front/img/spectacle-coulisses18.jpg');"> </div>
  286.             </div>
  287.           </div>
  288.         </div> #}
  289.         <div class="content fluid">
  290.             <div class="owl-carousel images">
  291.                 {% for i in 1..24 %}
  292.                     {% if i is odd %}
  293.                         <div class="item">
  294.                     {% endif %}
  295.                     <a id="{{'now'|date('U')}}_{{i}}" href="/front/img/spectacle-coulisses/spectacle-coulisses{{i}}.jpg" itemprop="contentUrl" data-size="" class="img " style="background-image: url('/front/img/spectacle-coulisses/spectacle-coulisses{{i}}.jpg');" source="{{ app.request.getSchemeAndHttpHost() }}/front/img/spectacle-coulisses/spectacle-coulisses{{i}}.jpg">
  296.                         <img src="/front/img/spectacle-coulisses/spectacle-coulisses{{i}}.jpg" style="display:none;" itemprop="thumbnail" alt="album" />
  297.                     </a>
  298.                     </a>
  299.                     {% if i is even %}
  300.                         </div>
  301.                     {% endif %}
  302.                 {% endfor %}
  303.             </div>
  304.         </div>
  305.         <div class="horizontal-bar-container">
  306.             <div class="horizontal-bar"></div>
  307.             <div class="horizontal-bar-ctrl"></div>
  308.         </div>
  309.     </section>
  310.     {% include 'FrontBundle/Partial/footer.html.twig' %}
  311.     <!-- Root element of PhotoSwipe. Must have class pswp. -->
  312.     <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
  313.         <!-- Background of PhotoSwipe.
  314.           It's a separate element as animating opacity is faster than rgba(). -->
  315.         <div class="pswp__bg"></div>
  316.         <!-- Slides wrapper with overflow:hidden. -->
  317.         <div class="pswp__scroll-wrap">
  318.             <!-- Container that holds slides.
  319.               PhotoSwipe keeps only 3 of them in the DOM to save memory.
  320.               Don't modify these 3 pswp__item elements, data is added later on. -->
  321.             <div class="pswp__container">
  322.                 <div class="pswp__item"></div>
  323.                 <div class="pswp__item"></div>
  324.                 <div class="pswp__item"></div>
  325.             </div>
  326.             <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
  327.             <div class="pswp__ui pswp__ui--hidden">
  328.                 <div class="pswp__top-bar">
  329.                     <!--  Controls are self-explanatory. Order can be changed. -->
  330.                     <div class="pswp__counter"></div>
  331.                     <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
  332.                     <button class="pswp__button pswp__button--share" title="Share"></button>
  333.                     <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
  334.                     <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
  335.                     <!-- Preloader demo https://codepen.io/dimsemenov/pen/yyBWoR -->
  336.                     <!-- element will get class pswp__preloader--active when preloader is running -->
  337.                     <div class="pswp__preloader">
  338.                         <div class="pswp__preloader__icn">
  339.                             <div class="pswp__preloader__cut">
  340.                                 <div class="pswp__preloader__donut"></div>
  341.                             </div>
  342.                         </div>
  343.                     </div>
  344.                 </div>
  345.                 <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
  346.                     <div class="pswp__share-tooltip"></div>
  347.                 </div>
  348.                 <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
  349.                 </button>
  350.                 <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
  351.                 </button>
  352.                 <div class="pswp__caption">
  353.                     <div class="pswp__caption__center"></div>
  354.                 </div>
  355.             </div>
  356.         </div>
  357.     </div>
  358. {% endblock %}
  359. {% block javascripts %}
  360.     <script src="/front/js/owl.carousel.min.js"></script>
  361.     <script src="/plugins/photoswipe/photoswipe.min.js"></script>
  362.     <script src="/plugins/photoswipe/photoswipe-ui-default.min.js"></script>
  363.     <script type="text/javascript">
  364.         'use strict';
  365.         class Carousel {
  366.             constructor(el) {
  367.                 this.el = el;
  368.                 this.carouselOptions = ['previous','play','next'];
  369.                 this.carouselData = [
  370.                     {% for i in 1..7 %}
  371.                     {
  372.                         'id': '{{i}}',
  373.                         'src': '/front/img/spectacle-slider-2024-{{i}}.jpg?v=1',
  374.                     },
  375.                     {% endfor %}
  376.                 ];
  377.                 this.carouselInView = [1, 2, 3, 4, 5];
  378.                 this.carouselContainer;
  379.                 this.carouselPlayState;
  380.             }
  381.             mounted() {
  382.                 this.setupCarousel();
  383.                 this.play()
  384.             }
  385.             // Build carousel html
  386.             setupCarousel() {
  387.                 const container = document.createElement('div');
  388.                 const controls = document.createElement('div');
  389.                 // Add container for carousel items and controls
  390.                 this.el.append(container, controls);
  391.                 container.className = 'carousel-container';
  392.                 controls.className = 'carousel-controls';
  393.                 // Take dataset array and append items to container
  394.                 this.carouselData.forEach((item, index) => {
  395.                     const carouselItem = item.src ? document.createElement('img') : document.createElement('div');
  396.                     container.append(carouselItem);
  397.                     // Add item attributes
  398.                     carouselItem.className = `carousel-item carousel-item-${index + 1}`;
  399.                     carouselItem.src = item.src;
  400.                     carouselItem.setAttribute('loading', 'lazy');
  401.                     // Used to keep track of carousel items, infinite items possible in carousel however min 5 items required
  402.                     carouselItem.setAttribute('data-index', `${index + 1}`);
  403.                 });
  404.                 this.carouselOptions.forEach((option) => {
  405.                     const btn = document.createElement('button');
  406.                     const axSpan = document.createElement('span');
  407.                     // Add accessibilty spans to button
  408.                     axSpan.innerText = option;
  409.                     axSpan.className = 'ax-hidden';
  410.                     btn.append(axSpan);
  411.                     // Add button attributes
  412.                     btn.className = `carousel-control carousel-control-${option}`;
  413.                     btn.setAttribute('data-name', option);
  414.                     // Add carousel control options
  415.                     controls.append(btn);
  416.                 });
  417.                 // After rendering carousel to our DOM, setup carousel controls' event listeners
  418.                 this.setControls([...controls.children]);
  419.                 // Set container property
  420.                 this.carouselContainer = container;
  421.             }
  422.             setControls(controls) {
  423.                 controls.forEach(control => {
  424.                     control.onclick = (event) => {
  425.                         event.preventDefault();
  426.                         // Manage control actions, update our carousel data first then with a callback update our DOM
  427.                         this.controlManager(control.dataset.name);
  428.                     };
  429.                 });
  430.             }
  431.             controlManager(control) {
  432.                 if (control === 'previous') return this.previous();
  433.                 if (control === 'next') return this.next();
  434.                 if (control === 'add') return this.add();
  435.                 if (control === 'play') return this.play();
  436.                 return;
  437.             }
  438.             getIndex(inView) {
  439.                 var inViewArr = {
  440.                     'i1': 4,
  441.                     'i2': 3,
  442.                     'i3': 2,
  443.                     'i4': 1,
  444.                     'i5': 5,
  445.                 };
  446.                 var inViewArr = {
  447.                     'i1': 0,
  448.                     'i2': 4,
  449.                     'i3': 3,
  450.                     'i4': 2,
  451.                     'i5': 1,
  452.                 };
  453.                 // console.log (inViewArr['i'+inView] );
  454.                 $('#spectacle .owl-dots .owl-dot').removeClass('active');
  455.                 $('#spectacle .owl-dots .owl-dot:eq('+inViewArr['i'+inView]+')').addClass('active');
  456.             }
  457.             previous() {
  458.                 // console.log('prev');
  459.                 this.getIndex(exampleCarousel.carouselInView[0])
  460.                 // Update order of items in data array to be shown in carousel
  461.                 this.carouselData.unshift(this.carouselData.pop());
  462.                 // Push the first item to the end of the array so that the previous item is front and center
  463.                 this.carouselInView.push(this.carouselInView.shift());
  464.                 // Update the css class for each carousel item in view
  465.                 this.carouselInView.forEach((item, index) => {
  466.                     this.carouselContainer.children[index].className = `carousel-item carousel-item-${item}`;
  467.                 });
  468.                 // Using the first 5 items in data array update content of carousel items in view
  469.                 this.carouselData.slice(0, 5).forEach((data, index) => {
  470.                     document.querySelector(`.carousel-item-${index + 1}`).src = data.src;
  471.                 });
  472.             }
  473.             next() {
  474.                 // console.log('next');
  475.                 this.getIndex(exampleCarousel.carouselInView[0])
  476.                 // Update order of items in data array to be shown in carousel
  477.                 this.carouselData.push(this.carouselData.shift());
  478.                 // Take the last item and add it to the beginning of the array so that the next item is front and center
  479.                 this.carouselInView.unshift(this.carouselInView.pop());
  480.                 // Update the css class for each carousel item in view
  481.                 this.carouselInView.forEach((item, index) => {
  482.                     this.carouselContainer.children[index].className = `carousel-item carousel-item-${item}`;
  483.                 });
  484.                 // Using the first 5 items in data array update content of carousel items in view
  485.                 this.carouselData.slice(0, 5).forEach((data, index) => {
  486.                     document.querySelector(`.carousel-item-${index + 1}`).src = data.src;
  487.                 });
  488.             }
  489.             add() {
  490.                 const newItem = {
  491.                     'id': '',
  492.                     'src': '',
  493.                 };
  494.                 const lastItem = this.carouselData.length;
  495.                 const lastIndex = this.carouselData.findIndex(item => item.id == lastItem);
  496.                 // Assign properties for new carousel item
  497.                 Object.assign(newItem, {
  498.                     id: `${lastItem + 1}`,
  499.                     src: `http://fakeimg.pl/300/?text=${lastItem + 1}`
  500.                 });
  501.                 // Then add it to the "last" item in our carouselData
  502.                 this.carouselData.splice(lastIndex + 1, 0, newItem);
  503.                 // Shift carousel to display new item
  504.                 this.next();
  505.             }
  506.             play() {
  507.                 const playBtn = document.querySelector('.carousel-control-play');
  508.                 const startPlaying = () => this.next();
  509.                 if (playBtn.classList.contains('playing')) {
  510.                     // Remove class to return to play button state/appearance
  511.                     playBtn.classList.remove('playing');
  512.                     // Remove setInterval
  513.                     clearInterval(this.carouselPlayState);
  514.                     this.carouselPlayState = null;
  515.                 } else {
  516.                     // Add class to change to pause button state/appearance
  517.                     playBtn.classList.add('playing');
  518.                     // First run initial next method
  519.                     this.next();
  520.                     // Use play state prop to store interval ID and run next method on a 1.5 second interval
  521.                     this.carouselPlayState = setInterval(startPlaying, 3000);
  522.                 };
  523.             }
  524.         }
  525.         // Refers to the carousel root element you want to target, use specific class selectors if using multiple carousels
  526.         const el = document.querySelector('.carousel');
  527.         // Create a new carousel object
  528.         const exampleCarousel = new Carousel(el);
  529.         // Setup carousel and methods
  530.         exampleCarousel.mounted();
  531.     </script>
  532.     <script type="text/javascript">
  533.         $( document ).ready(function() {
  534.             // TODO: Mettre à jour le background
  535.             if (window.innerWidth > 1047) {
  536.                 //$('.menus-tarifs-callendar .content').before('<div class="video-slide active h-auto w-100 full-size-image"></div>');
  537.                 //$('.menus-tarifs-callendar .content').before('<div class="video-background"><iframe src="https://player.vimeo.com/video/1030772014?background=1&autoplay=1&loop=1&muted=1" frameborder="0" allow="autoplay; fullscreen;" allowfullscreen id="video-iframe" class="video-iframe"> </iframe> </div>');
  538.             }
  539.             $(document).scroll(function(){
  540.                 $('.info-header2 li').removeClass('active');
  541.                 $('.info-header2 li:eq(0)').addClass('active');
  542.                 if( $(window).scrollTop() > $('#artistes').position().top ){
  543.                     $('.info-header2 li').removeClass('active');
  544.                     $('.info-header2 li:eq(1)').addClass('active');
  545.                 }
  546.                 if( $(window).scrollTop() > $('#coulisses').position().top ){
  547.                     $('.info-header2 li').removeClass('active');
  548.                     $('.info-header2 li:eq(2)').addClass('active');
  549.                 }
  550.             });
  551.             $('.spectacle-header').css('height', window.innerHeight+'px');
  552.             $('.slider .owl-carousel').owlCarousel({
  553.                 loop:true,
  554.                 margin:80,
  555.                 nav:true,
  556.                 dots:false,
  557.                 responsive:{
  558.                     0:{
  559.                         items:1
  560.                     },
  561.                     1024:{
  562.                         items:1
  563.                     },
  564.                     1025:{
  565.                         items:3
  566.                     },
  567.                     1920:{
  568.                         items:3
  569.                     }
  570.                 }
  571.             });
  572.             var owl = $('.coulisses-slider .owl-carousel');
  573.             owl.owlCarousel({
  574.                 loop:false,
  575.                 margin:42,
  576.                 nav:true,
  577.                 itemElement: 'figure',
  578.                 dots:false,
  579.                 responsive:{
  580.                     0:{
  581.                         items:2
  582.                     },
  583.                     868:{
  584.                         items:3
  585.                     },
  586.                     1000:{
  587.                         items:3
  588.                     },
  589.                     1280:{
  590.                         items:4
  591.                     },
  592.                     1475:{
  593.                         items:5
  594.                     },
  595.                     1920:{
  596.                         items:6
  597.                     }
  598.                 }
  599.             });
  600.             $('.artist-link').click(function(){
  601.                 window.location.href = $('.owl-item.active ~ .owl-item.active .item').data('link');
  602.             });
  603.             $('.arrow-btn').click(function(e){
  604.                 e.preventDefault();
  605.                 $([document.documentElement, document.body]).animate({
  606.                     scrollTop: $( $('#spectacle') ).offset().top - 130
  607.                 }, 100);
  608.             });
  609.             $('#spectacle .video').click(function(e){
  610.                 e.preventDefault();
  611.                 $('#spectacle .carousel').hide();
  612.                 $('#spectacle .yt').fadeIn();
  613.                 $('#spectacle .owl-dots').hide();
  614.                 $('#spectacle .photo').removeClass('active');
  615.                 $('#spectacle .video').addClass('active');
  616.             });
  617.             $('#spectacle .photo').click(function(e){
  618.                 e.preventDefault();
  619.                 $('#spectacle .yt').hide();
  620.                 $('#spectacle .carousel').fadeIn();
  621.                 $('#spectacle .owl-dots').fadeIn();
  622.                 $('#spectacle .video').removeClass('active');
  623.                 $('#spectacle .photo').addClass('active');
  624.             });
  625.             $('#spectacle .yt .hover').click(function(e){
  626.                 e.preventDefault();
  627.                 console.log('ssss');
  628.                 window.open('https://youtu.be/RbHIzbo522o', '_blank');
  629.             });
  630.             owl.on('changed.owl.carousel', function(event) {
  631.                 var itemsNbr = owl.data()['owl.carousel'].settings.items;
  632.                 var itemsTotal = event.item.count;
  633.                 var itemsIndex = event.item.index;
  634.                 var pagesNbr = itemsTotal - itemsNbr;
  635.                 var horizontalBar = $('.horizontal-bar').outerWidth();
  636.                 var horizontalBarCtrl = $('.horizontal-bar-ctrl').outerWidth();
  637.                 var courseLength = $('.horizontal-bar').outerWidth() - $('.horizontal-bar-ctrl').outerWidth();
  638.                 var left = itemsIndex * 100 / pagesNbr; // percent
  639.                 left = left * courseLength / 100;
  640.                 $('.horizontal-bar-ctrl').css('left', left+'px');
  641.             });
  642.             $('.owl-carousel.images a').each(function(index, value) {
  643.                 img = new Image();
  644.                 size = 0;
  645.                 const ident = $(this).attr('id').toString();
  646.                 img.onload = function() {
  647.                     $('#'+ident).attr('data-size', this.width + 'x' + this.height);
  648.                 }
  649.                 img.src = $(this).attr('source');
  650.             }).promise().done( function(){
  651.                 setTimeout( function(){
  652.                     initPhotoSwipeFromDOM('.my-gallery');
  653.                 }, 1000);
  654.             } );
  655.             $('.owl-carousel.images .owl-stage').addClass('my-gallery');
  656.             $('.owl-carousel.images .owl-stage').attr('itemscope');
  657.             $('.owl-carousel.images .owl-stage').attr('itemtype', 'http://schema.org/ImageGallery');
  658.             $('.owl-carousel.images .owl-item ').attr('itemscope');
  659.             $('.owl-carousel.images .owl-item ').attr('itemprop', 'associatedMedia');
  660.             $('.owl-carousel.images .owl-item ').attr('itemtype', 'http://schema.org/ImageObject');
  661.         });
  662.     </script>
  663.     <script type="text/javascript">
  664.         videoBackground();
  665.         $( window ).resize(function() {
  666.             videoBackground();
  667.         });
  668.         var initPhotoSwipeFromDOM = function(gallerySelector) {
  669.             // parse slide data (url, title, size ...) from DOM elements
  670.             // (children of gallerySelector)
  671.             var parseThumbnailElements = function(el) {
  672.                 console.log(el.childNodes);
  673.                 var thumbElements = el.childNodes,
  674.                     numNodes = thumbElements.length,
  675.                     items = [
  676.                         // {
  677.                         //   src: 'https://dummyimage.com/1000x1000/ccc/5cac22',
  678.                         //   w: '1024',
  679.                         //   h: '1024'
  680.                         // },
  681.                         // {
  682.                         //   src: 'https://dummyimage.com/1000x1000/5cac22/fff',
  683.                         //   w: '1024',
  684.                         //   h: '1024'
  685.                         // }
  686.                     ],
  687.                     figureEl,
  688.                     linkEl,
  689.                     size,
  690.                     item;
  691.                 for(var i = 0; i < numNodes; i++) {
  692.                     figureEl = thumbElements[i]; // <figure> element
  693.                     // include only element nodes
  694.                     if(figureEl.nodeType !== 1) {
  695.                         continue;
  696.                     }
  697.                     linkEl = figureEl.children[0] // <a> element
  698.                     // console.log('linkEl')
  699.                     // console.log(linkEl.children[0])
  700.                     // console.log(linkEl.children[1])
  701.                     for(var j = 0; j < 2; j++) {
  702.                         size = linkEl.children[j].getAttribute('data-size').split('x');
  703.                         // create slide object
  704.                         item = {
  705.                             src: linkEl.children[j].getAttribute('href'),
  706.                             w: parseInt(size[0], 10),
  707.                             h: parseInt(size[1], 10)
  708.                         };
  709.                         if(figureEl.children.length > 1) {
  710.                             // <figcaption> content
  711.                             item.title = figureEl.children[1].innerHTML;
  712.                         }
  713.                         if(linkEl.children.length > 0) {
  714.                             // <img> thumbnail element, retrieving thumbnail url
  715.                             item.msrc = linkEl.children[0].getAttribute('src');
  716.                         }
  717.                         item.el = figureEl; // save link to element for getThumbBoundsFn
  718.                         items.push(item);
  719.                     }
  720.                 }
  721.                 return items;
  722.             };
  723.             // find nearest parent element
  724.             var closest = function closest(el, fn) {
  725.                 return el && ( fn(el) ? el : closest(el.parentNode, fn) );
  726.             };
  727.             // triggers when user clicks on thumbnail
  728.             var onThumbnailsClick = function(e) {
  729.                 e = e || window.event;
  730.                 e.preventDefault ? e.preventDefault() : e.returnValue = false;
  731.                 var eTarget = e.target || e.srcElement;
  732.                 // find root element of slide
  733.                 var clickedListItem = closest(eTarget, function(el) {
  734.                     return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
  735.                 });
  736.                 if(!clickedListItem) {
  737.                     return;
  738.                 }
  739.                 // find index of clicked item by looping through all child nodes
  740.                 // alternatively, you may define index via data- attribute
  741.                 var clickedGallery = clickedListItem.parentNode,
  742.                     childNodes = clickedListItem.parentNode.childNodes,
  743.                     numChildNodes = childNodes.length,
  744.                     nodeIndex = 0,
  745.                     index;
  746.                 for (var i = 0; i < numChildNodes; i++) {
  747.                     if(childNodes[i].nodeType !== 1) {
  748.                         continue;
  749.                     }
  750.                     if(childNodes[i] === clickedListItem) {
  751.                         index = nodeIndex;
  752.                         break;
  753.                     }
  754.                     nodeIndex++;
  755.                 }
  756.                 if(index >= 0) {
  757.                     // open PhotoSwipe if valid index found
  758.                     openPhotoSwipe( index, clickedGallery );
  759.                 }
  760.                 return false;
  761.             };
  762.             // parse picture index and gallery index from URL (#&pid=1&gid=2)
  763.             var photoswipeParseHash = function() {
  764.                 var hash = window.location.hash.substring(1),
  765.                     params = {};
  766.                 if(hash.length < 5) {
  767.                     return params;
  768.                 }
  769.                 var vars = hash.split('&');
  770.                 for (var i = 0; i < vars.length; i++) {
  771.                     if(!vars[i]) {
  772.                         continue;
  773.                     }
  774.                     var pair = vars[i].split('=');
  775.                     if(pair.length < 2) {
  776.                         continue;
  777.                     }
  778.                     params[pair[0]] = pair[1];
  779.                 }
  780.                 if(params.gid) {
  781.                     params.gid = parseInt(params.gid, 10);
  782.                 }
  783.                 return params;
  784.             };
  785.             var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
  786.                 var pswpElement = document.querySelectorAll('.pswp')[0],
  787.                     gallery,
  788.                     options,
  789.                     items;
  790.                 items = parseThumbnailElements(galleryElement);
  791.                 // define options (if needed)
  792.                 options = {
  793.                     // define gallery index (for URL)
  794.                     galleryUID: galleryElement.getAttribute('data-pswp-uid'),
  795.                     getThumbBoundsFn: function(index) {
  796.                         // See Options -> getThumbBoundsFn section of documentation for more info
  797.                         var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
  798.                             pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
  799.                             rect = thumbnail.getBoundingClientRect();
  800.                         return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
  801.                     }
  802.                 };
  803.                 // PhotoSwipe opened from URL
  804.                 if(fromURL) {
  805.                     if(options.galleryPIDs) {
  806.                         // parse real index when custom PIDs are used
  807.                         // http://photoswipe.com/documentation/faq.html#custom-pid-in-url
  808.                         for(var j = 0; j < items.length; j++) {
  809.                             if(items[j].pid == index) {
  810.                                 options.index = j;
  811.                                 break;
  812.                             }
  813.                         }
  814.                     } else {
  815.                         // in URL indexes start from 1
  816.                         options.index = parseInt(index, 10) - 1;
  817.                     }
  818.                 } else {
  819.                     options.index = parseInt(index, 10);
  820.                 }
  821.                 // exit if index not found
  822.                 if( isNaN(options.index) ) {
  823.                     return;
  824.                 }
  825.                 if(disableAnimation) {
  826.                     options.showAnimationDuration = 0;
  827.                 }
  828.                 // Pass data to PhotoSwipe and initialize it
  829.                 gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
  830.                 gallery.init();
  831.             };
  832.             // loop through all gallery elements and bind events
  833.             var galleryElements = document.querySelectorAll( gallerySelector );
  834.             for(var i = 0, l = galleryElements.length; i < l; i++) {
  835.                 galleryElements[i].setAttribute('data-pswp-uid', i+1);
  836.                 galleryElements[i].onclick = onThumbnailsClick;
  837.             }
  838.             // Parse URL and open gallery if it contains #&pid=3&gid=1
  839.             var hashData = photoswipeParseHash();
  840.             if(hashData.pid && hashData.gid) {
  841.                 openPhotoSwipe( hashData.pid ,  galleryElements[ hashData.gid - 1 ], true, true );
  842.             }
  843.         };
  844.         // // execute above function
  845.         // initPhotoSwipeFromDOM('.my-gallery');
  846.         function videoBackground(){
  847.             const iframe = document.querySelector('.video-background iframe');
  848.             const windowWidth = window.innerWidth;
  849.             const windowHeight = window.innerHeight;
  850.             const aspectRatio = 16 / 9;
  851.             const currentRatio = windowWidth / windowHeight;
  852.             if (windowWidth > windowHeight) {  // Orientation paysage
  853.                 // Fixe la largeur au maximum de la fenêtre
  854.                 const width = windowWidth;
  855.                 const height = width / aspectRatio; // Hauteur basée sur le ratio 16:9
  856.                 iframe.style.width = `${width}px`;
  857.                 iframe.style.height = `${height}px`;
  858.             } else {  // Orientation portrait
  859.                 // Fixe la hauteur au maximum de la fenêtre
  860.                 const height = windowHeight;
  861.                 const width = height * aspectRatio; // Largeur basée sur le ratio 16:9
  862.                 iframe.style.width = `${width}px`;
  863.                 iframe.style.height = `${height}px`;
  864.             }
  865.             if(currentRatio < aspectRatio) {
  866.                 const height = windowHeight;
  867.                 const width = height * aspectRatio; // Largeur basée sur le ratio 16:9
  868.                 iframe.style.width = `${width}px`;
  869.                 iframe.style.height = `${height}px`;
  870.             }
  871.         }
  872.     </script>
  873. {% endblock %}