@hortonstudio/main 1.7.0 → 1.7.2
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/autoInit/navbar.js +0 -18
- package/autoInit/smooth-scroll.js +6 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/autoInit/navbar.js
CHANGED
|
@@ -453,12 +453,6 @@ function setupMenuButton() {
|
|
|
453
453
|
|
|
454
454
|
document.body.classList.add("u-overflow-hidden");
|
|
455
455
|
|
|
456
|
-
document
|
|
457
|
-
.querySelectorAll('[data-hs-nav="modal-blur"]')
|
|
458
|
-
.forEach((element) => {
|
|
459
|
-
element.classList.add('is-active');
|
|
460
|
-
});
|
|
461
|
-
|
|
462
456
|
menuButton.setAttribute("aria-expanded", "true");
|
|
463
457
|
menuButton.setAttribute("aria-label", "Close navigation menu");
|
|
464
458
|
|
|
@@ -487,12 +481,6 @@ function setupMenuButton() {
|
|
|
487
481
|
|
|
488
482
|
document.body.classList.remove("u-overflow-hidden");
|
|
489
483
|
|
|
490
|
-
document
|
|
491
|
-
.querySelectorAll('[data-hs-nav="modal-blur"]')
|
|
492
|
-
.forEach((element) => {
|
|
493
|
-
element.classList.remove('is-active');
|
|
494
|
-
});
|
|
495
|
-
|
|
496
484
|
if (menu.contains(document.activeElement)) {
|
|
497
485
|
menuButton.focus();
|
|
498
486
|
}
|
|
@@ -551,12 +539,6 @@ function setupMenuDisplayObserver() {
|
|
|
551
539
|
|
|
552
540
|
// Toggle modal effects only when menu is visible AND menu is open
|
|
553
541
|
document.body.classList.toggle("u-overflow-hidden", shouldShowModal);
|
|
554
|
-
|
|
555
|
-
document
|
|
556
|
-
.querySelectorAll('[data-hs-nav="modal-blur"]')
|
|
557
|
-
.forEach((element) => {
|
|
558
|
-
element.classList.toggle('is-active', shouldShowModal);
|
|
559
|
-
});
|
|
560
542
|
}
|
|
561
543
|
|
|
562
544
|
const displayObserver = new ResizeObserver(handleDisplayChange);
|
|
@@ -85,6 +85,12 @@ export async function init() {
|
|
|
85
85
|
// Initialize anchor link handling
|
|
86
86
|
handleAnchorClicks();
|
|
87
87
|
|
|
88
|
+
// Mock scroll to trigger scroll-based animations
|
|
89
|
+
if (document.body.scrollHeight > window.innerHeight) {
|
|
90
|
+
gsap.set(window, { scrollTo: 1 });
|
|
91
|
+
gsap.set(window, { scrollTo: 0 });
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
return {
|
|
89
95
|
result: "autoInit-smooth-scroll initialized",
|
|
90
96
|
};
|
package/index.js
CHANGED