{% extends 'FrontBundle/layout.html.twig' %}
{% block title %}{{ app_sitename }} - {{ page.metaTitle }}{% endblock %}
{% block description %}{{ page.metaDescription }}{% endblock %}
{% block extra_class %}native page_spectacle{% endblock %}
{% block menu_min %}931{% endblock %}
{# {% block menu_max %}3076{% endblock %} #}
{% block sub_header %}
<div class="sub-header anchor">
<ul>
<li><a href="#spectacle">DÉESSES</a></li>
<li><a href="#artistes">{{ 'spectacle_artistes'|tr(tr)|raw }}</a></li>
<li><a href="#coulisses">{{ 'spectacle_coulisses'|tr(tr)|raw }}</a></li>
</ul>
</div>
{% endblock %}
{% block stylesheets %}
<link href="/front/css/owl.carousel.min.css" rel="stylesheet">
<link href="/front/css/owl.theme.default.min.css" rel="stylesheet">
<link href="/plugins/photoswipe/photoswipe.css" rel="stylesheet">
<link href="/plugins/photoswipe/default-skin/default-skin.css" rel="stylesheet" type="text/css"/>
<link href="/front/css/carousel.css" rel="stylesheet">
<style>
@media screen and (min-width: 1047px) {
.full-size-image {
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
object-fit: contain;
background-image: url("/front/img/home-deesses.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
}
.page_spectacle .mini-suites .subname{
font-size: 10px;
}
.page_spectacle #spectacle {
background-image: url(/front/img/deesses-bg.svg);
background-repeat: no-repeat;
background-position-x: -100px;
background-position-y: -20px;
}
.spectacle-header .order-btn {
bottom: 130px;
}
.video-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 0; /* Derrière le contenu principal */
/* display: flex;
justify-content: center;
align-items: center;*/
background-image: url('/front/img/preview.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: top center;
}
.video-background iframe {
left: 50%;
position: absolute;
transform: translateX(-50%);
}
</style>
{% endblock %}
{% block body %}
{#
<section class="info-header2 anchor">
<ul>
<li><a href="#spectacle">Frénésie</a></li>
<li><a href="#artistes">Artistes</a></li>
<li><a href="#coulisses">Coulisses</a></li>
</ul>
</section>
#}
<section class="menus-tarifs-callendar espace-header spectacle-header p-0 home">
<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>
{# <video class="video-slide active" src="/front/videos/palace3.mp4" autoplay muted loop playsinline></video> #}
<div class="content pt-0">
<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>
<p class="sub-title mb-0">{{ 'deesse_title'|tr(tr)|raw }}</p>
<p class="desc mt-5 pt-2 mb-0">{{ 'deesse_subtitle'|tr(tr)|raw }}</p>
</div>
<a href="/{{app.request.locale }}/{{ 'reservation'|getUrl(app.request.locale) }}" class="order-btn">{{ 'general_reserver'|tr(tr)|raw }}</a>
<a href="#spectacle" class="arrow-btn"><img src="/front/img/spectacle-header-arrow-b.svg" alt="next" width="20px" /></a>
{% set cata_link = '/front/Brochure-deesses-royal-palace-2025.pdf' %}
{% if app.request.locale == 'de' %}
{% set cata_link = '/front/Brochure-deesses-royal-palace-2025-de.pdf' %}
{% endif %}
<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>
<ul>
<li class="active"><a href="#spectacle">DÉESSES</a></li>
<li><a href="#artistes">{{ 'spectacle_artistes'|tr(tr)|raw }}</a></li>
<li><a href="#coulisses">{{ 'spectacle_coulisses'|tr(tr)|raw }}</a></li>
</ul>
</section>
<section id="spectacle" class="espace-content full pt-5 mt-5 overflow-h overflow-y-h">
<div class="content">
<h1 class="pt-5 mb-3 no-bar">{{ 'deesse_s1_maintitle'|tr(tr)|upper }}<span class="full-bar"></span></h1>
<h5 class="mb-3 mt-5">{{ 'grandamour_s1_title'|tr(tr)|raw }}</h5>
<p class="p-0">{{ 'deesse_s1_title'|tr(tr)|raw }}</p>
<div class="pre-carousel pt-3 mt-3">
<a href="#" class="active photo">{{ 'spectacle_photos'|tr(tr)|raw }}<span>12</span></a>
<a href="#" class="video d-none">{{ 'spectacle_video'|tr(tr)|raw }}<span>1</span></a>
</div>
<div class="carousel"></div>
<div class="owl-dots">
<button role="button" class="owl-dot"><span></span></button>
<button role="button" class="owl-dot"><span></span></button>
<button role="button" class="owl-dot"><span></span></button>
<button role="button" class="owl-dot"><span></span></button>
<button role="button" class="owl-dot"><span></span></button>
</div>
<div class="yt">
<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>
</div>
</div>
</section>
<section id="artistes" class="espace-content full mt-5 pt-5 overflow-h">
<div class="content">
<h2 class="pt-5 mt-0 mb-3 no-bar"><span>{{ 'spectacle_artistes2'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
<h5 class="mb-5 mt-5"><span> </span></h5>
</div>
</section>
<section class="slider p-0">
<div class="slider-after"></div>
<div class="content overflow-h" style="height:620px;">
<div class="owl-carousel mini-suites">
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/sarita.jpg') }}');">
<div class="gradient"></div>
<p class="name">Sarita</p>
<p class="subname">{{ 'grandamour_a3'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/wanderlustdancer/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/antony-cesar.jpg') }}');">
<div class="gradient"></div>
<p class="name">Antony César</p>
<p class="subname">{{ 'deesse_a2'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/antony__cesar/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/troupe-kevin-richter.jpg') }}');">
<div class="gradient"></div>
<p class="name">Troupe Kevin Richter</p>
<p class="subname">{{ 'deesse_a3'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/r.kevin_rkt/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/jerome-murat.jpg') }}');">
<div class="gradient"></div>
<p class="name">Jerome Murat</p>
<p class="subname">{{ 'deesse_a4'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/jeromemurat/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/zhang-fan.jpg') }}');">
<div class="gradient"></div>
<p class="name">Zhang Fan </p>
<p class="subname">{{ 'deesse_a5'|tr(tr)|upper|raw }}</p>
<!-- <a href="https://www.instagram.com/caiyong1112/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a> -->
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/michail-ermakov.jpg') }}');">
<div class="gradient"></div>
<p class="name">Michail Ermakov</p>
<p class="subname">{{ 'deesse_a6'|tr(tr)|upper|raw }}</p>
<!-- <a href="https://www.instagram.com/shakirov_oleg/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a> -->
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/bello-sisters.jpg') }}');">
<div class="gradient"></div>
<p class="name">Bello Sisters</p>
<p class="subname" style="bottom:100px";>{{ 'deesse_a7'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/bellosistersofficial/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/meggy-forget.jpg') }}');">
<div class="gradient"></div>
<p class="name">Meggy Forget</p>
<p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/meggyforget/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/margaux-faisandier.jpg') }}');">
<div class="gradient"></div>
<p class="name">Margaux Faisandier</p>
<p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
<!-- <a href="https://www.instagram.com/bellosistersofficial/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a> -->
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/leila-veslard.jpg') }}');">
<div class="gradient"></div>
<p class="name">Leila Veslard</p>
<p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/leilaveslardoff/?hl=fr" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
<div class="item" data-link="#">
<div class="img" style="background-image: url('{{ asset('front/img/deesse-artiste/charlene-veyrunes.jpg') }}');">
<div class="gradient"></div>
<p class="name">Charlene Veyrunes</p>
<p class="subname">{{ 'deesse_a8'|tr(tr)|upper|raw }}</p>
<a href="https://www.instagram.com/charleneveyrunes/" target="_blank" class="ig"><img alt="instagram" src="/front/img/spectacle-ig.svg" /></a>
</div>
</div>
</div>
<p class="desc">{{ 'frenesie_a3_desc'|tr(tr)|raw }}</p>
</div>
<div class="buttons hide">
<a href="#infos" class="artist-link">Découvrez prochainement l'artiste</a>
</div>
<div class="red-bar"></div>
</section>
<section id="coulisses" class="espace-content full mt-2 pt-5 overflow-h">
<div class="content">
<h2 class="pt-5 mt-5 mb-3 no-bar"><span>{{ 'spectacle_coulisses2'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
<p class="p-0 mt-5"> {# {{ 'grandamour_s2'|tr(tr)|raw }} #}</p>
</div>
</section>
<section class="coulisses-slider p-0 mt-5 pt-5 overflow-h" style="margin-bottom: 180px;">
{#
<div class="content fluid">
<div class="owl-carousel">
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses1.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses2.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses3.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses4.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses5.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses6.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses7.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses8.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses9.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses10.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses11.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses12.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses13.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses14.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses15.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses16.jpg');"> </div>
</div>
<div class="item">
<div class="img" style="background-image: url('/front/img/spectacle-coulisses17.jpg');"> </div>
<div class="img" style="background-image: url('/front/img/spectacle-coulisses18.jpg');"> </div>
</div>
</div>
</div> #}
<div class="content fluid">
<div class="owl-carousel images">
{% for i in 1..24 %}
{% if i is odd %}
<div class="item">
{% endif %}
<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">
<img src="/front/img/spectacle-coulisses/spectacle-coulisses{{i}}.jpg" style="display:none;" itemprop="thumbnail" alt="album" />
</a>
</a>
{% if i is even %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="horizontal-bar-container">
<div class="horizontal-bar"></div>
<div class="horizontal-bar-ctrl"></div>
</div>
</section>
{% include 'FrontBundle/Partial/footer.html.twig' %}
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.
It's a separate element as animating opacity is faster than rgba(). -->
<div class="pswp__bg"></div>
<!-- Slides wrapper with overflow:hidden. -->
<div class="pswp__scroll-wrap">
<!-- Container that holds slides.
PhotoSwipe keeps only 3 of them in the DOM to save memory.
Don't modify these 3 pswp__item elements, data is added later on. -->
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<!-- Controls are self-explanatory. Order can be changed. -->
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--share" title="Share"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<!-- Preloader demo https://codepen.io/dimsemenov/pen/yyBWoR -->
<!-- element will get class pswp__preloader--active when preloader is running -->
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
</button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
<script src="/front/js/owl.carousel.min.js"></script>
<script src="/plugins/photoswipe/photoswipe.min.js"></script>
<script src="/plugins/photoswipe/photoswipe-ui-default.min.js"></script>
<script type="text/javascript">
'use strict';
class Carousel {
constructor(el) {
this.el = el;
this.carouselOptions = ['previous','play','next'];
this.carouselData = [
{% for i in 1..7 %}
{
'id': '{{i}}',
'src': '/front/img/spectacle-slider-2024-{{i}}.jpg?v=1',
},
{% endfor %}
];
this.carouselInView = [1, 2, 3, 4, 5];
this.carouselContainer;
this.carouselPlayState;
}
mounted() {
this.setupCarousel();
this.play()
}
// Build carousel html
setupCarousel() {
const container = document.createElement('div');
const controls = document.createElement('div');
// Add container for carousel items and controls
this.el.append(container, controls);
container.className = 'carousel-container';
controls.className = 'carousel-controls';
// Take dataset array and append items to container
this.carouselData.forEach((item, index) => {
const carouselItem = item.src ? document.createElement('img') : document.createElement('div');
container.append(carouselItem);
// Add item attributes
carouselItem.className = `carousel-item carousel-item-${index + 1}`;
carouselItem.src = item.src;
carouselItem.setAttribute('loading', 'lazy');
// Used to keep track of carousel items, infinite items possible in carousel however min 5 items required
carouselItem.setAttribute('data-index', `${index + 1}`);
});
this.carouselOptions.forEach((option) => {
const btn = document.createElement('button');
const axSpan = document.createElement('span');
// Add accessibilty spans to button
axSpan.innerText = option;
axSpan.className = 'ax-hidden';
btn.append(axSpan);
// Add button attributes
btn.className = `carousel-control carousel-control-${option}`;
btn.setAttribute('data-name', option);
// Add carousel control options
controls.append(btn);
});
// After rendering carousel to our DOM, setup carousel controls' event listeners
this.setControls([...controls.children]);
// Set container property
this.carouselContainer = container;
}
setControls(controls) {
controls.forEach(control => {
control.onclick = (event) => {
event.preventDefault();
// Manage control actions, update our carousel data first then with a callback update our DOM
this.controlManager(control.dataset.name);
};
});
}
controlManager(control) {
if (control === 'previous') return this.previous();
if (control === 'next') return this.next();
if (control === 'add') return this.add();
if (control === 'play') return this.play();
return;
}
getIndex(inView) {
var inViewArr = {
'i1': 4,
'i2': 3,
'i3': 2,
'i4': 1,
'i5': 5,
};
var inViewArr = {
'i1': 0,
'i2': 4,
'i3': 3,
'i4': 2,
'i5': 1,
};
// console.log (inViewArr['i'+inView] );
$('#spectacle .owl-dots .owl-dot').removeClass('active');
$('#spectacle .owl-dots .owl-dot:eq('+inViewArr['i'+inView]+')').addClass('active');
}
previous() {
// console.log('prev');
this.getIndex(exampleCarousel.carouselInView[0])
// Update order of items in data array to be shown in carousel
this.carouselData.unshift(this.carouselData.pop());
// Push the first item to the end of the array so that the previous item is front and center
this.carouselInView.push(this.carouselInView.shift());
// Update the css class for each carousel item in view
this.carouselInView.forEach((item, index) => {
this.carouselContainer.children[index].className = `carousel-item carousel-item-${item}`;
});
// Using the first 5 items in data array update content of carousel items in view
this.carouselData.slice(0, 5).forEach((data, index) => {
document.querySelector(`.carousel-item-${index + 1}`).src = data.src;
});
}
next() {
// console.log('next');
this.getIndex(exampleCarousel.carouselInView[0])
// Update order of items in data array to be shown in carousel
this.carouselData.push(this.carouselData.shift());
// Take the last item and add it to the beginning of the array so that the next item is front and center
this.carouselInView.unshift(this.carouselInView.pop());
// Update the css class for each carousel item in view
this.carouselInView.forEach((item, index) => {
this.carouselContainer.children[index].className = `carousel-item carousel-item-${item}`;
});
// Using the first 5 items in data array update content of carousel items in view
this.carouselData.slice(0, 5).forEach((data, index) => {
document.querySelector(`.carousel-item-${index + 1}`).src = data.src;
});
}
add() {
const newItem = {
'id': '',
'src': '',
};
const lastItem = this.carouselData.length;
const lastIndex = this.carouselData.findIndex(item => item.id == lastItem);
// Assign properties for new carousel item
Object.assign(newItem, {
id: `${lastItem + 1}`,
src: `http://fakeimg.pl/300/?text=${lastItem + 1}`
});
// Then add it to the "last" item in our carouselData
this.carouselData.splice(lastIndex + 1, 0, newItem);
// Shift carousel to display new item
this.next();
}
play() {
const playBtn = document.querySelector('.carousel-control-play');
const startPlaying = () => this.next();
if (playBtn.classList.contains('playing')) {
// Remove class to return to play button state/appearance
playBtn.classList.remove('playing');
// Remove setInterval
clearInterval(this.carouselPlayState);
this.carouselPlayState = null;
} else {
// Add class to change to pause button state/appearance
playBtn.classList.add('playing');
// First run initial next method
this.next();
// Use play state prop to store interval ID and run next method on a 1.5 second interval
this.carouselPlayState = setInterval(startPlaying, 3000);
};
}
}
// Refers to the carousel root element you want to target, use specific class selectors if using multiple carousels
const el = document.querySelector('.carousel');
// Create a new carousel object
const exampleCarousel = new Carousel(el);
// Setup carousel and methods
exampleCarousel.mounted();
</script>
<script type="text/javascript">
$( document ).ready(function() {
// TODO: Mettre à jour le background
if (window.innerWidth > 1047) {
//$('.menus-tarifs-callendar .content').before('<div class="video-slide active h-auto w-100 full-size-image"></div>');
//$('.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>');
}
$(document).scroll(function(){
$('.info-header2 li').removeClass('active');
$('.info-header2 li:eq(0)').addClass('active');
if( $(window).scrollTop() > $('#artistes').position().top ){
$('.info-header2 li').removeClass('active');
$('.info-header2 li:eq(1)').addClass('active');
}
if( $(window).scrollTop() > $('#coulisses').position().top ){
$('.info-header2 li').removeClass('active');
$('.info-header2 li:eq(2)').addClass('active');
}
});
$('.spectacle-header').css('height', window.innerHeight+'px');
$('.slider .owl-carousel').owlCarousel({
loop:true,
margin:80,
nav:true,
dots:false,
responsive:{
0:{
items:1
},
1024:{
items:1
},
1025:{
items:3
},
1920:{
items:3
}
}
});
var owl = $('.coulisses-slider .owl-carousel');
owl.owlCarousel({
loop:false,
margin:42,
nav:true,
itemElement: 'figure',
dots:false,
responsive:{
0:{
items:2
},
868:{
items:3
},
1000:{
items:3
},
1280:{
items:4
},
1475:{
items:5
},
1920:{
items:6
}
}
});
$('.artist-link').click(function(){
window.location.href = $('.owl-item.active ~ .owl-item.active .item').data('link');
});
$('.arrow-btn').click(function(e){
e.preventDefault();
$([document.documentElement, document.body]).animate({
scrollTop: $( $('#spectacle') ).offset().top - 130
}, 100);
});
$('#spectacle .video').click(function(e){
e.preventDefault();
$('#spectacle .carousel').hide();
$('#spectacle .yt').fadeIn();
$('#spectacle .owl-dots').hide();
$('#spectacle .photo').removeClass('active');
$('#spectacle .video').addClass('active');
});
$('#spectacle .photo').click(function(e){
e.preventDefault();
$('#spectacle .yt').hide();
$('#spectacle .carousel').fadeIn();
$('#spectacle .owl-dots').fadeIn();
$('#spectacle .video').removeClass('active');
$('#spectacle .photo').addClass('active');
});
$('#spectacle .yt .hover').click(function(e){
e.preventDefault();
console.log('ssss');
window.open('https://youtu.be/RbHIzbo522o', '_blank');
});
owl.on('changed.owl.carousel', function(event) {
var itemsNbr = owl.data()['owl.carousel'].settings.items;
var itemsTotal = event.item.count;
var itemsIndex = event.item.index;
var pagesNbr = itemsTotal - itemsNbr;
var horizontalBar = $('.horizontal-bar').outerWidth();
var horizontalBarCtrl = $('.horizontal-bar-ctrl').outerWidth();
var courseLength = $('.horizontal-bar').outerWidth() - $('.horizontal-bar-ctrl').outerWidth();
var left = itemsIndex * 100 / pagesNbr; // percent
left = left * courseLength / 100;
$('.horizontal-bar-ctrl').css('left', left+'px');
});
$('.owl-carousel.images a').each(function(index, value) {
img = new Image();
size = 0;
const ident = $(this).attr('id').toString();
img.onload = function() {
$('#'+ident).attr('data-size', this.width + 'x' + this.height);
}
img.src = $(this).attr('source');
}).promise().done( function(){
setTimeout( function(){
initPhotoSwipeFromDOM('.my-gallery');
}, 1000);
} );
$('.owl-carousel.images .owl-stage').addClass('my-gallery');
$('.owl-carousel.images .owl-stage').attr('itemscope');
$('.owl-carousel.images .owl-stage').attr('itemtype', 'http://schema.org/ImageGallery');
$('.owl-carousel.images .owl-item ').attr('itemscope');
$('.owl-carousel.images .owl-item ').attr('itemprop', 'associatedMedia');
$('.owl-carousel.images .owl-item ').attr('itemtype', 'http://schema.org/ImageObject');
});
</script>
<script type="text/javascript">
videoBackground();
$( window ).resize(function() {
videoBackground();
});
var initPhotoSwipeFromDOM = function(gallerySelector) {
// parse slide data (url, title, size ...) from DOM elements
// (children of gallerySelector)
var parseThumbnailElements = function(el) {
console.log(el.childNodes);
var thumbElements = el.childNodes,
numNodes = thumbElements.length,
items = [
// {
// src: 'https://dummyimage.com/1000x1000/ccc/5cac22',
// w: '1024',
// h: '1024'
// },
// {
// src: 'https://dummyimage.com/1000x1000/5cac22/fff',
// w: '1024',
// h: '1024'
// }
],
figureEl,
linkEl,
size,
item;
for(var i = 0; i < numNodes; i++) {
figureEl = thumbElements[i]; // <figure> element
// include only element nodes
if(figureEl.nodeType !== 1) {
continue;
}
linkEl = figureEl.children[0] // <a> element
// console.log('linkEl')
// console.log(linkEl.children[0])
// console.log(linkEl.children[1])
for(var j = 0; j < 2; j++) {
size = linkEl.children[j].getAttribute('data-size').split('x');
// create slide object
item = {
src: linkEl.children[j].getAttribute('href'),
w: parseInt(size[0], 10),
h: parseInt(size[1], 10)
};
if(figureEl.children.length > 1) {
// <figcaption> content
item.title = figureEl.children[1].innerHTML;
}
if(linkEl.children.length > 0) {
// <img> thumbnail element, retrieving thumbnail url
item.msrc = linkEl.children[0].getAttribute('src');
}
item.el = figureEl; // save link to element for getThumbBoundsFn
items.push(item);
}
}
return items;
};
// find nearest parent element
var closest = function closest(el, fn) {
return el && ( fn(el) ? el : closest(el.parentNode, fn) );
};
// triggers when user clicks on thumbnail
var onThumbnailsClick = function(e) {
e = e || window.event;
e.preventDefault ? e.preventDefault() : e.returnValue = false;
var eTarget = e.target || e.srcElement;
// find root element of slide
var clickedListItem = closest(eTarget, function(el) {
return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
});
if(!clickedListItem) {
return;
}
// find index of clicked item by looping through all child nodes
// alternatively, you may define index via data- attribute
var clickedGallery = clickedListItem.parentNode,
childNodes = clickedListItem.parentNode.childNodes,
numChildNodes = childNodes.length,
nodeIndex = 0,
index;
for (var i = 0; i < numChildNodes; i++) {
if(childNodes[i].nodeType !== 1) {
continue;
}
if(childNodes[i] === clickedListItem) {
index = nodeIndex;
break;
}
nodeIndex++;
}
if(index >= 0) {
// open PhotoSwipe if valid index found
openPhotoSwipe( index, clickedGallery );
}
return false;
};
// parse picture index and gallery index from URL (#&pid=1&gid=2)
var photoswipeParseHash = function() {
var hash = window.location.hash.substring(1),
params = {};
if(hash.length < 5) {
return params;
}
var vars = hash.split('&');
for (var i = 0; i < vars.length; i++) {
if(!vars[i]) {
continue;
}
var pair = vars[i].split('=');
if(pair.length < 2) {
continue;
}
params[pair[0]] = pair[1];
}
if(params.gid) {
params.gid = parseInt(params.gid, 10);
}
return params;
};
var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
var pswpElement = document.querySelectorAll('.pswp')[0],
gallery,
options,
items;
items = parseThumbnailElements(galleryElement);
// define options (if needed)
options = {
// define gallery index (for URL)
galleryUID: galleryElement.getAttribute('data-pswp-uid'),
getThumbBoundsFn: function(index) {
// See Options -> getThumbBoundsFn section of documentation for more info
var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
rect = thumbnail.getBoundingClientRect();
return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
}
};
// PhotoSwipe opened from URL
if(fromURL) {
if(options.galleryPIDs) {
// parse real index when custom PIDs are used
// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
for(var j = 0; j < items.length; j++) {
if(items[j].pid == index) {
options.index = j;
break;
}
}
} else {
// in URL indexes start from 1
options.index = parseInt(index, 10) - 1;
}
} else {
options.index = parseInt(index, 10);
}
// exit if index not found
if( isNaN(options.index) ) {
return;
}
if(disableAnimation) {
options.showAnimationDuration = 0;
}
// Pass data to PhotoSwipe and initialize it
gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
};
// loop through all gallery elements and bind events
var galleryElements = document.querySelectorAll( gallerySelector );
for(var i = 0, l = galleryElements.length; i < l; i++) {
galleryElements[i].setAttribute('data-pswp-uid', i+1);
galleryElements[i].onclick = onThumbnailsClick;
}
// Parse URL and open gallery if it contains #&pid=3&gid=1
var hashData = photoswipeParseHash();
if(hashData.pid && hashData.gid) {
openPhotoSwipe( hashData.pid , galleryElements[ hashData.gid - 1 ], true, true );
}
};
// // execute above function
// initPhotoSwipeFromDOM('.my-gallery');
function videoBackground(){
const iframe = document.querySelector('.video-background iframe');
const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight;
const aspectRatio = 16 / 9;
const currentRatio = windowWidth / windowHeight;
if (windowWidth > windowHeight) { // Orientation paysage
// Fixe la largeur au maximum de la fenêtre
const width = windowWidth;
const height = width / aspectRatio; // Hauteur basée sur le ratio 16:9
iframe.style.width = `${width}px`;
iframe.style.height = `${height}px`;
} else { // Orientation portrait
// Fixe la hauteur au maximum de la fenêtre
const height = windowHeight;
const width = height * aspectRatio; // Largeur basée sur le ratio 16:9
iframe.style.width = `${width}px`;
iframe.style.height = `${height}px`;
}
if(currentRatio < aspectRatio) {
const height = windowHeight;
const width = height * aspectRatio; // Largeur basée sur le ratio 16:9
iframe.style.width = `${width}px`;
iframe.style.height = `${height}px`;
}
}
</script>
{% endblock %}