diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dcb156d..a2f171e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,9 @@ - + + + @@ -208,7 +210,15 @@ 1785754086526 - + + + 1785754201946 + + + + 1785754201946 + + diff --git a/app/page.jsx b/app/page.jsx index 72b42c0..2832a67 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -39,9 +39,9 @@ export default function HomePage() { - {/**/} + - {/**/} + diff --git a/components/FloatingItems.jsx b/components/FloatingItems.jsx index e312870..0a1ad89 100644 --- a/components/FloatingItems.jsx +++ b/components/FloatingItems.jsx @@ -2,56 +2,56 @@ // رندر آیتمهای شناور (چیپس/نوشابه) دور دستگاه با حرکت تصادفی و ملایم GSAP. -import { useEffect, useRef } from 'react'; -import { gsap } from 'gsap'; +import {useEffect, useRef} from 'react'; +import {gsap} from 'gsap'; /** * Renders the centralized `floatingSnacks` config as absolutely-positioned * images and gives each one a gentle, randomized floating drift via GSAP. * Positions/sizes/images all come from data/content.js — edit there only. */ -export default function FloatingItems({ items }) { - const containerRef = useRef(null); +export default function FloatingItems({items}) { + const containerRef = useRef(null); - useEffect(() => { - const nodes = containerRef.current?.querySelectorAll('[data-float-item]'); - if (!nodes) return; + useEffect(() => { + const nodes = containerRef.current?.querySelectorAll('[data-float-item]'); + if (!nodes) return; - const tweens = Array.from(nodes).map((node, i) => { - const drift = 14 + Math.random() * 14; - const rotate = 4 + Math.random() * 6; - return gsap.to(node, { - y: `+=${drift}`, - rotate: i % 2 === 0 ? rotate : -rotate, - duration: 3.5 + Math.random() * 2.5, - ease: 'sine.inOut', - yoyo: true, - repeat: -1, - delay: Math.random() * 1.5, - }); - }); + const tweens = Array.from(nodes).map((node, i) => { + const drift = 14 + Math.random() * 14; + const rotate = 4 + Math.random() * 6; + return gsap.to(node, { + y: `+=${drift}`, + rotate: i % 2 === 0 ? rotate : -rotate, + duration: 3.5 + Math.random() * 2.5, + ease: 'sine.inOut', + yoyo: true, + repeat: -1, + delay: Math.random() * 1.5, + }); + }); - return () => tweens.forEach((t) => t.kill()); - }, [items]); + return () => tweens.forEach((t) => t.kill()); + }, [items]); - return ( - - {items.map((item) => ( - - ))} - - ); + return ( + + {items.map((item) => ( + + ))} + + ); } diff --git a/package.json b/package.json index bb219a1..0990f99 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev -H 0.0.0.0", "build": "next build", "start": "next start", "lint": "next lint"