Merge branch 'issue-7-2' into 'develop'

fix: #7 Updated 'Cherre' location and picture

See merge request ldc-web/projets/jeusselin!7
This commit is contained in:
Vincent BRIDIER 2024-08-13 10:27:45 +00:00
commit ca220d6ef6
2 changed files with 213 additions and 170 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 15 KiB

383
resources/js/main.js vendored
View file

@ -1,12 +1,12 @@
//import vue
import Swiper from 'swiper/swiper-bundle';
import Vue from 'vue';
require('./bootstrap');
require('./fontawesome');
import Swiper from "swiper/swiper-bundle";
import Vue from "vue";
require("@fortawesome/fontawesome-free/js/all");
require("./bootstrap");
// cookie notice
import { LdcwebCn } from "./ldcweb-cn.js";
window.LdcwebCn = LdcwebCn;
require('@fancyapps/fancybox');
require("@fancyapps/fancybox");
/**
* The following block of code may be used to automatically register your
@ -16,7 +16,7 @@ require('@fancyapps/fancybox');
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
*/
Vue.component('objectives', require('./components/pro/Objectives.vue').default);
Vue.component("objectives", require("./components/pro/Objectives.vue").default);
/**
* Next, we will create a fresh Vue application instance and attach it to
@ -24,180 +24,223 @@ Vue.component('objectives', require('./components/pro/Objectives.vue').default);
* or customize the JavaScript scaffolding to fit your unique needs.
*/
const app = new Vue({
el: '#app',
const app = new Vue({
el: "#app",
});
$(document).ready(function() {
// HEADER
// GESTION RESPONSIVE DU MENU
$('.toggle-menu').click(function(){
$(this).toggleClass('active');
$('nav').toggleClass('active')
$('body').toggleClass('mobile-nav-active');
})
$(document).ready(function () {
// HEADER
// GESTION RESPONSIVE DU MENU
$(".toggle-menu").click(function () {
$(this).toggleClass("active");
$("nav").toggleClass("active");
$("body").toggleClass("mobile-nav-active");
});
$('header .disconnect, header .mobile-disconnect').click(function(e){
e.preventDefault();
$(this).removeClass('logged');
$('header .connect-contain p').removeClass('logged')
// $('header .connect').removeClass('account')
})
$("header .disconnect, header .mobile-disconnect").click(function (e) {
e.preventDefault();
$(this).removeClass("logged");
$("header .connect-contain p").removeClass("logged");
// $('header .connect').removeClass('account')
});
// BORDER VISIBLE SUR LE MENU AFFICHE
$('nav ul li').click(function() {
$(this).toggleClass('active');
})
// BORDER VISIBLE SUR LE MENU AFFICHE
$("nav ul li").click(function () {
$(this).toggleClass("active");
});
// HOME PAGE
// SLIDER
//initialize swiper when document ready
const mySwiper = new Swiper ('.swiper-container', {
speed: 2000,
parallax: true,
effect: 'slide',
slidesPerView: 1,
autoplay: {
delay: 5000,
},
loop: true,
pagination: {
el: '.swiper-pagination',
type: 'bullets',
clickable: true,
},
});
// HOME PAGE
// SLIDER
//initialize swiper when document ready
const mySwiper = new Swiper(".swiper-container", {
speed: 2000,
parallax: true,
effect: "slide",
slidesPerView: 1,
autoplay: {
delay: 5000,
},
loop: true,
pagination: {
el: ".swiper-pagination",
type: "bullets",
clickable: true,
},
});
// 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?autoplay=1")
break;
case "cherre":
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306947?autoplay=1")
break;
case "monce":
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510307183?autoplay=1")
break;
case "nogent-le-bernard":
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306862?autoplay=1")
break;
case "mamers":
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510307063?autoplay=1")
break;
case "thoigne-les-mees":
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306899?autoplay=1")
break;
case "les-mees":
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306998?autoplay=1")
break;
case "sille-guillaume":
$('.player-bloc.wide iframe').attr("src", "images/silo-sille.jpg")
break;
// 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?autoplay=1"
);
break;
case "cherre":
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510306947?autoplay=1"
);
break;
case "monce":
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510307183?autoplay=1"
);
break;
case "nogent-le-bernard":
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510306862?autoplay=1"
);
break;
case "mamers":
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510307063?autoplay=1"
);
break;
case "thoigne-les-mees":
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510306899?autoplay=1"
);
break;
case "les-mees":
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510306998?autoplay=1"
);
break;
case "sille-guillaume":
$(".player-bloc.wide iframe").attr(
"src",
"images/silo-sille.jpg"
);
break;
default:
$('.player-bloc.wide iframe').attr("src", "https://player.vimeo.com/video/510306998?autoplay=1")
break;
}
default:
$(".player-bloc.wide iframe").attr(
"src",
"https://player.vimeo.com/video/510306998?autoplay=1"
);
break;
}
}
});
// PAGE "QUI SOMMES NOUS"
// AFFICHAGE DU DETAIL DE LA CHRONOLOGIE
$(".frise .event").click(function () {
$("body .bg-opacity").addClass("active");
$("." + $(this)[0].classList[1] + " .popup-detail").addClass("active");
});
$(".frise #close-cross").click(function () {
$("body .bg-opacity").removeClass("active");
$(this).parent().removeClass("active");
return false;
});
// PAGE "NOUS CONTACTER"
// On prend l'url pour savoir si on affiche ou pas la popup
// Si "/nous-contacter#collecte" => pas de popup et affichage de tous les silos
// Si pas d'ancre => affichage de la popup
let pathName = window.location.pathname;
let hash = window.location.hash;
if (pathName === "/nous-contacter" && hash === "#collecte") {
$("body .bg-opacity").removeClass("active");
$(".contact--main .popup-choice").removeClass("active");
} else if (pathName === "/nous-contacter" && hash === "") {
$("body .bg-opacity").addClass("active");
$(".contact--main .popup-choice").addClass("active");
$("body").addClass("popup-choice-active");
}
})
// Quand on clique sur un des 2 choix, On cache la popup d'information et on affiche les silos voulus
// Si "Agriculteur" => Affichage de tous les silos
// Si "Particulier" => Affichage de 5 silos
$(".choice--btn").click(function () {
if ($(this)[0].classList[1] != "agri") {
$(".site--bloc.agri").addClass("hidden");
} else {
$(".site--bloc.agri").removeClass("hidden");
}
$("body .bg-opacity").removeClass("active");
$(".popup-choice").removeClass("active");
$("body").removeClass("popup-choice-active");
});
// PAGE "QUI SOMMES NOUS"
// AFFICHAGE DU DETAIL DE LA CHRONOLOGIE
$('.frise .event').click(function() {
$('body .bg-opacity').addClass('active');
$('.' + $(this)[0].classList[1] + ' .popup-detail').addClass('active');
})
$('.frise #close-cross').click(function() {
$('body .bg-opacity').removeClass('active');
$(this).parent().removeClass('active');
return false;
})
// On rempli le contenu de l'ancre du bouton cliqué (carte google)
$(".contact--row .bloc--btn").click(function (e) {
// e.preventDefault();
if ($(this)[0].classList[1]) {
// $( "#collect--map" ).fadeOut(0).fadeIn(500);
$("#collect--map").empty();
switch ($(this)[0].classList[1]) {
case "marolles":
$("#collect--map").append(
'<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=marolles-les-brault%20jeusselin&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>'
);
break;
case "cherre":
$("#collect--map").append(
'<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2660.9813061271334!2d0.671359976752555!3d48.16844154901152!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47e3acb29011227b%3A0xe75239ef5b54bc18!2s12%20Rue%20de%20la%20Tuilerie%2C%2072400%20Cherr%C3%A9-Au!5e0!3m2!1sfr!2sfr!4v1704294314572!5m2!1sfr!2sfr"></iframe>'
);
break;
case "monce":
$("#collect--map").append(
'<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=monc%C3%A9%20en%20saosnois%20jeusselin&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>'
);
break;
case "nogent-le-bernard":
$("#collect--map").append(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1117.2914302876688!2d0.48414369744826813!3d48.23777666920131!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDjCsDE0JzE2LjEiTiAwwrAyOScwNi4yIkU!5e0!3m2!1sfr!2sfr!4v1614339962855!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>'
);
break;
case "mamers":
$("#collect--map").append(
'<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=mamers%20jeusselin&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>'
);
break;
case "thoigne-les-mees":
$("#collect--map").append(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d684.8675256600119!2d0.25121078570016875!3d48.29166291969703!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDjCsDE3JzMwLjAiTiAwwrAxNScwNi40IkU!5e0!3m2!1sfr!2sfr!4v1614340298291!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>'
);
break;
case "les-mees":
$("#collect--map").append(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d938.0259842406967!2d0.2293244494024086!3d48.31942522912142!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDjCsDE5JzA5LjkiTiAwwrAxMyc0OC4wIkU!5e0!3m2!1sfr!2sfr!4v1614344416993!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>'
);
break;
case "sille-le-guillaume":
$("#collect--map").append(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1330.273278394541!2d-0.14506682996032197!3d48.17681993475754!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4809d1eb78257d43%3A0x11526a18898cf526!2sEvialis%20France!5e0!3m2!1sfr!2sfr!4v1614345037843!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>'
);
break;
// PAGE "NOUS CONTACTER"
// On prend l'url pour savoir si on affiche ou pas la popup
// Si "/nous-contacter#collecte" => pas de popup et affichage de tous les silos
// Si pas d'ancre => affichage de la popup
let pathName = window.location.pathname;
let hash = window.location.hash;
if (pathName === "/nous-contacter" && hash === "#collecte") {
$('body .bg-opacity').removeClass('active');
$('.contact--main .popup-choice').removeClass('active');
} else if (pathName === "/nous-contacter" && hash === "") {
$('body .bg-opacity').addClass('active');
$('.contact--main .popup-choice').addClass('active');
$('body').addClass('popup-choice-active');
}
// Quand on clique sur un des 2 choix, On cache la popup d'information et on affiche les silos voulus
// Si "Agriculteur" => Affichage de tous les silos
// Si "Particulier" => Affichage de 5 silos
$('.choice--btn').click(function() {
if ($(this)[0].classList[1] != "agri") {
$('.site--bloc.agri').addClass('hidden');
} else {
$('.site--bloc.agri').removeClass('hidden');
}
$('body .bg-opacity').removeClass('active');
$('.popup-choice').removeClass('active');
$('body').removeClass('popup-choice-active');
})
default:
$("#collect--map").append(
'<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d120205.41598827539!2d0.26861220027133315!3d48.26072718402679!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sfr!2sfr!4v1613659020066!5m2!1sfr!2sfr" width="100%" height="450" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>'
);
break;
}
}
});
// On rempli le contenu de l'ancre du bouton cliqué (carte google)
$('.contact--row .bloc--btn').click(function(e) {
// e.preventDefault();
if ($(this)[0].classList[1]) {
// $( "#collect--map" ).fadeOut(0).fadeIn(500);
$('#collect--map').empty();
switch ($(this)[0].classList[1]) {
case "marolles":
$('#collect--map').append('<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=marolles-les-brault%20jeusselin&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>');
break;
case "cherre":
$('#collect--map').append('<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=8%20Rue%20Princesse%20Alice%20de%20Monaco,%2072400%20Cherr%C3%A9&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>');
break;
case "monce":
$('#collect--map').append('<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=monc%C3%A9%20en%20saosnois%20jeusselin&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>');
break;
case "nogent-le-bernard":
$('#collect--map').append('<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1117.2914302876688!2d0.48414369744826813!3d48.23777666920131!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDjCsDE0JzE2LjEiTiAwwrAyOScwNi4yIkU!5e0!3m2!1sfr!2sfr!4v1614339962855!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>');
break;
case "mamers":
$('#collect--map').append('<iframe width="100%" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=mamers%20jeusselin&amp;z=17&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>');
break;
case "thoigne-les-mees":
$('#collect--map').append('<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d684.8675256600119!2d0.25121078570016875!3d48.29166291969703!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDjCsDE3JzMwLjAiTiAwwrAxNScwNi40IkU!5e0!3m2!1sfr!2sfr!4v1614340298291!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>');
break;
case "les-mees":
$('#collect--map').append('<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d938.0259842406967!2d0.2293244494024086!3d48.31942522912142!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDjCsDE5JzA5LjkiTiAwwrAxMyc0OC4wIkU!5e0!3m2!1sfr!2sfr!4v1614344416993!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>');
break;
case "sille-le-guillaume":
$('#collect--map').append('<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1330.273278394541!2d-0.14506682996032197!3d48.17681993475754!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4809d1eb78257d43%3A0x11526a18898cf526!2sEvialis%20France!5e0!3m2!1sfr!2sfr!4v1614345037843!5m2!1sfr!2sfr" width="100%" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>');
break;
default:
$('#collect--map').append('<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d120205.41598827539!2d0.26861220027133315!3d48.26072718402679!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sfr!2sfr!4v1613659020066!5m2!1sfr!2sfr" width="100%" height="450" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>');
break;
}
}
})
// FOOTER
// 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')
}
})
$(window).on("scroll", function () {
if ($(window).scrollTop()) {
$("header").addClass("sticky-bar");
$(".pageup").addClass("see");
} else {
$("header").removeClass("sticky-bar");
$(".pageup").removeClass("see");
}
});
});