diff --git a/web/src/pages/Home/Home.jsx b/web/src/pages/Home/Home.jsx index 644748c9..cd7b9ab3 100644 --- a/web/src/pages/Home/Home.jsx +++ b/web/src/pages/Home/Home.jsx @@ -15,7 +15,8 @@ const GITHUB_LINK = "https://github.com/gnmyt/myspeed"; const COLORS = ["#22c55e", "#f59e0b", "#ef4444"]; const chooseRandomColor = () => COLORS[Math.floor(Math.random() * COLORS.length)]; -const randomPosition = () => Math.random() * 80 + 10; // 10-90% +const randomPosition = () => Math.random() * 70 + 15; +const randomOpacity = () => 0.06 + Math.random() * 0.08; export const Home = () => { const navigate = useNavigate(); @@ -50,7 +51,7 @@ export const Home = () => {
- {Array(12).fill(0).map((_, index) => ( + {Array(7).fill(0).map((_, index) => ( { color: chooseRandomColor(), left: `${randomPosition()}%`, top: `${randomPosition()}%`, - animationDelay: `${index * 0.4}s`, - animationDuration: `${3 + Math.random() * 2}s` + opacity: randomOpacity(), + animationDelay: `${index * 1.2 + Math.random() * 2}s`, + animationDuration: `${12 + Math.random() * 8}s` }} /> ))} diff --git a/web/src/pages/Home/styles.sass b/web/src/pages/Home/styles.sass index 307f3e41..fab5dbec 100644 --- a/web/src/pages/Home/styles.sass +++ b/web/src/pages/Home/styles.sass @@ -55,18 +55,23 @@ .floating-icon position: absolute font-size: 1.5rem - opacity: 0.1 - animation: drift ease-in-out infinite + animation: drift linear infinite @keyframes drift - 0%, 100% + 0% + transform: translate(0, 0) rotate(0deg) + 15% + transform: translate(6px, -8px) rotate(2deg) + 35% + transform: translate(-4px, 5px) rotate(-1deg) + 55% + transform: translate(3px, -3px) rotate(1deg) + 70% + transform: translate(-7px, 6px) rotate(-2deg) + 85% + transform: translate(2px, -4px) rotate(0.5deg) + 100% transform: translate(0, 0) rotate(0deg) - 25% - transform: translate(10px, -15px) rotate(5deg) - 50% - transform: translate(-5px, 10px) rotate(-5deg) - 75% - transform: translate(-15px, -10px) rotate(3deg) .interface-preview position: sticky