119 lines
3.7 KiB
JavaScript
Vendored
119 lines
3.7 KiB
JavaScript
Vendored
require('@fortawesome/fontawesome-free/js/all');
|
|
import Swiper from 'swiper/swiper-bundle';
|
|
require('./bootstrap');
|
|
|
|
$(document).ready(function() {
|
|
// HEADER
|
|
// GESTION RESPONSIVE DU MENU
|
|
$('.toggle-menu').click(function(){
|
|
$(this).toggleClass('active');
|
|
$('nav').toggleClass('active')
|
|
$('body').toggleClass('mobile-nav-active');
|
|
})
|
|
|
|
// BORDER VISIBLE SUR LE MENU AFFICHE
|
|
$('nav ul li').click(function() {
|
|
$(this).toggleClass('active');
|
|
})
|
|
|
|
// Section VIDEO
|
|
$('.screenplay').click(function(e) {
|
|
e.preventDefault();
|
|
$(this).siblings().removeClass('active')
|
|
$(this).toggleClass('active');
|
|
// $('.popup-detail').addClass('active');
|
|
if ($(this)[0].classList[1]) {
|
|
switch ($(this)[0].classList[1]) {
|
|
case "marolles":
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510307128")
|
|
break;
|
|
case "cherre":
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306947")
|
|
break;
|
|
case "monce":
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510307183")
|
|
break;
|
|
case "nogent-le-bernard":
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306862")
|
|
break;
|
|
case "mamers":
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510307063")
|
|
break;
|
|
case "thoigne-les-mees":
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306899")
|
|
break;
|
|
|
|
default:
|
|
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306998")
|
|
break;
|
|
}
|
|
}
|
|
// $('.player-bloc.wide iframe').attr(src,"")
|
|
// switch (key) {
|
|
// case value:
|
|
|
|
// break;
|
|
|
|
// default:
|
|
// break;
|
|
// }
|
|
})
|
|
|
|
// PAGE "QUI SOMMES NOUS"
|
|
// AFFICHAGE DU DETAIL DE LA CHRONOLOGIE
|
|
$('.frise .event').click(function() {
|
|
$('body .bg-opacity').addClass('active');
|
|
$('.popup-detail').addClass('active');
|
|
})
|
|
// AFFICHAGE DE LA VIDEO
|
|
$('.work .detail--video > div:not(:last-child)').click(function() {
|
|
$('body .bg-opacity').addClass('active');
|
|
$('.detail--video .video-player').addClass('active');
|
|
})
|
|
// ON CACHE LA POP-UP
|
|
$('#close-cross').click(function() {
|
|
$('body .bg-opacity').removeClass('active');
|
|
$('.popup-detail').removeClass('active');
|
|
$('.detail--video .video-player').removeClass('active');
|
|
})
|
|
|
|
// PAGE "NOUS CONTACTER"
|
|
// ON CACHE LA POPUP D'INFO
|
|
$('.choice--btn').click(function() {
|
|
$('body .bg-opacity').removeClass('active');
|
|
$('.popup-choice').addClass('hidden');
|
|
})
|
|
|
|
// FOOTER
|
|
// MENU TOUJOURS PRESENT
|
|
$(window).on('scroll',function() {
|
|
if($(window).scrollTop()) {
|
|
$('header').addClass('sticky-bar')
|
|
$('.pageup').addClass('see')
|
|
}
|
|
else {
|
|
$('header').removeClass('sticky-bar')
|
|
$('.pageup').removeClass('see')
|
|
}
|
|
})
|
|
|
|
// HOME PAGE
|
|
// SLIDER
|
|
//initialize swiper when document ready
|
|
const mySwiper = new Swiper ('.swiper-container', {
|
|
speed: 2000,
|
|
parallax: true,
|
|
effect: 'slide',
|
|
slidesPerView: 1,
|
|
autoplay: {
|
|
delay: 1000,
|
|
},
|
|
loop: true,
|
|
pagination: {
|
|
el: '.swiper-pagination',
|
|
type: 'bullets',
|
|
clickable: true,
|
|
},
|
|
});
|
|
|
|
});
|