This commit is contained in:
Hamed
2026-08-03 15:19:57 +04:00
parent 711ac3668c
commit fbacd2ca22
4 changed files with 57 additions and 47 deletions
+12 -2
View File
@@ -3,7 +3,9 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="bb7b50a5-be9c-4cd7-a05b-979f0e91b173" name="Changes" comment="update"> <list default="true" id="bb7b50a5-be9c-4cd7-a05b-979f0e91b173" name="Changes" comment="update">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/components/VendingCard.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/components/VendingCard.jsx" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/page.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/page.jsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/components/FloatingItems.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/components/FloatingItems.jsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -208,7 +210,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1785754086526</updated> <updated>1785754086526</updated>
</task> </task>
<option name="localTasksCounter" value="16" /> <task id="LOCAL-00016" summary="update">
<option name="closed" value="true" />
<created>1785754201946</created>
<option name="number" value="00016" />
<option name="presentableId" value="LOCAL-00016" />
<option name="project" value="LOCAL" />
<updated>1785754201946</updated>
</task>
<option name="localTasksCounter" value="17" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
+2 -2
View File
@@ -39,9 +39,9 @@ export default function HomePage() {
<IntroVideoSection/> <IntroVideoSection/>
{/*<MapSection/>*/} <MapSection/>
{/*<TicketForm/>*/} <TicketForm/>
<Footer/> <Footer/>
</main> </main>
+42 -42
View File
@@ -2,56 +2,56 @@
// رندر آیتم‌های شناور (چیپس/نوشابه) دور دستگاه با حرکت تصادفی و ملایم GSAP. // رندر آیتم‌های شناور (چیپس/نوشابه) دور دستگاه با حرکت تصادفی و ملایم GSAP.
import { useEffect, useRef } from 'react'; import {useEffect, useRef} from 'react';
import { gsap } from 'gsap'; import {gsap} from 'gsap';
/** /**
* Renders the centralized `floatingSnacks` config as absolutely-positioned * Renders the centralized `floatingSnacks` config as absolutely-positioned
* images and gives each one a gentle, randomized floating drift via GSAP. * images and gives each one a gentle, randomized floating drift via GSAP.
* Positions/sizes/images all come from data/content.js — edit there only. * Positions/sizes/images all come from data/content.js — edit there only.
*/ */
export default function FloatingItems({ items }) { export default function FloatingItems({items}) {
const containerRef = useRef(null); const containerRef = useRef(null);
useEffect(() => { useEffect(() => {
const nodes = containerRef.current?.querySelectorAll('[data-float-item]'); const nodes = containerRef.current?.querySelectorAll('[data-float-item]');
if (!nodes) return; if (!nodes) return;
const tweens = Array.from(nodes).map((node, i) => { const tweens = Array.from(nodes).map((node, i) => {
const drift = 14 + Math.random() * 14; const drift = 14 + Math.random() * 14;
const rotate = 4 + Math.random() * 6; const rotate = 4 + Math.random() * 6;
return gsap.to(node, { return gsap.to(node, {
y: `+=${drift}`, y: `+=${drift}`,
rotate: i % 2 === 0 ? rotate : -rotate, rotate: i % 2 === 0 ? rotate : -rotate,
duration: 3.5 + Math.random() * 2.5, duration: 3.5 + Math.random() * 2.5,
ease: 'sine.inOut', ease: 'sine.inOut',
yoyo: true, yoyo: true,
repeat: -1, repeat: -1,
delay: Math.random() * 1.5, delay: Math.random() * 1.5,
}); });
}); });
return () => tweens.forEach((t) => t.kill()); return () => tweens.forEach((t) => t.kill());
}, [items]); }, [items]);
return ( return (
<div ref={containerRef} className="absolute inset-0 pointer-events-none"> <div ref={containerRef} className="absolute inset-0 pointer-events-none hidden md:block">
{items.map((item) => ( {items.map((item) => (
<img <img
key={item.id} key={item.id}
data-float-item data-float-item
src={item.image} src={item.image}
alt="" alt=""
aria-hidden="true" aria-hidden="true"
className="absolute drop-shadow-[0_8px_20px_rgba(0,0,0,0.35)]" className="absolute drop-shadow-[0_8px_20px_rgba(0,0,0,0.35)]"
style={{ style={{
top: item.top, top: item.top,
left: item.left, left: item.left,
width: item.size, width: item.size,
height: 'auto', height: 'auto',
}} }}
/> />
))} ))}
</div> </div>
); );
} }
+1 -1
View File
@@ -3,7 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev -H 0.0.0.0",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint"