@widelab-nc/widelab 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -3
- package/dist/index.js.map +3 -3
- package/dist/style.css +0 -1
- package/package.json +1 -1
- package/src/index.js +190 -23
package/dist/style.css
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
1
|
html.lenis{height:auto}.splide__list{user-select:none}.hero_headline.is-cta{text-wrap:balance}#heroHeading{pointer-events:none;user-select:none}.hero_headline-span{pointer-events:auto;z-index:-1}.hero-line-mask:first-of-type{z-index:2}.hero_headline-span{aspect-ratio:65/23}.clients_collection_item_wrapper{aspect-ratio:1/1}.start_diagram_step_path-mask{aspect-ratio:2/1}.splide__track{overflow:visible}.splide__pagination__page.reviews-page,.splide__pagination__page.facts-page{height:.625rem;width:.625rem;background:#b2b2b2;opacity:.5;margin:.25rem}.splide__pagination__page.reviews-page.is-active,.splide__pagination__page.facts-page.is-active{height:.625rem;width:.625rem;background:#000;opacity:1;transform:none}.footer_logo-svg{aspect-ratio:1286/185}address{font-style:normal}.bottom-wrapper_footer-spacer,.whats-next_links_item_image-wrapper,.reel-modal_player{pointer-events:none}.skills_item_hover-track.is-design{white-space:nowrap;will-change:transform;animation:marquee-horizontal 12s linear infinite}.skills_item_hover-track.is-branding,.skills_item_hover-track.is-nocode{white-space:nowrap;will-change:transform;animation:marquee-horizontal 5s linear infinite}@keyframes marquee-horizontal{0%{transform:translate(0)}to{transform:translate(-50%)}}.splide__pagination.facts-pagination{padding:0;align-items:start;justify-content:left}.hero-line-mask,.stats-line-mask,.facts-line-mask,.cs-line-mask{clip-path:polygon(0 0,100% 0,100% 110%,0 110%)}@media only screen and (min-width: 992px){#csSingleFooter{position:static}#csItemTransformWrapper,#csItemNotTransformWrapper{padding-left:2.5rem;padding-right:2.5rem}.portfolio_item_image-wrapper.is-portrait{aspect-ratio:31/32}.portfolio_item_image-wrapper{aspect-ratio:4/3}.portfolio_wrapper.is-2-col>.portfolio_item:first-child .portfolio_item_content,.portfolio_item.is-1-left .portfolio_item_content{padding-left:2.5rem}.splide__pagination.reviews-pagination{bottom:-3.625rem}.splide__pagination.facts-pagination{bottom:2.25rem;left:0;right:0}#stickyNavbar{padding:1rem 2.5rem}.button_small .link,.portfolio_item .is-p-l.is-link,.cookies-button{position:relative;text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-position:0 100%;background-repeat:no-repeat;background-size:100% .08em;transition:background-size .2s cubic-bezier(.65,0,.35,1)}.button_small:hover .link,.button_small:focus .link,.portfolio_item:hover .is-p-l.is-link,.portfolio_item:active .is-p-l.is-link,.cookies-button:hover,.cookies-button:active{background-size:0% .08em}.button_small .button_small_icon_circle,.cta_link .cta_link_icon-wrapper{position:relative}.button_small .button_small_icon_circle:after,.cta_link .cta_link_icon-wrapper:after{background-color:inherit;border-radius:50%;content:"";position:absolute;inset:0;z-index:-1;transition:.3s cubic-bezier(.83,0,.17,1)}.button_small:hover .button_small_icon_circle:after,.cta_link:hover .cta_link_icon-wrapper:after{scale:1.2}.navbar_menu_link,.footer_menu_link,.is-link,.cta_link .is-h4{position:relative;text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-position:0 100%;background-repeat:no-repeat;background-size:0% .08em;transition:background-size .2s cubic-bezier(.65,0,.35,1)}.navbar_menu_link:hover,.navbar_menu_link:focus,.footer_menu_link:hover,.footer_menu_link:focus,.is-link:hover,.is-link_link:focus,.cta_link:hover .is-h4,.cta_link:focus .is-h4{background-size:100% .08em}}@media only screen and (max-width: 1180px) and (min-width: 992px){.stats-content_wrapper{padding-right:4vw}}@media only screen and (max-width: 1280px) and (min-width: 992px){.section.is-cs-2col{padding-left:2.5rem;padding-right:2.5rem}}@media only screen and (max-width: 991px){.navbar .button_small .button_small_icon_circle{display:none}#csItemTransformWrapper{padding-left:1.75rem;padding-right:1.75rem}.portfolio_item_image-wrapper{aspect-ratio:6/5}.button_small .link,.portfolio_item .is-p-l.is-link,.cta_link.is-mobile-nav .is-p-l,.cookies-button{position:relative;text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-position:0 100%;background-repeat:no-repeat;background-size:100% .08em}.splide__pagination.reviews-pagination{bottom:-3.5rem}.splide__pagination.facts-pagination{top:15.25rem;left:0;right:0}.splide__list.team_collection_list{overflow:visible}}@media only screen and (max-width: 767px){#csItemTransformWrapper{padding-left:1.375rem;padding-right:1.375rem}.reel_prev_mask{aspect-ratio:19/22}.splide__pagination.facts-pagination{top:13.5rem;left:0;right:0}.portfolio_item_image-wrapper{aspect-ratio:95/79}.splide__pagination.reviews-pagination{bottom:-3rem}}.background-video{height:100%;position:relative;overflow:hidden}.background-video>video{width:100%;height:100%;object-fit:cover;z-index:-100;background-position:50%;background-size:cover;margin:auto;position:absolute;inset:-100%}.background-video>video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.background-video--control{background-color:#0000;padding:0;position:absolute;bottom:1em;right:1em}.background-video--control>[hidden]{display:none!important}
|
|
2
|
-
/*# sourceMappingURL=style.css.map */
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { SplitText } from "gsap/SplitText";
|
|
|
8
8
|
import Splide from '@splidejs/splide';
|
|
9
9
|
import { DrawSVGPlugin } from 'gsap/DrawSVGPlugin';
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
// GSAP plugins register and custom easing
|
|
12
13
|
gsap.registerPlugin(ScrollTrigger, ScrollToPlugin, CustomEase, SplitText, DrawSVGPlugin);
|
|
13
14
|
function customGsapEasing() {
|
|
@@ -77,14 +78,17 @@ function customGsapEasing() {
|
|
|
77
78
|
|
|
78
79
|
// Hero move to reveal footer
|
|
79
80
|
function revealFooter() {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
const footer = document.querySelector('.is-footer');
|
|
82
|
+
if (footer) {
|
|
83
|
+
gsap.to('#heroSection', {
|
|
84
|
+
scrollTrigger: {
|
|
85
|
+
trigger: '#bottomWrapper',
|
|
86
|
+
start: 'top bottom',
|
|
87
|
+
toggleActions: 'restart none none reverse',
|
|
88
|
+
},
|
|
89
|
+
autoAlpha: 0,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
// Page load animation
|
|
@@ -405,23 +409,76 @@ function customGsapEasing() {
|
|
|
405
409
|
});
|
|
406
410
|
|
|
407
411
|
// Animations
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
document.querySelector('.facts-slide_diagram-trigger.is-2').click();
|
|
412
|
+
// Function to play video on the active slide
|
|
413
|
+
function playActiveSlideVideo(newIndex) {
|
|
414
|
+
var activeSlide = factsSplide.Components.Elements.slides[newIndex];
|
|
415
|
+
var activeVideo = activeSlide.querySelector('video');
|
|
416
|
+
if (activeVideo) {
|
|
417
|
+
activeVideo.play();
|
|
415
418
|
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// Function to pause and rewind videos on inactive slides
|
|
422
|
+
function pauseAndRewindInactiveVideos(newIndex) {
|
|
423
|
+
var slides = factsSplide.Components.Elements.slides;
|
|
424
|
+
slides.forEach(function (slide, index) {
|
|
425
|
+
var video = slide.querySelector('video');
|
|
426
|
+
if (video && index !== newIndex) {
|
|
427
|
+
video.pause();
|
|
428
|
+
video.currentTime = 0; // rewind the video
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
// Function to animate elements on the active slide
|
|
433
|
+
function animateSlideElements(slide) {
|
|
434
|
+
gsap.fromTo(
|
|
435
|
+
[
|
|
436
|
+
slide.querySelector('.is-h4'),
|
|
437
|
+
slide.querySelector('.facts-slide_legend-wrapper'),
|
|
438
|
+
slide.querySelector('.facts-slide_diagram-wrapper'),
|
|
439
|
+
slide.querySelector('.facts-slide_source')
|
|
440
|
+
],
|
|
441
|
+
{
|
|
442
|
+
x: '2rem',
|
|
443
|
+
opacity: 0
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
x: '0',
|
|
447
|
+
opacity: 1,
|
|
448
|
+
stagger: 0.2,
|
|
449
|
+
duration: 0.5,
|
|
450
|
+
easing: 'loader2'
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
// Function to reset animation for the elements in the slide
|
|
455
|
+
function resetSlideAnimation(slide) {
|
|
456
|
+
gsap.set(
|
|
457
|
+
[
|
|
458
|
+
slide.querySelector('.is-h4'),
|
|
459
|
+
slide.querySelector('.facts-slide_legend-wrapper'),
|
|
460
|
+
slide.querySelector('.facts-slide_diagram-wrapper'),
|
|
461
|
+
slide.querySelector('.facts-slide_source')
|
|
462
|
+
],
|
|
463
|
+
{
|
|
464
|
+
x: '2rem',
|
|
465
|
+
opacity: 0
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
// Event listener for 'move' event
|
|
470
|
+
factsSplide.on('move', function (newIndex) {
|
|
471
|
+
playActiveSlideVideo(newIndex);
|
|
472
|
+
var activeSlide = factsSplide.Components.Elements.slides[newIndex];
|
|
473
|
+
animateSlideElements(activeSlide);
|
|
416
474
|
});
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
document.querySelector('.facts-slide_diagram-trigger.is-0').click();
|
|
423
|
-
},
|
|
475
|
+
// Event listener for 'moved' event
|
|
476
|
+
factsSplide.on('moved', function (oldIndex) {
|
|
477
|
+
pauseAndRewindInactiveVideos(oldIndex);
|
|
478
|
+
var previousSlide = factsSplide.Components.Elements.slides[oldIndex];
|
|
479
|
+
resetSlideAnimation(previousSlide);
|
|
424
480
|
});
|
|
481
|
+
|
|
425
482
|
}
|
|
426
483
|
|
|
427
484
|
// Team slider
|
|
@@ -788,6 +845,116 @@ function customGsapEasing() {
|
|
|
788
845
|
});
|
|
789
846
|
}
|
|
790
847
|
|
|
848
|
+
// Sliders on Services page
|
|
849
|
+
window.servicesSliders = function(e) {
|
|
850
|
+
const config = {
|
|
851
|
+
type: 'loop',
|
|
852
|
+
perPage: 1,
|
|
853
|
+
gap: 0,
|
|
854
|
+
arrows: false,
|
|
855
|
+
drag: false,
|
|
856
|
+
duration: 0.15,
|
|
857
|
+
easing: 'cubic-bezier(0.83, 0, 0.17, 1)',
|
|
858
|
+
classes: {
|
|
859
|
+
pagination: 'splide__pagination services-pagination',
|
|
860
|
+
page: 'splide__pagination__page services-page',
|
|
861
|
+
},
|
|
862
|
+
breakpoints: {
|
|
863
|
+
992: { drag: true, fixedWidth: '90%' },
|
|
864
|
+
480: {},
|
|
865
|
+
},
|
|
866
|
+
};
|
|
867
|
+
const slider = new Splide(e, config).mount();
|
|
868
|
+
if (window.innerWidth > 992) {
|
|
869
|
+
slider.on('click', function () {
|
|
870
|
+
slider.go('+1');
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
gsap.from(e, {
|
|
874
|
+
scrollTrigger: {
|
|
875
|
+
trigger: e,
|
|
876
|
+
start: 'top bottom',
|
|
877
|
+
end: 'bottom bottom+=15%',
|
|
878
|
+
scrub: 1,
|
|
879
|
+
once: true,
|
|
880
|
+
},
|
|
881
|
+
x: '10%',
|
|
882
|
+
opacity: 0,
|
|
883
|
+
ease: 'linear',
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// Case study - What's next interaction
|
|
888
|
+
window.whatsNext = function() {
|
|
889
|
+
const caseItem = document.querySelectorAll('.whats-next_links_item.is-case');
|
|
890
|
+
const allCases = document.querySelector('.whats-next_links_item.is-all');
|
|
891
|
+
caseItem.forEach((item) => {
|
|
892
|
+
const imageMask = item.querySelector('.whats-next_links_item_image_mask');
|
|
893
|
+
const imageWrapper = item.querySelector('.whats-next_links_item_image-wrapper');
|
|
894
|
+
const whatsNextHover = gsap.timeline({ paused: true, ease: 'loader2' });
|
|
895
|
+
whatsNextHover.to(imageWrapper, { opacity: 0.8, duration: 0.15 });
|
|
896
|
+
whatsNextHover.to(imageMask, { width: '0%', duration: 0.3 }, '>-0.');
|
|
897
|
+
item.addEventListener('mouseenter', () => {
|
|
898
|
+
whatsNextHover.timeScale(1).play();
|
|
899
|
+
caseItem.forEach((i) => {
|
|
900
|
+
if (i !== event.target) {
|
|
901
|
+
gsap.to(i, { color: '#7A7A7A', duration: 0.2, ease: 'loader2' });
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
});
|
|
905
|
+
item.addEventListener('mouseleave', () => {
|
|
906
|
+
whatsNextHover.timeScale(3).reverse();
|
|
907
|
+
caseItem.forEach((i) => {
|
|
908
|
+
if (i !== event.target) {
|
|
909
|
+
gsap.to(i, { color: '#fff', duration: 0.1, ease: 'loader2' });
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
});
|
|
913
|
+
});
|
|
914
|
+
allCases.addEventListener('mouseenter', () => {
|
|
915
|
+
gsap.to(allCases, { color: '#fff', duration: 0.2, ease: 'loader2' });
|
|
916
|
+
caseItem.forEach((item) => {
|
|
917
|
+
gsap.to(item, { color: '#7A7A7A', duration: 0.2, ease: 'loader2' });
|
|
918
|
+
});
|
|
919
|
+
});
|
|
920
|
+
allCases.addEventListener('mouseleave', () => {
|
|
921
|
+
gsap.to(allCases, { color: '#7A7A7A', duration: 0.2, ease: 'loader2' });
|
|
922
|
+
caseItem.forEach((item) => {
|
|
923
|
+
gsap.to(item, { color: '#fff', duration: 0.2, ease: 'loader2' });
|
|
924
|
+
});
|
|
925
|
+
});
|
|
926
|
+
|
|
927
|
+
// Remove responsive image feature from CS pages
|
|
928
|
+
for (var i = 0; i < document.getElementsByTagName('img').length; i++) {
|
|
929
|
+
document.getElementsByTagName('img')[i].srcset = '';
|
|
930
|
+
}
|
|
931
|
+
for (var i = 0; i < document.getElementsByTagName('img').length; i++) {
|
|
932
|
+
document.getElementsByTagName('img')[i].sizes = '';
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// Case study - images mask animation
|
|
937
|
+
window.csMaskAnimation = function() {
|
|
938
|
+
const csImageMasks = document.querySelectorAll('.portfolio_item_image-mask');
|
|
939
|
+
csImageMasks.forEach((mask, index) => {
|
|
940
|
+
if (index === 0) {
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
const maskAnimation = gsap.from(mask, {
|
|
944
|
+
width: '100%',
|
|
945
|
+
duration: 0.7,
|
|
946
|
+
ease: 'loader2',
|
|
947
|
+
paused: true,
|
|
948
|
+
});
|
|
949
|
+
ScrollTrigger.create({
|
|
950
|
+
animation: maskAnimation,
|
|
951
|
+
trigger: mask,
|
|
952
|
+
start: 'top 80%',
|
|
953
|
+
onEnter: () => maskAnimation.play(),
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
|
|
791
958
|
|
|
792
959
|
// !!!!!!!!! Keep this Alpine init at the end !!!!!!!!!
|
|
793
960
|
window.Webflow ||= [];
|
|
@@ -813,4 +980,4 @@ function customGsapEasing() {
|
|
|
813
980
|
disableScrollMenu();
|
|
814
981
|
}
|
|
815
982
|
|
|
816
|
-
});
|
|
983
|
+
});
|