@widelab-nc/widelab 1.1.44 → 1.1.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widelab-nc/widelab",
3
- "version": "1.1.44",
3
+ "version": "1.1.46",
4
4
  "description": "Widelab starter template based on Finsweet template + add-ons.",
5
5
  "homepage": "https://widelab.co",
6
6
  "license": "ISC",
package/src/index.js CHANGED
@@ -514,6 +514,73 @@ window.customCursorTextUpdate = function(el) {
514
514
  };
515
515
 
516
516
 
517
+ window.hueAwardsAnimation = function(e) {
518
+ let mm = gsap.matchMedia();
519
+ mm.add("(max-width: 991px)", () => {
520
+ const logoItems = e.querySelectorAll('.clients_collection_item_mask.is-3');
521
+
522
+ logoItems.forEach((maskEl) => {
523
+ const imgEl = maskEl.querySelector('.skills-item_img');
524
+ if (!imgEl) return;
525
+
526
+ gsap.set(maskEl, { height: '100%' });
527
+
528
+ gsap.to(maskEl, {
529
+ scrollTrigger: {
530
+ trigger: maskEl,
531
+ start: 'top bottom-=25%',
532
+ },
533
+ height: '0%',
534
+ duration: 0.7,
535
+ ease: 'loader2',
536
+ });
537
+
538
+ gsap.from(imgEl, {
539
+ scrollTrigger: {
540
+ trigger: maskEl,
541
+ start: 'top bottom-=25%',
542
+ },
543
+ opacity: 0,
544
+ delay: 0.4,
545
+ duration: 0.45,
546
+ ease: 'loader2',
547
+ });
548
+ });
549
+ });
550
+ };
551
+
552
+
553
+
554
+
555
+ window.navbarThemeWatcher = function () {
556
+ function checkNavbarTheme() {
557
+ var stack = document.elementsFromPoint(window.innerWidth / 2, 20);
558
+ var isDark = stack.some(function (el) {
559
+ return el.closest && el.closest('.is-dark-bg');
560
+ });
561
+ document.body.classList.toggle('is-nav-dark', isDark);
562
+ }
563
+
564
+ var ticking = false;
565
+ function onScroll() {
566
+ if (!ticking) {
567
+ requestAnimationFrame(function () {
568
+ checkNavbarTheme();
569
+ ticking = false;
570
+ });
571
+ ticking = true;
572
+ }
573
+ }
574
+
575
+ window.addEventListener('scroll', onScroll, { passive: true });
576
+ window.addEventListener('resize', onScroll);
577
+ checkNavbarTheme();
578
+ };
579
+
580
+
581
+
582
+
583
+
517
584
 
518
585
  window.stickyServices = function (e) {
519
586
  var wrapper = e;