1(function ($, root, undefined) { 2 $(function () { 3 "use strict"; 4 5 //GLOBALS 6 var currentScroll = 0; 7 var outerHeight = $(".transparent-text").outerHeight(); 8 9 //FUNCTIONS 10 function toggleHeader(show = false) { 11 if (show) { 12 //showing the header 13 $(".header").removeClass("hide"); 14 } else { 15 //hiding the header 16 $(".header").addClass("hide"); 17 } 18 19 //set current scroll as previous after 1000ms 20 if (iOS()) { 21 currentScroll = $(window).scrollTop(); 22 } else { 23 clearTimeout(); 24 25 setTimeout(function () { 26 currentScroll = $(window).scrollTop(); 27 }, 200); 28 } 29 } 30 31 function switchSlideBackground(slideID, isInnerSlide = false) { 32 $(".fixed-bkg").each(function () { 33 $(this).removeClass("active"); 34 }); 35 36 if (isInnerSlide && isInnerSlide > 0) { 37 $('.fixed-bkg[data-inner-slide="' + slideID + '"]').addClass("active"); 38 } else { 39 $('.fixed-bkg[data-slide="' + slideID + '"]').addClass("active"); 40 } 41 } 42 43 function updateDestination(destination) { 44 $(".slide-section__number").text("0" + (destination.index + 1)); 45 $(".slide-section__tag").text(destination.item.dataset.slideName); 46 47 if (!destination.item.classList.contains("color--white")) { 48 $(".slide-section__header").removeClass("color--white"); 49 } else { 50 $(".slide-section__header").addClass("color--white"); 51 } 52 } 53 54 function toggleScrollDown(show = false) { 55 if (show) { 56 $(".scroll-div").removeClass("hidden"); 57 } else { 58 $(".scroll-div").addClass("hidden"); 59 } 60 } 61 62 function iOS() { 63 return ( 64 ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || 65 // iPad on iOS 13 detection 66 (navigator.userAgent.includes("Mac") && "ontouchend" in document) 67 ); 68 } 69 70 //--------------------------------------------- 71 72 function wordSwitch(start = 1) { 73 setInterval(function () { 74 $(".activeword") 75 .addClass("ejecting") 76 .delay(500) 77 .queue(function () { 78 $(this).removeClass("ejecting activeword").dequeue(); 79 }); 80 $('.word-to-switch[data-order="' + (start + 1) + '"]').addClass("activeword"); 81 $(".wordswitch").css("width", $(".activeword").not(".ejecting").width() + "px"); 82 start++; 83 if (start > $(".word-to-switch").length - 1) { 84 start = 0; 85 } 86 }, 2000); 87 } 88 89 $(".wordswitch").css("width", $(".activeword").width() + "px"); 90 wordSwitch(); 91 92 // Check that the current page can be scrolled first. Pad content if necessary. 93 if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) { 94 // Extend body height to overflow and cause scrolling 95 bodyTag = document.getElementsByTagName("body")[0]; 96 bodyTag.style.height = (document.documentElement.clientWidth / screen.width) * screen.height + "px"; // Viewport height at fullscreen 97 } 98 99 //ACTIONS 100 101 $("body").on("mousemove", function (e) { 102 //get x and y 103 var x = e.originalEvent.clientX; 104 var y = e.originalEvent.clientY; 105 $(".cursor-effect").css("left", x + "px"); 106 $(".cursor-effect").css("top", y + "px"); 107 }); 108 109 $("a").on("mouseenter", function () { 110 $(".cursor-effect").addClass("hovered"); 111 }); 112 113 $("a").on("mouseleave", function () { 114 $(".cursor-effect").removeClass("hovered"); 115 }); 116 117 if ($("body").hasClass("home")) { 118 $(window).on("scroll", function () { 119 if ($(window).scrollTop() > currentScroll && $(window).scrollTop() > 0) { 120 toggleHeader(false); 121 } else { 122 toggleHeader(true); 123 } 124 125 if ($(window).scrollTop() === 0) { 126 toggleHeader(true); 127 } 128 }); 129 } 130 131 $(window).on("scroll", function () { 132 if ($(window).scrollTop() > 0) { 133 toggleScrollDown(false); 134 } else { 135 toggleScrollDown(true); 136 } 137 }); 138 139 $(window).on("resize load", function () { 140 outerHeight = $(".transparent-text").outerHeight(); 141 /* AOS.refresh(); */ 142 if ($(window).outerWidth() > 768) { 143 /* const parralaxImg = document.querySelectorAll(".article-fifty__illustration img"); 144 var parallaxInstance = new simpleParallax(parralaxImg, { 145 transitionl: "ease", 146 }); */ 147 } 148 }); 149 150 $(".btn-video").on("click", function (e) { 151 e.preventDefault(); 152 toggleHeader(false); 153 $(".showreel-video").get(0).play(); 154 155 $("#overshowreel, .video-wrapper, .slide-section__header").fadeOut(1000); 156 //bug ipad qui ne comprend pas le callback() 157 setTimeout(() => { 158 $(".showreel-wrapper").addClass("playing"); 159 $('.js-video-actionbut[data-action="pause"]').addClass("active-action"); 160 $('.js-video-actionbut[data-action="play"]').removeClass("active-action"); 161 }, 1000); 162 }); 163 164 $(".js-video-actionbut").on("click", function () { 165 const action = $(this).data("action"); 166
167 if (action === "play") { 168 $(".showreel-video").get(0).play(); 169 toggleHeader(false); 170 $(".slide-section__header").fadeOut(500); 171 $('.js-video-actionbut[data-action="pause"]').addClass("active-action"); 172 $('.js-video-actionbut[data-action="play"]').removeClass("active-action"); 173 } else if (action === "pause") { 174 $(".showreel-video").get(0).pause(); 175 $('.js-video-actionbut[data-action="play"]').addClass("active-action"); 176 $('.js-video-actionbut[data-action="pause"]').removeClass("active-action"); 177 } else if (action === "mute") { 178 $(".showreel-video").get(0).muted = true; 179 $('.js-video-actionbut[data-action="unmute"]').addClass("active-action"); 180 $('.js-video-actionbut[data-action="mute"]').removeClass("active-action"); 181 } else if (action === "unmute") { 182 $(".showreel-video").get(0).muted = false; 183 $('.js-video-actionbut[data-action="unmute"]').removeClass("active-action"); 184 $('.js-video-actionbut[data-action="mute"]').addClass("active-action"); 185 } 186 }); 187 188 $(".js-show-contact").on("click", function (e) { 189 e.preventDefault(); 190 const parent = $(this).parents(".article-fifty__content"); 191 parent.find(".contact-infos").addClass("displayed"); 192 if (parent.find(".partner-description").height() < parent.find(".contact-infos__content").height()) { 193 parent.find(".partner-description").css("height", parent.find(".contact-infos__content").height() + 15 + "px"); 194 } 195 196 //parent.find(".partner-description").css("height", parent.find(".contact-infos").height() + "px"); 197 }); 198 199 $(".contact-infos__close").on("click", function (e) { 200 $(this).parents(".contact-infos").removeClass("displayed"); 201 }); 202 203 if ($(".single-post, .single-facilities").length > 0) { 204 Fancybox.bind(".gallery a", { 205 // Your custom options 206 groupAll: true, 207 }); 208 } 209 210 if ($(".projects-grid").length > 0) { 211 Fancybox.bind(".gal-item", { 212 // Your custom options 213 groupAll: true, 214 Toolbar: { 215 display: { 216 right: ["slideshow", "download", "thumbs", "close"], 217 }, 218 }, 219 Images: { 220 protected: true, 221 }, 222 }); 223 } 224 225 if ($(".article-fifty__content iframe").length > 0) { 226 $(".article-fifty__content iframe").each(function () { 227 //wrap iframe in div 228 $(this).wrap('<div class="ratio ratio-16x9"></div>'); 229 }); 230 } 231 232 const myCollapsible = document.querySelector("#partnercollapse"); 233 234 if (myCollapsible) { 235 myCollapsible.addEventListener("shown.bs.collapse", (e) => { 236 // do something... 237 var scrollPosition = $('.accordion-item .accordion-button[data-bs-target="#' + e.target.id + '"').offset().top - 103; 238 //scroll to element sithour animation 239 $("html, body").scrollTop(scrollPosition); 240 //set timeout and toggleheader 241 /* setTimeout(function () { 242 toggleHeader(false); 243 }, 800); */ 244 }); 245 } 246 247 $(".accordion-button").on("click", function () { 248 //get data-img-key 249 const imgKey = $(this).data("img-key"); 250 $(".collapse-illustrations__item").removeClass("displayed"); 251 $('.collapse-illustrations__item[data-img-key="' + imgKey + '"]').addClass("displayed"); 252 const imgHeight = $('.collapse-illustrations__item[data-img-key="' + imgKey + '"]').outerHeight(); 253 $(".collapse-illustrations").css("height", imgHeight + "px"); 254 //end 255 }); 256 257 const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]'); 258 const tooltipList = [...tooltipTriggerList].map((tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl)); 259 260 $(".staff").on("click", function () { 261 var staffID = $(this).data("id-staff"); 262 //scroll top to staffs 263 $("html, body").animate( 264 { 265 scrollTop: $(".staffs").offset().top - 200, 266 }, 267 400 268 ); 269 $(".staffs").addClass("staff-info--active"); 270 $('.staff-article[data-id-staff="' + staffID + '"]') 271 .fadeIn("500") 272 .addClass("displayed"); 273 }); 274 275 $(".staff-article .btn-back").on("click", function () { 276 $(".staff-article").hide(0, function () { 277 $(this).removeClass("displayed"); 278 }); 279 $(".staffs").removeClass("staff-info--active"); 280 }); 281 282 $(".partner-nav-item__img-wrapper a").on("click", function (e) { 283 e.preventDefault(); 284 //scroll to acnhor 285 var anchor = $(this).attr("href"); 286 $("html, body").animate( 287 { 288 scrollTop: $(anchor).offset().top - 103, 289 }, 290 500 291 ); 292 }); 293 294 $(".icons-hub__item").on("click", function () { 295 /* $(".icons-hub__item").removeClass("active"); 296 $(this).addClass("active"); 297 $(this).parents(".icons-hub").addClass("is-displaying"); 298 $(".icon-hub__content").addClass("displayed"); 299 const iconID = $(this).data("icon-id"); 300 if ($(".icon-hub__content-item.active").length > 0) { 301 $(".icon-hub__content-item.active") 302 .removeClass("active") 303 .fadeOut("300", function () { 304 //wait for fadeout 305 $('.icon-hub__content-item[data-content-id="' + iconID + '"]') 306 .fadeIn("300") 307 .addClass("active"); 308 }); 309 } else { 310 $('.icon-hub__content-item[data-content-id="' + iconID + '"]') 311 .fadeIn("300") 312 .addClass("active"); 313 } */ 314 315 //get icon-id 316 const iconID = $(this).data("icon-id"); 317 //mote to slide 318 $.fn.fullpage.moveTo(3, iconID); 319 }); 320 321 $(".icon-hub__content .btn-back").on("click", function () { 322 $(".icon-hub__content-item").fadeOut("300").removeClass("d-flex"); 323 $(".icon-hub__content").removeClass("displayed"); 324 $(".icons-hub").removeClass("is-displaying"); 325 //end 326 }); 327 328 //SCRIPTS 329 330 if ($(".facilities-slider").length > 0) { 331 $(".facilities-slider").slick({ 332 slidesToShow: 4, 333 slidesToScroll: 1, 334 arrows: true, 335 autoplay: true, 336 dots: false, 337 infinite: true, 338 prevArrow: '<button type="button" class="slick-prev"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><polyline points="15 18 9 12 15 6"></polyline></svg></button>', 339 nextArrow: '<button type="button" class="slick-next"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg></button>', 340 responsive: [ 341 { 342 breakpoint: 1300, 343 settings: { 344 slidesToShow: 3, 345 slidesToScroll: 1, 346 }, 347 }, 348 { 349 breakpoint: 991.98, 350 settings: { 351 slidesToShow: 2, 352 slidesToScroll: 1, 353 }, 354 }, 355 { 356 breakpoint: 575.98, 357 settings: { 358 slidesToShow: 1, 359 slidesToScroll: 1, 360 }, 361 }, 362 ], 363 }); 364 } 365 366 if ($(".js-slider").length > 0) { 367 $(".js-slider").slick({ 368 dots: false, 369 infinite: true, 370 prevArrow: '<button type="button" class="slick-prev"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><polyline points="15 18 9 12 15 6"></polyline></svg></button>', 371 nextArrow: '<button type="button" class="slick-next"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg></button>', 372 responsive: [ 373 { 374 breakpoint: 767.98, 375 settings: { 376 slidesToShow: 1, 377 slidesToScroll: 1, 378 }, 379 }, 380 ], 381 }); 382 } 383 384 if ($(".home-newsfeed").length > 0) { 385 $(".home-newsfeed").slick({ 386 slidesToShow: 4, 387 slidesToScroll: 1, 388 dots: true,
389 arrows: false, 390 /* dots: true, 391 infinite: true, 392 slidestoShow: 4, 393 slidesToScroll: 1, */ 394 responsive: [ 395 { 396 breakpoint: 991.98, 397 settings: { 398 slidesToShow: 2, 399 slidesToScroll: 1, 400 }, 401 }, 402 { 403 breakpoint: 575.98, 404 settings: { 405 slidesToShow: 1, 406 slidesToScroll: 1, 407 arrows: true, 408 prevArrow: '<button type="button" class="slick-prev"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><polyline points="15 18 9 12 15 6"></polyline></svg></button>', 409 nextArrow: '<button type="button" class="slick-next"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg></button>', 410 }, 411 }, 412 ], 413 }); 414 } 415 416 if ($(".projects-grid").length > 0) { 417 var $grid = $(".projects-grid").isotope({ 418 // options... 419 itemSelector: ".projects-grid__item", 420 percentPosition: true, 421 }); 422 423 //wait for image loaded 424 $grid.imagesLoaded().progress(function () { 425 $grid.isotope("layout"); 426 }); 427 428 $(".filter-button-group").on("click", "a", function (e) { 429 e.preventDefault(); 430 $(".grid-filters__item a").removeClass("active-filter"); 431 var filterValue = $(this).attr("data-filter"); 432 $grid.isotope({ filter: filterValue }); 433 $(this).addClass("active-filter"); 434 AOS.refresh(); 435 }); 436 } 437 var goToNextSlide = ""; 438 439 function resetSlideINterval() { 440 clearInterval(goToNextSlide); 441 goToNextSlide = setInterval(function () { 442 $.fn.fullpage.moveSlideRight(); 443 }, 10000); 444 } 445 if ($(".section-scroll").length > 0) { 446 $(".section-scroll").fullpage({ 447 //options here 448 licenseKey: "D48L9-6AR4J-YKNKI-J1UJ9-XYBXM", 449 scrollHorizontallyKey: "MjJaWFpsYm5Sc2IzVnVaMlV1WW1VPVlJX3J2R2MyTnliMnhzU0c5eWFYcHZiblJoYkd4NXY1cA==", 450 autoScrolling: true, 451 scrollHorizontally: false, 452 continuousHorizontal: false, 453 slidesNavigation: true, 454 credits: false, 455 onLeave: function (origin, destination, direction) { 456 /* console.log("origin", origin); */ 457 /* console.log("destination", destination); */ 458 /* console.log("direction", direction); */ 459 460 if (origin.index === 0) { 461 $(".showreel-video").get(0).pause(); 462 $(".slide-section__header").fadeIn(500); 463 $('.js-video-actionbut[data-action="play"]').addClass("active-action"); 464 $('.js-video-actionbut[data-action="pause"]').removeClass("active-action"); 465 $("#overshowreel, .video-wrapper, .slide-section__header").fadeIn(1000); 466 $(".showreel-wrapper").removeClass("playing"); 467 //bug ipad qui ne comprend pas le callback() 468 } 469 470 if (direction === "up") { 471 toggleHeader(true); 472 } else { 473 toggleHeader(false); 474 } 475 476 if (destination.index === 0) { 477 //find video and play it 478 $(".slider-video").get(0).play(); 479 } 480 switchSlideBackground(destination.index, false); 481 updateDestination(destination); 482 $(".slide-section__header").addClass("displayed"); 483 484 /* if (destination.item.children[0].classList.contains("fp-slides")) { 485 //set interval of 10 sec 486 goToNextSlide = setInterval(function () { 487 $.fn.fullpage.moveSlideRight(); 488 }, 10000); 489 } else { 490 clearInterval(goToNextSlide); 491 } 492 */ 493 //console.log(index, nextIndex, direction, sliding); 494 /* if (slideContent[origin.index] > 0 && !sliding) { 495 if (direction === "down" && slideIndexS < slideContent[origin.index] - 1) { 496 slideIndexS++; 497 $.fn.fullpage.moveSlideRight();
498 switchSlideBackground(slideIndexS, true); 499 return false; 500 } else if (direction === "up" && slideIndexS <= slideContent[origin.index] && slideIndexS > 0) { 501 slideIndexS--; 502 console.log(slideIndexS); 503 $.fn.fullpage.moveSlideLeft(); 504 if (slideIndexS > 0) { 505 switchSlideBackground(slideIndexS, true); 506 } else { 507 switchSlideBackground(origin.index, false); 508 } 509 return false; 510 } 511 switchSlideBackground(destination.index, false); 512 updateDestination(destination); 513 } else if (sliding) { 514 return false; 515 } else { 516 console.log("first show"); 517 if (slideContent[destination.index] > 0 && slideIndexS > 0) { 518 switchSlideBackground(slideIndexS, true); 519 } else { 520 switchSlideBackground(destination.index, false); 521 } 522 updateDestination(destination); 523 } */ 524 }, 525 onSlideLeave(section, origin, destination, direction, trigger) { 526 switchSlideBackground(destination.index, true); 527 $(".icons-hub__item").removeClass("active"); 528 $('.icons-hub__item[data-icon-id="' + destination.index + '"]').addClass("active"); 529 destination.item.children[0].scrollTop = 0; 530 toggleHeader(false); 531 if (goToNextSlide) { 532 resetSlideINterval(); 533 } 534 }, 535 onScrollOverflow: function (section, slide, position, direction) { 536 /* console.log("section", section); 537 console.log("slide", slide); 538 console.log("position", position); */ 539 if (direction === "down") { 540 toggleHeader(false); 541 if (position > 0) { 542 toggleScrollDown(false); 543 } 544 } else if (direction === "up" && !slide) { 545 toggleHeader(true); 546 console.log(slide); 547 if (position < 10) { 548 toggleScrollDown(true); 549 } 550 } 551 552 if (section.index === 0) { 553 if (position + 30 > outerHeight) { 554 $(".slide-section__header").addClass("displayed"); 555 } else { 556 $(".slide-section__header").removeClass("displayed"); 557 } 558 } else { 559 if (position > 0) { 560 $(".slide-section__header").removeClass("displayed"); 561 } 562 } 563 }, 564 }); 565 } 566 567 jQuery.event.special.touchstart = { 568 setup: function (_, ns, handle) { 569 this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") }); 570 }, 571 }; 572 jQuery.event.special.touchmove = { 573 setup: function (_, ns, handle) { 574 this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") }); 575 }, 576 }; 577 jQuery.event.special.wheel = { 578 setup: function (_, ns, handle) { 579 this.addEventListener("wheel", handle, { passive: true }); 580 }, 581 }; 582 jQuery.event.special.mousewheel = { 583 setup: function (_, ns, handle) { 584 this.addEventListener("mousewheel", handle, { passive: true }); 585 }, 586 }; 587 }); 588})(jQuery, this); 589AOS.init({ 590 disable: "mobile", 591 offset: 200, 592 startEvent: "load", 593});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.