diff --git a/src/components/Home.jsx b/src/components/Home.jsx index b254e65..1b481c6 100644 --- a/src/components/Home.jsx +++ b/src/components/Home.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect, useRef } from "react"; import { useNavigate } from "react-router-dom"; import { FiCheck, FiZap, FiShield, FiUsers } from "react-icons/fi"; import logo from "../assets/mind-tinker-logo-new.png"; @@ -6,43 +6,87 @@ import Footer from "./Footer"; export default function Home() { const navigate = useNavigate(); + const particlesRef = useRef(null); + + // Parallax effect for particles + useEffect(() => { + const handleScroll = () => { + if (particlesRef.current) { + const scrollTop = window.pageYOffset; + particlesRef.current.style.transform = `translateY(${scrollTop * 0.3}px)`; + } + }; + window.addEventListener("scroll", handleScroll); + return () => window.removeEventListener("scroll", handleScroll); + }, []); return ( -
- - - {/* Floating Particles */} -
-
-
-
-
-
-
-
-
-
+
+ + {/* Floating Particles with Parallax */} +
+ {[...Array(9)].map((_, i) => ( +
+ ))}
- {/* Navigation Header */} -