Добавила ресурсы.

This commit is contained in:
Yulia Polushvayko
2025-06-06 14:27:06 +03:00
parent 84b412faa8
commit 102ee21cdc
167 changed files with 102853 additions and 0 deletions

48
main.js Normal file
View File

@ -0,0 +1,48 @@
// Show menu
const navMenu = document.getElementById("nav-menu");
const navToggle = document.getElementById("nav-toggle");
const navClose = document.getElementById("nav-close");
// Validate if const exists
if (navToggle) {
navToggle.addEventListener("click", () => {
navMenu.classList.add("show-menu");
});
}
//Menu hidden
// alidate if const exists
if (navClose) {
navClose.addEventListener("click", () => {
navMenu.classList.remove("show-menu");
});
}
// Remove menu mobile
const navLink = document.querySelectorAll(".nav-link");
const linkAction = () => {
const navMenu = document.getElementById("nav-menu");
navMenu.classList.remove("show-menu");
};
navLink.forEach((n) => n.addEventListener("click", linkAction));
// GSAP animation
gsap.from('.home-frame', 1.5, { opacity: 0, y: -300, delay: 0.2 });
gsap.from('.home-sphere', 1.5, { opacity: 0, x: -300, delay: 0.3 });
gsap.from('.home-triangle', 1.5, { opacity: 0, x: 300, delay: 0.6 });
gsap.from('.home-r', 1.5, { opacity: 0, y: -300, delay: 0.8 });
gsap.from('.home-l', 1.5, { opacity: 0, y: 300, delay: 0.8 });
if (window.innerWidth <= 766) {
gsap.from('.home-content', 1.5, { opacity: 0, y: -300, delay: 0.8 });
gsap.from('.home-title img', 1.5, { opacity: 0, x: 100, delay: 1.3 });
} else {
gsap.from('.home-content', 1.5, { opacity: 0, x: -300, delay: 0.8 });
gsap.from('.home-title img', 1.5, { opacity: 0, x: 300, delay: 1.2 });
}