initial commit

This commit is contained in:
Sergei Vasilev
2026-03-01 01:03:18 +03:00
commit 212909283c
5 changed files with 23213 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
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 }
);
reveals.forEach((item, idx) => {
item.style.transitionDelay = `${Math.min(idx * 45, 280)}ms`;
observer.observe(item);
});
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 }
);
["approach", "services", "cases", "contacts"].forEach((id) => {
const section = document.getElementById(id);
if (section) {
sectionObserver.observe(section);
}
});