Initial commit
This commit is contained in:
423
www/template/js/main.min.js
vendored
Normal file
423
www/template/js/main.min.js
vendored
Normal file
@@ -0,0 +1,423 @@
|
||||
|
||||
/* Isotope Filter
|
||||
-------------------------------------------------------*/
|
||||
$('.portfolio-filter').on( 'click', 'a', function(e) {
|
||||
e.preventDefault();
|
||||
var filterValue = $(this).attr('data-filter');
|
||||
$container.isotope({ filter: filterValue });
|
||||
|
||||
$('.portfolio-filter a').removeClass('active');
|
||||
$(this).closest('a').addClass('active');
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* Portfolio
|
||||
-------------------------------------------------------*/
|
||||
var $container = $('.works-grid');
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
var slider_ref
|
||||
function slideReference(){
|
||||
|
||||
|
||||
|
||||
slider_ref = $('.slider-references').bxSlider({mode:"vertical", autoStart:true, controls:false, pager:false, auto:false, infiniteLoop:false, onSlideAfter:function($slideElement, oldIndex, newIndex){
|
||||
|
||||
slideQty = slider_ref.getSlideCount();
|
||||
if (newIndex==slideQty-1) {
|
||||
$(".fa-arrow-up").css("display", "block");
|
||||
$(".fa-arrow-down").css("display", "none");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(".fa-arrow-up").css("display", "none");
|
||||
$(".fa-arrow-down").css("display", "block");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.scroll-counter .current').html("0"+newIndex);}});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( $( window ).width()<992) {
|
||||
if ($('.page-nos-references').length>0){
|
||||
|
||||
slider_ref.destroySlider();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.scroll-page').mousewheel(function(event, delta, deltaX, deltaY) {
|
||||
|
||||
if ( $( window ).width()>992) {
|
||||
if (delta > 0) {
|
||||
slider.goToPrevSlide();
|
||||
}
|
||||
if (deltaY < 0){
|
||||
slider.goToNextSlide();
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
$("select").on("change", function() {
|
||||
|
||||
|
||||
|
||||
$.ajax( {
|
||||
type: "GET",
|
||||
url: $("form").attr( 'action' ),
|
||||
data: $("form").serialize(),
|
||||
success: function( response ) {
|
||||
$(".scroll-viewport--about").html (response);
|
||||
|
||||
|
||||
|
||||
|
||||
slideReference();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**/
|
||||
|
||||
|
||||
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '.close-ref', function(){
|
||||
|
||||
window.history.pushState("", "", '/references');
|
||||
|
||||
|
||||
$(".close-ref").css("display", "none");
|
||||
|
||||
$("#liste-left").css("display", "block");
|
||||
$("#liste-right").css("display", "block");
|
||||
|
||||
|
||||
$("#ref-left").css("display", "none");
|
||||
$("#ref-right").css("display", "none");
|
||||
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.close-actu', function(){
|
||||
|
||||
window.history.pushState("", "", '/les-actualites');
|
||||
|
||||
|
||||
$("body").removeClass('open');
|
||||
|
||||
|
||||
$(".close-actu").css("display", "none");
|
||||
|
||||
$("#liste-left").css("display", "block");
|
||||
$("#liste-right").css("display", "block");
|
||||
|
||||
|
||||
$("#ref-left").css("display", "none");
|
||||
$("#ref-right").css("display", "none");
|
||||
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).on('click', '.page-actualite .post-list li a', function(){
|
||||
|
||||
|
||||
window.history.pushState("", "", $(this).attr("href"));
|
||||
|
||||
|
||||
$.get("./?fond=actu-load-contenu&id="+$(this).attr("rel"), function(data) {
|
||||
$("#ref-right").html (data);
|
||||
$("#ref-right").css("display", "block");
|
||||
$("#liste-right").css("display", "none");
|
||||
});
|
||||
|
||||
$.get("./?fond=actu-load-titre&id="+$(this).attr("rel"), function(data) {
|
||||
|
||||
$("#ref-left").html (data);
|
||||
$("#ref-left").css("display", "block");
|
||||
$("#liste-left").css("display", "none");
|
||||
$(".close-actu").css("display", "block");
|
||||
$("body").addClass('open');
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.shelf--work li', function(){
|
||||
|
||||
|
||||
window.history.pushState("", "", $(this).find("a").attr("href"));
|
||||
|
||||
|
||||
var loppDone =0;
|
||||
$.get("./?fond=references-load-images&id="+$(this).attr("rel"), function(data) {
|
||||
$("#ref-right").html (data);
|
||||
loppDone++;
|
||||
processData();
|
||||
});
|
||||
|
||||
$.get("./?fond=references-load-text&id="+$(this).attr("rel"), function(data) {
|
||||
loppDone++;
|
||||
|
||||
$("#ref-left").html (data);
|
||||
processData();
|
||||
});
|
||||
|
||||
var processData = function(){
|
||||
if (loppDone==2){
|
||||
|
||||
$("#ref-left").css("display", "block");
|
||||
$("#ref-right").css("display", "block");
|
||||
$(".close-ref").css("display", "block");
|
||||
$("#liste-left").css("display", "none");
|
||||
$("#liste-right").css("display", "none");
|
||||
|
||||
|
||||
|
||||
|
||||
$("#slider-ref").bxSlider({
|
||||
autoStart:true,
|
||||
auto:true,
|
||||
controls:false,
|
||||
infiniteLoop:true,
|
||||
pager:false,
|
||||
preloadImages:"all",
|
||||
mode:"vertical"
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#burger").on("click", function() {
|
||||
$("#burger, #header, .nav").toggleClass("active");
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
$('.bxslider').bxSlider({
|
||||
autoStart:true,
|
||||
auto:true,
|
||||
controls:false
|
||||
});
|
||||
|
||||
|
||||
|
||||
slideReference();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var slider = $('.scroll-page').bxSlider({mode:"vertical", autoStart:true, controls:false, pager:false, auto:false, infiniteLoop:false, onSlideAfter:function($slideElement, oldIndex, newIndex){
|
||||
|
||||
slideQty = slider.getSlideCount();
|
||||
if (newIndex==slideQty-1) {
|
||||
$(".fa-arrow-up").css("display", "block");
|
||||
$(".fa-arrow-down").css("display", "none");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(".fa-arrow-up").css("display", "none");
|
||||
$(".fa-arrow-down").css("display", "block");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.scroll-counter .current').html("0"+newIndex);}});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('.scroll-page').mousewheel(function(event, delta, deltaX, deltaY) {
|
||||
|
||||
if ( $( window ).width()>992) {
|
||||
if (delta > 0) {
|
||||
slider.goToPrevSlide();
|
||||
}
|
||||
if (deltaY < 0){
|
||||
slider.goToNextSlide();
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".scroll-btn-equipe").on("click", function() {
|
||||
|
||||
|
||||
slideQty = slider.getSlideCount();
|
||||
|
||||
|
||||
if ( slider.getCurrentSlide()==slideQty-1) {
|
||||
|
||||
|
||||
slider.goToSlide(0);
|
||||
}
|
||||
else{
|
||||
|
||||
slider.goToNextSlide();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '.scroll-btn-ref', function(){
|
||||
|
||||
|
||||
slideQty = slider_ref.getSlideCount();
|
||||
|
||||
|
||||
if ( slider_ref.getCurrentSlide()==slideQty-1) {
|
||||
|
||||
|
||||
slider_ref.goToSlide(0);
|
||||
}
|
||||
else{
|
||||
|
||||
slider_ref.goToNextSlide();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(".page-nous-rejoindre .actu-list .post-header").on("click", function() {
|
||||
//alert ("xxx");
|
||||
$(this).parent().find(".trigger").toggleClass("active");
|
||||
$(this).parent().find(".collapse").toggleClass("in");
|
||||
$(this).parent().find(".post-header__intro").toggleClass("to-hide");
|
||||
|
||||
// $('body').scrollTo(this);
|
||||
|
||||
$target = $(this);
|
||||
$(this)
|
||||
$('.section--careers').stop().animate( {
|
||||
'scrollTop': $target.offset().top-40
|
||||
}, 100, 'swing', function () {
|
||||
/* window.location.hash = target;*/
|
||||
} );
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$(".pane__content").on("scroll",function(e){
|
||||
|
||||
|
||||
|
||||
/*console.log($(".pane__content").scrollTop());*/
|
||||
|
||||
|
||||
if ($(".pane__content").scrollTop()>45){
|
||||
$(".logo-cube-wrap").hide("fast");
|
||||
} else {
|
||||
$(".logo-cube-wrap").show("fast");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(window).on("load resize",function(e){
|
||||
|
||||
|
||||
|
||||
|
||||
if ( $( window ).width()<992) {
|
||||
|
||||
|
||||
if ($('.scroll-page').length>0){
|
||||
slider.destroySlider();
|
||||
}
|
||||
|
||||
|
||||
if ($('.page-nos-references').length>0){
|
||||
slider_ref.destroySlider();
|
||||
}
|
||||
|
||||
|
||||
$('.scroll-page').attr("style","");
|
||||
}
|
||||
else{
|
||||
|
||||
//slider.reloadSlider();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user