chore: save iqon static deploy snapshot
This commit is contained in:
@@ -1,40 +1,49 @@
|
||||
const reveals = document.querySelectorAll(".reveal");
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add("on");
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
},
|
||||
{ threshold: 0.18 }
|
||||
);
|
||||
const observer =
|
||||
"IntersectionObserver" in window
|
||||
? new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add("on");
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
},
|
||||
{ threshold: 0.18 }
|
||||
)
|
||||
: null;
|
||||
|
||||
reveals.forEach((item, idx) => {
|
||||
item.style.transitionDelay = `${Math.min(idx * 45, 280)}ms`;
|
||||
observer.observe(item);
|
||||
if (observer) {
|
||||
observer.observe(item);
|
||||
} else {
|
||||
item.classList.add("on");
|
||||
}
|
||||
});
|
||||
|
||||
const navLinks = document.querySelectorAll(".main-nav a");
|
||||
|
||||
const sectionObserver = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
navLinks.forEach((link) => {
|
||||
link.classList.toggle("active", link.getAttribute("href") === `#${entry.target.id}`);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
{ threshold: 0.55 }
|
||||
);
|
||||
if ("IntersectionObserver" in window) {
|
||||
const sectionObserver = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
navLinks.forEach((link) => {
|
||||
link.classList.toggle("active", link.getAttribute("href") === `#${entry.target.id}`);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
{ threshold: 0.55 }
|
||||
);
|
||||
|
||||
["approach", "services", "cases", "contacts"].forEach((id) => {
|
||||
const section = document.getElementById(id);
|
||||
if (section) {
|
||||
sectionObserver.observe(section);
|
||||
}
|
||||
});
|
||||
["approach", "services", "cases", "contacts"].forEach((id) => {
|
||||
const section = document.getElementById(id);
|
||||
if (section) {
|
||||
sectionObserver.observe(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user