Update index.html
Browse files- index.html +140 -100
index.html
CHANGED
|
@@ -46,6 +46,13 @@
|
|
| 46 |
.animate-gradient-x {
|
| 47 |
animation: gradient 3s ease infinite;
|
| 48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
</style>
|
| 50 |
|
| 51 |
<!-- Import Map to resolve modules -->
|
|
@@ -81,7 +88,11 @@
|
|
| 81 |
User,
|
| 82 |
Bell,
|
| 83 |
ArrowLeft,
|
| 84 |
-
Sparkles
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
} from 'lucide-react';
|
| 86 |
|
| 87 |
// --- CONSTANTS & DATA ---
|
|
@@ -141,6 +152,12 @@
|
|
| 141 |
colorTo: 'to-blue-600'
|
| 142 |
};
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
// --- COMPONENTS ---
|
| 145 |
|
| 146 |
// 1. Background Effects
|
|
@@ -181,54 +198,17 @@
|
|
| 181 |
backgroundSize: '50px 50px'
|
| 182 |
}}
|
| 183 |
></div>
|
| 184 |
-
|
| 185 |
-
{[...Array(15)].map((_, i) => (
|
| 186 |
-
<Particle key={i} index={i} />
|
| 187 |
-
))}
|
| 188 |
-
|
| 189 |
<motion.div
|
| 190 |
-
animate={{
|
| 191 |
-
|
| 192 |
-
opacity: [0.15, 0.35, 0.15],
|
| 193 |
-
rotate: [0, 20, 0]
|
| 194 |
-
}}
|
| 195 |
-
transition={{
|
| 196 |
-
duration: 12,
|
| 197 |
-
repeat: Infinity,
|
| 198 |
-
ease: "easeInOut"
|
| 199 |
-
}}
|
| 200 |
className="absolute -top-[10%] -right-[20%] w-[600px] h-[600px] bg-gradient-to-br from-violet-600/20 to-indigo-600/20 rounded-full blur-[120px]"
|
| 201 |
/>
|
| 202 |
-
|
| 203 |
<motion.div
|
| 204 |
-
animate={{
|
| 205 |
-
|
| 206 |
-
opacity: [0.1, 0.25, 0.1],
|
| 207 |
-
x: [0, 30, 0]
|
| 208 |
-
}}
|
| 209 |
-
transition={{
|
| 210 |
-
duration: 15,
|
| 211 |
-
repeat: Infinity,
|
| 212 |
-
ease: "easeInOut",
|
| 213 |
-
delay: 1
|
| 214 |
-
}}
|
| 215 |
className="absolute top-[40%] -left-[20%] w-[500px] h-[500px] bg-gradient-to-tr from-blue-600/15 to-cyan-500/15 rounded-full blur-[100px]"
|
| 216 |
/>
|
| 217 |
-
|
| 218 |
-
<motion.div
|
| 219 |
-
animate={{
|
| 220 |
-
scale: [1, 1.2, 1],
|
| 221 |
-
opacity: [0.1, 0.2, 0.1],
|
| 222 |
-
}}
|
| 223 |
-
transition={{
|
| 224 |
-
duration: 18,
|
| 225 |
-
repeat: Infinity,
|
| 226 |
-
ease: "easeInOut",
|
| 227 |
-
delay: 2
|
| 228 |
-
}}
|
| 229 |
-
className="absolute -bottom-20 -right-20 w-80 h-80 bg-emerald-500/5 rounded-full blur-[80px]"
|
| 230 |
-
/>
|
| 231 |
-
|
| 232 |
<div className="absolute inset-0 bg-gradient-to-b from-transparent via-[#0B0F19]/60 to-[#0B0F19] pointer-events-none"></div>
|
| 233 |
</div>
|
| 234 |
);
|
|
@@ -292,21 +272,19 @@
|
|
| 292 |
};
|
| 293 |
|
| 294 |
// 4. Feature Card
|
| 295 |
-
const FeatureCard = ({ item, index }) => {
|
| 296 |
return (
|
| 297 |
<motion.div
|
| 298 |
initial={{ opacity: 0, scale: 0.9, y: 30 }}
|
| 299 |
animate={{ opacity: 1, scale: 1, y: 0 }}
|
| 300 |
transition={{ delay: index * 0.1 + 0.2, duration: 0.5, type: "spring", stiffness: 100, damping: 20 }}
|
| 301 |
whileTap={{ scale: 0.96 }}
|
|
|
|
| 302 |
className="relative group cursor-pointer"
|
| 303 |
>
|
| 304 |
<div className={`absolute -inset-[1px] rounded-[24px] bg-gradient-to-b ${item.colorFrom} ${item.colorTo} opacity-0 group-hover:opacity-40 blur-md transition duration-500`}></div>
|
| 305 |
-
|
| 306 |
<div className="relative h-full flex flex-col justify-between bg-[#131722]/80 backdrop-blur-xl border border-white/5 p-5 rounded-[24px] shadow-2xl overflow-hidden hover:border-white/15 transition-all duration-300">
|
| 307 |
-
|
| 308 |
<div className="absolute inset-0 z-0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000 bg-gradient-to-r from-transparent via-white/5 to-transparent skew-x-12"></div>
|
| 309 |
-
|
| 310 |
<div className="flex justify-between items-start mb-5 relative z-10">
|
| 311 |
<div className={`relative p-3.5 rounded-2xl bg-gradient-to-br ${item.colorFrom} ${item.colorTo} shadow-lg ring-1 ring-white/20 group-hover:scale-105 transition-transform duration-300`}>
|
| 312 |
<motion.div
|
|
@@ -317,7 +295,6 @@
|
|
| 317 |
</motion.div>
|
| 318 |
<div className="absolute inset-0 rounded-2xl bg-white/30 blur opacity-40"></div>
|
| 319 |
</div>
|
| 320 |
-
|
| 321 |
{(item.isNew || item.isHot) && (
|
| 322 |
<motion.div
|
| 323 |
initial={{ scale: 0 }}
|
|
@@ -326,28 +303,18 @@
|
|
| 326 |
className="flex flex-col items-end gap-1"
|
| 327 |
>
|
| 328 |
{item.isNew && (
|
| 329 |
-
<span className="px-2.5 py-1 text-[9px] font-bold bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-full shadow-lg shadow-amber-500/20">
|
| 330 |
-
جدید
|
| 331 |
-
</span>
|
| 332 |
)}
|
| 333 |
{item.isHot && (
|
| 334 |
-
<span className="px-2.5 py-1 text-[9px] font-bold bg-gradient-to-r from-rose-500 to-pink-600 text-white rounded-full shadow-lg shadow-rose-500/20">
|
| 335 |
-
داغ
|
| 336 |
-
</span>
|
| 337 |
)}
|
| 338 |
</motion.div>
|
| 339 |
)}
|
| 340 |
</div>
|
| 341 |
-
|
| 342 |
<div className="relative z-10">
|
| 343 |
-
<h3 className="text-[17px] font-bold text-white mb-1.5 tracking-tight group-hover:text-transparent group-hover:bg-clip-text group-hover:bg-gradient-to-r group-hover:from-white group-hover:to-slate-300 transition-colors">
|
| 344 |
-
|
| 345 |
-
</h3>
|
| 346 |
-
<p className="text-[11px] text-slate-400 font-medium leading-relaxed opacity-80 group-hover:opacity-100 transition-opacity">
|
| 347 |
-
{item.subtitle}
|
| 348 |
-
</p>
|
| 349 |
</div>
|
| 350 |
-
|
| 351 |
<div className="absolute bottom-4 left-4 w-8 h-8 rounded-full bg-white/5 border border-white/5 flex items-center justify-center opacity-0 translate-y-4 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-300 shadow-lg">
|
| 352 |
<ArrowLeft size={14} className="text-white" />
|
| 353 |
</div>
|
|
@@ -367,76 +334,51 @@
|
|
| 367 |
className="relative w-full cursor-pointer group"
|
| 368 |
>
|
| 369 |
<div className="absolute -inset-[2px] bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 rounded-[26px] opacity-70 blur-sm group-hover:opacity-100 group-hover:blur-md transition duration-500 animate-pulse"></div>
|
| 370 |
-
|
| 371 |
<div className="relative overflow-hidden p-6 bg-[#0f1219] rounded-[24px] border border-white/10">
|
| 372 |
-
|
| 373 |
<div className="absolute inset-0 opacity-20">
|
| 374 |
<div className="absolute top-0 right-0 w-64 h-64 bg-indigo-600 rounded-full blur-[80px] animate-pulse"></div>
|
| 375 |
<div className="absolute bottom-0 left-0 w-64 h-64 bg-purple-600 rounded-full blur-[80px] animate-pulse" style={{ animationDelay: '1s' }}></div>
|
| 376 |
</div>
|
| 377 |
-
|
| 378 |
<div className="relative z-10 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
| 379 |
<div className="flex items-center gap-5">
|
| 380 |
<div className="relative">
|
| 381 |
<div className={`w-16 h-16 rounded-2xl bg-gradient-to-br ${item.colorFrom} ${item.colorTo} flex items-center justify-center shadow-lg shadow-indigo-500/30 ring-4 ring-indigo-500/10 group-hover:scale-105 transition-transform duration-300`}>
|
| 382 |
-
<motion.div
|
| 383 |
-
animate={{ rotate: [0, 10, -10, 0] }}
|
| 384 |
-
transition={{ duration: 5, repeat: Infinity, ease: "easeInOut" }}
|
| 385 |
-
>
|
| 386 |
<item.icon className="text-white w-8 h-8" strokeWidth={2.5} />
|
| 387 |
</motion.div>
|
| 388 |
</div>
|
| 389 |
-
<div className="absolute -top-2 -right-2 bg-white text-indigo-700 text-[10px] font-black px-2 py-0.5 rounded-full shadow-md border-2 border-[#0f1219]">
|
| 390 |
-
Ai
|
| 391 |
-
</div>
|
| 392 |
</div>
|
| 393 |
-
|
| 394 |
<div>
|
| 395 |
<div className="flex items-center gap-2 mb-1">
|
| 396 |
<h3 className="text-xl font-black text-white">{item.title}</h3>
|
| 397 |
-
<motion.div
|
| 398 |
-
animate={{ opacity: [0.5, 1, 0.5], scale: [1, 1.2, 1] }}
|
| 399 |
-
transition={{ duration: 2, repeat: Infinity }}
|
| 400 |
-
>
|
| 401 |
<Sparkles className="w-5 h-5 text-yellow-400 fill-yellow-400" />
|
| 402 |
</motion.div>
|
| 403 |
</div>
|
| 404 |
<p className="text-sm text-slate-300 font-medium opacity-90 max-w-[200px] leading-relaxed">{item.subtitle}</p>
|
| 405 |
</div>
|
| 406 |
</div>
|
| 407 |
-
|
| 408 |
<div className="self-end sm:self-center">
|
| 409 |
<div className="w-12 h-12 rounded-full bg-white/10 hover:bg-white text-white hover:text-indigo-900 flex items-center justify-center border border-white/10 transition-all duration-300 group-hover:rotate-[-45deg]">
|
| 410 |
<ArrowLeft className="w-5 h-5" strokeWidth={3} />
|
| 411 |
</div>
|
| 412 |
</div>
|
| 413 |
</div>
|
| 414 |
-
|
| 415 |
-
<div className="absolute top-1/2 right-10 -translate-y-1/2 opacity-5 pointer-events-none">
|
| 416 |
-
<Wand2 size={120} />
|
| 417 |
-
</div>
|
| 418 |
</div>
|
| 419 |
</motion.div>
|
| 420 |
);
|
| 421 |
};
|
| 422 |
|
| 423 |
// 6. Image Slider
|
| 424 |
-
const IMAGES = [
|
| 425 |
-
"https://app.puzzley.net/uploads/user/Jydo/%D8%AA%D8%BA%DB%8C%D8%B1%20%D8%B5%D8%AF%D8%A7%20%D8%A8%D8%A7%20%D9%87%D9%88%D8%B4%20%D9%85%D8%B5%D9%86%D9%88%D8%B9%DB%8C/tmpxposlxsv.png?_t=1769590682",
|
| 426 |
-
"https://app.puzzley.net/uploads/user/Jydo/%D8%AA%D8%BA%DB%8C%D8%B1%20%D8%B5%D8%AF%D8%A7%20%D8%A8%D8%A7%20%D9%87%D9%88%D8%B4%20%D9%85%D8%B5%D9%86%D9%88%D8%B9%DB%8C/tmpnv5v143z.png?_t=1769590682",
|
| 427 |
-
"https://app.puzzley.net/uploads/user/Jydo/%D8%AA%D8%BA%DB%8C%D8%B1%20%D8%B5%D8%AF%D8%A7%20%D8%A8%D8%A7%20%D9%87%D9%88%D8%B4%20%D9%85%D8%B5%D9%86%D9%88%D8%B9%DB%8C/tmpkqpm8k8l.png?_t=1769590756"
|
| 428 |
-
];
|
| 429 |
-
|
| 430 |
const ImageSlider = () => {
|
| 431 |
const [currentIndex, setCurrentIndex] = useState(0);
|
| 432 |
-
|
| 433 |
useEffect(() => {
|
| 434 |
const timer = setInterval(() => {
|
| 435 |
setCurrentIndex((prev) => (prev + 1) % IMAGES.length);
|
| 436 |
}, 4000);
|
| 437 |
return () => clearInterval(timer);
|
| 438 |
}, []);
|
| 439 |
-
|
| 440 |
return (
|
| 441 |
<div className="relative w-full aspect-[2/1] rounded-[24px] overflow-hidden shadow-2xl ring-1 ring-white/10 mb-2 group z-20">
|
| 442 |
<AnimatePresence mode='popLayout'>
|
|
@@ -451,31 +393,117 @@
|
|
| 451 |
className="absolute inset-0 w-full h-full object-cover"
|
| 452 |
/>
|
| 453 |
</AnimatePresence>
|
| 454 |
-
|
| 455 |
<div className="absolute inset-0 bg-gradient-to-t from-[#0B0F19]/80 via-transparent to-transparent opacity-80"></div>
|
| 456 |
-
|
| 457 |
<div className="absolute bottom-3 left-1/2 -translate-x-1/2 flex gap-1.5 z-10">
|
| 458 |
{IMAGES.map((_, index) => (
|
| 459 |
-
<div
|
| 460 |
-
key={index}
|
| 461 |
-
className={`h-1.5 rounded-full transition-all duration-300 ${
|
| 462 |
-
index === currentIndex ? 'w-6 bg-white' : 'w-1.5 bg-white/40'
|
| 463 |
-
}`}
|
| 464 |
-
/>
|
| 465 |
))}
|
| 466 |
</div>
|
| 467 |
</div>
|
| 468 |
);
|
| 469 |
};
|
| 470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 471 |
// --- MAIN APP COMPONENT ---
|
| 472 |
const App = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
return (
|
| 474 |
<div className="min-h-screen relative overflow-x-hidden pb-10">
|
| 475 |
<BackgroundEffects />
|
| 476 |
|
| 477 |
<main className="relative z-10 pt-2">
|
| 478 |
-
{/* Added Header Component Here */}
|
| 479 |
<Header />
|
| 480 |
|
| 481 |
<div className="px-6 mb-4">
|
|
@@ -487,7 +515,12 @@
|
|
| 487 |
<div className="px-6 mt-4">
|
| 488 |
<div className="grid grid-cols-2 gap-5">
|
| 489 |
{FEATURES.map((item, index) => (
|
| 490 |
-
<FeatureCard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 491 |
))}
|
| 492 |
</div>
|
| 493 |
|
|
@@ -502,6 +535,13 @@
|
|
| 502 |
</div>
|
| 503 |
</div>
|
| 504 |
</main>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 505 |
</div>
|
| 506 |
);
|
| 507 |
};
|
|
|
|
| 46 |
.animate-gradient-x {
|
| 47 |
animation: gradient 3s ease infinite;
|
| 48 |
}
|
| 49 |
+
|
| 50 |
+
.glass-panel {
|
| 51 |
+
background: rgba(19, 23, 34, 0.8);
|
| 52 |
+
backdrop-filter: blur(12px);
|
| 53 |
+
-webkit-backdrop-filter: blur(12px);
|
| 54 |
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
| 55 |
+
}
|
| 56 |
</style>
|
| 57 |
|
| 58 |
<!-- Import Map to resolve modules -->
|
|
|
|
| 88 |
User,
|
| 89 |
Bell,
|
| 90 |
ArrowLeft,
|
| 91 |
+
Sparkles,
|
| 92 |
+
Play,
|
| 93 |
+
Square,
|
| 94 |
+
Volume2,
|
| 95 |
+
X
|
| 96 |
} from 'lucide-react';
|
| 97 |
|
| 98 |
// --- CONSTANTS & DATA ---
|
|
|
|
| 152 |
colorTo: 'to-blue-600'
|
| 153 |
};
|
| 154 |
|
| 155 |
+
const IMAGES = [
|
| 156 |
+
"https://app.puzzley.net/uploads/user/Jydo/%D8%AA%D8%BA%DB%8C%D8%B1%20%D8%B5%D8%AF%D8%A7%20%D8%A8%D8%A7%20%D9%87%D9%88%D8%B4%20%D9%85%D8%B5%D9%86%D9%88%D8%B9%DB%8C/tmpxposlxsv.png?_t=1769590682",
|
| 157 |
+
"https://app.puzzley.net/uploads/user/Jydo/%D8%AA%D8%BA%DB%8C%D8%B1%20%D8%B5%D8%AF%D8%A7%20%D8%A8%D8%A7%20%D9%87%D9%88%D8%B4%20%D9%85%D8%B5%D9%86%D9%88%D8%B9%DB%8C/tmpnv5v143z.png?_t=1769590682",
|
| 158 |
+
"https://app.puzzley.net/uploads/user/Jydo/%D8%AA%D8%BA%DB%8C%D8%B1%20%D8%B5%D8%AF%D8%A7%20%D8%A8%D8%A7%20%D9%87%D9%88%D8%B4%20%D9%85%D8%B5%D9%86%D9%88%D8%B9%DB%8C/tmpkqpm8k8l.png?_t=1769590756"
|
| 159 |
+
];
|
| 160 |
+
|
| 161 |
// --- COMPONENTS ---
|
| 162 |
|
| 163 |
// 1. Background Effects
|
|
|
|
| 198 |
backgroundSize: '50px 50px'
|
| 199 |
}}
|
| 200 |
></div>
|
| 201 |
+
{[...Array(15)].map((_, i) => <Particle key={i} index={i} />)}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
<motion.div
|
| 203 |
+
animate={{ scale: [1, 1.15, 1], opacity: [0.15, 0.35, 0.15], rotate: [0, 20, 0] }}
|
| 204 |
+
transition={{ duration: 12, repeat: Infinity, ease: "easeInOut" }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
className="absolute -top-[10%] -right-[20%] w-[600px] h-[600px] bg-gradient-to-br from-violet-600/20 to-indigo-600/20 rounded-full blur-[120px]"
|
| 206 |
/>
|
|
|
|
| 207 |
<motion.div
|
| 208 |
+
animate={{ scale: [1, 1.25, 1], opacity: [0.1, 0.25, 0.1], x: [0, 30, 0] }}
|
| 209 |
+
transition={{ duration: 15, repeat: Infinity, ease: "easeInOut", delay: 1 }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
className="absolute top-[40%] -left-[20%] w-[500px] h-[500px] bg-gradient-to-tr from-blue-600/15 to-cyan-500/15 rounded-full blur-[100px]"
|
| 211 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
<div className="absolute inset-0 bg-gradient-to-b from-transparent via-[#0B0F19]/60 to-[#0B0F19] pointer-events-none"></div>
|
| 213 |
</div>
|
| 214 |
);
|
|
|
|
| 272 |
};
|
| 273 |
|
| 274 |
// 4. Feature Card
|
| 275 |
+
const FeatureCard = ({ item, index, onClick }) => {
|
| 276 |
return (
|
| 277 |
<motion.div
|
| 278 |
initial={{ opacity: 0, scale: 0.9, y: 30 }}
|
| 279 |
animate={{ opacity: 1, scale: 1, y: 0 }}
|
| 280 |
transition={{ delay: index * 0.1 + 0.2, duration: 0.5, type: "spring", stiffness: 100, damping: 20 }}
|
| 281 |
whileTap={{ scale: 0.96 }}
|
| 282 |
+
onClick={onClick}
|
| 283 |
className="relative group cursor-pointer"
|
| 284 |
>
|
| 285 |
<div className={`absolute -inset-[1px] rounded-[24px] bg-gradient-to-b ${item.colorFrom} ${item.colorTo} opacity-0 group-hover:opacity-40 blur-md transition duration-500`}></div>
|
|
|
|
| 286 |
<div className="relative h-full flex flex-col justify-between bg-[#131722]/80 backdrop-blur-xl border border-white/5 p-5 rounded-[24px] shadow-2xl overflow-hidden hover:border-white/15 transition-all duration-300">
|
|
|
|
| 287 |
<div className="absolute inset-0 z-0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000 bg-gradient-to-r from-transparent via-white/5 to-transparent skew-x-12"></div>
|
|
|
|
| 288 |
<div className="flex justify-between items-start mb-5 relative z-10">
|
| 289 |
<div className={`relative p-3.5 rounded-2xl bg-gradient-to-br ${item.colorFrom} ${item.colorTo} shadow-lg ring-1 ring-white/20 group-hover:scale-105 transition-transform duration-300`}>
|
| 290 |
<motion.div
|
|
|
|
| 295 |
</motion.div>
|
| 296 |
<div className="absolute inset-0 rounded-2xl bg-white/30 blur opacity-40"></div>
|
| 297 |
</div>
|
|
|
|
| 298 |
{(item.isNew || item.isHot) && (
|
| 299 |
<motion.div
|
| 300 |
initial={{ scale: 0 }}
|
|
|
|
| 303 |
className="flex flex-col items-end gap-1"
|
| 304 |
>
|
| 305 |
{item.isNew && (
|
| 306 |
+
<span className="px-2.5 py-1 text-[9px] font-bold bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-full shadow-lg shadow-amber-500/20">جدید</span>
|
|
|
|
|
|
|
| 307 |
)}
|
| 308 |
{item.isHot && (
|
| 309 |
+
<span className="px-2.5 py-1 text-[9px] font-bold bg-gradient-to-r from-rose-500 to-pink-600 text-white rounded-full shadow-lg shadow-rose-500/20">داغ</span>
|
|
|
|
|
|
|
| 310 |
)}
|
| 311 |
</motion.div>
|
| 312 |
)}
|
| 313 |
</div>
|
|
|
|
| 314 |
<div className="relative z-10">
|
| 315 |
+
<h3 className="text-[17px] font-bold text-white mb-1.5 tracking-tight group-hover:text-transparent group-hover:bg-clip-text group-hover:bg-gradient-to-r group-hover:from-white group-hover:to-slate-300 transition-colors">{item.title}</h3>
|
| 316 |
+
<p className="text-[11px] text-slate-400 font-medium leading-relaxed opacity-80 group-hover:opacity-100 transition-opacity">{item.subtitle}</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
</div>
|
|
|
|
| 318 |
<div className="absolute bottom-4 left-4 w-8 h-8 rounded-full bg-white/5 border border-white/5 flex items-center justify-center opacity-0 translate-y-4 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-300 shadow-lg">
|
| 319 |
<ArrowLeft size={14} className="text-white" />
|
| 320 |
</div>
|
|
|
|
| 334 |
className="relative w-full cursor-pointer group"
|
| 335 |
>
|
| 336 |
<div className="absolute -inset-[2px] bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 rounded-[26px] opacity-70 blur-sm group-hover:opacity-100 group-hover:blur-md transition duration-500 animate-pulse"></div>
|
|
|
|
| 337 |
<div className="relative overflow-hidden p-6 bg-[#0f1219] rounded-[24px] border border-white/10">
|
|
|
|
| 338 |
<div className="absolute inset-0 opacity-20">
|
| 339 |
<div className="absolute top-0 right-0 w-64 h-64 bg-indigo-600 rounded-full blur-[80px] animate-pulse"></div>
|
| 340 |
<div className="absolute bottom-0 left-0 w-64 h-64 bg-purple-600 rounded-full blur-[80px] animate-pulse" style={{ animationDelay: '1s' }}></div>
|
| 341 |
</div>
|
|
|
|
| 342 |
<div className="relative z-10 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
| 343 |
<div className="flex items-center gap-5">
|
| 344 |
<div className="relative">
|
| 345 |
<div className={`w-16 h-16 rounded-2xl bg-gradient-to-br ${item.colorFrom} ${item.colorTo} flex items-center justify-center shadow-lg shadow-indigo-500/30 ring-4 ring-indigo-500/10 group-hover:scale-105 transition-transform duration-300`}>
|
| 346 |
+
<motion.div animate={{ rotate: [0, 10, -10, 0] }} transition={{ duration: 5, repeat: Infinity, ease: "easeInOut" }}>
|
|
|
|
|
|
|
|
|
|
| 347 |
<item.icon className="text-white w-8 h-8" strokeWidth={2.5} />
|
| 348 |
</motion.div>
|
| 349 |
</div>
|
| 350 |
+
<div className="absolute -top-2 -right-2 bg-white text-indigo-700 text-[10px] font-black px-2 py-0.5 rounded-full shadow-md border-2 border-[#0f1219]">Ai</div>
|
|
|
|
|
|
|
| 351 |
</div>
|
|
|
|
| 352 |
<div>
|
| 353 |
<div className="flex items-center gap-2 mb-1">
|
| 354 |
<h3 className="text-xl font-black text-white">{item.title}</h3>
|
| 355 |
+
<motion.div animate={{ opacity: [0.5, 1, 0.5], scale: [1, 1.2, 1] }} transition={{ duration: 2, repeat: Infinity }}>
|
|
|
|
|
|
|
|
|
|
| 356 |
<Sparkles className="w-5 h-5 text-yellow-400 fill-yellow-400" />
|
| 357 |
</motion.div>
|
| 358 |
</div>
|
| 359 |
<p className="text-sm text-slate-300 font-medium opacity-90 max-w-[200px] leading-relaxed">{item.subtitle}</p>
|
| 360 |
</div>
|
| 361 |
</div>
|
|
|
|
| 362 |
<div className="self-end sm:self-center">
|
| 363 |
<div className="w-12 h-12 rounded-full bg-white/10 hover:bg-white text-white hover:text-indigo-900 flex items-center justify-center border border-white/10 transition-all duration-300 group-hover:rotate-[-45deg]">
|
| 364 |
<ArrowLeft className="w-5 h-5" strokeWidth={3} />
|
| 365 |
</div>
|
| 366 |
</div>
|
| 367 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
</div>
|
| 369 |
</motion.div>
|
| 370 |
);
|
| 371 |
};
|
| 372 |
|
| 373 |
// 6. Image Slider
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
const ImageSlider = () => {
|
| 375 |
const [currentIndex, setCurrentIndex] = useState(0);
|
|
|
|
| 376 |
useEffect(() => {
|
| 377 |
const timer = setInterval(() => {
|
| 378 |
setCurrentIndex((prev) => (prev + 1) % IMAGES.length);
|
| 379 |
}, 4000);
|
| 380 |
return () => clearInterval(timer);
|
| 381 |
}, []);
|
|
|
|
| 382 |
return (
|
| 383 |
<div className="relative w-full aspect-[2/1] rounded-[24px] overflow-hidden shadow-2xl ring-1 ring-white/10 mb-2 group z-20">
|
| 384 |
<AnimatePresence mode='popLayout'>
|
|
|
|
| 393 |
className="absolute inset-0 w-full h-full object-cover"
|
| 394 |
/>
|
| 395 |
</AnimatePresence>
|
|
|
|
| 396 |
<div className="absolute inset-0 bg-gradient-to-t from-[#0B0F19]/80 via-transparent to-transparent opacity-80"></div>
|
|
|
|
| 397 |
<div className="absolute bottom-3 left-1/2 -translate-x-1/2 flex gap-1.5 z-10">
|
| 398 |
{IMAGES.map((_, index) => (
|
| 399 |
+
<div key={index} className={`h-1.5 rounded-full transition-all duration-300 ${index === currentIndex ? 'w-6 bg-white' : 'w-1.5 bg-white/40'}`} />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
))}
|
| 401 |
</div>
|
| 402 |
</div>
|
| 403 |
);
|
| 404 |
};
|
| 405 |
|
| 406 |
+
// 7. TTS Overlay (Text to Speech Feature)
|
| 407 |
+
const TTSOverlay = ({ onClose }) => {
|
| 408 |
+
const [text, setText] = useState('');
|
| 409 |
+
const [speaking, setSpeaking] = useState(false);
|
| 410 |
+
|
| 411 |
+
const speak = () => {
|
| 412 |
+
if (!text) return;
|
| 413 |
+
window.speechSynthesis.cancel();
|
| 414 |
+
// Create utterance
|
| 415 |
+
const u = new SpeechSynthesisUtterance(text);
|
| 416 |
+
// Attempt to use a Persian voice if available, otherwise default
|
| 417 |
+
// iOS/Android usually select based on lang code
|
| 418 |
+
u.lang = 'fa-IR';
|
| 419 |
+
u.rate = 0.9;
|
| 420 |
+
|
| 421 |
+
u.onstart = () => setSpeaking(true);
|
| 422 |
+
u.onend = () => setSpeaking(false);
|
| 423 |
+
u.onerror = () => setSpeaking(false);
|
| 424 |
+
|
| 425 |
+
window.speechSynthesis.speak(u);
|
| 426 |
+
};
|
| 427 |
+
|
| 428 |
+
const stop = () => {
|
| 429 |
+
window.speechSynthesis.cancel();
|
| 430 |
+
setSpeaking(false);
|
| 431 |
+
};
|
| 432 |
+
|
| 433 |
+
return (
|
| 434 |
+
<motion.div
|
| 435 |
+
initial={{ opacity: 0, y: "100%" }}
|
| 436 |
+
animate={{ opacity: 1, y: 0 }}
|
| 437 |
+
exit={{ opacity: 0, y: "100%" }}
|
| 438 |
+
transition={{ type: "spring", damping: 25, stiffness: 200 }}
|
| 439 |
+
className="fixed inset-0 z-50 bg-[#0f172a] flex flex-col"
|
| 440 |
+
>
|
| 441 |
+
<BackgroundEffects />
|
| 442 |
+
|
| 443 |
+
{/* Header */}
|
| 444 |
+
<div className="relative z-10 px-6 py-4 flex items-center justify-between glass-panel border-b-0">
|
| 445 |
+
<button onClick={onClose} className="w-10 h-10 rounded-full bg-white/10 flex items-center justify-center active:scale-95 transition-transform">
|
| 446 |
+
<ArrowLeft className="text-white" size={20} />
|
| 447 |
+
</button>
|
| 448 |
+
<h2 className="text-lg font-bold text-white">تبدیل متن به صدا</h2>
|
| 449 |
+
<div className="w-10"></div>
|
| 450 |
+
</div>
|
| 451 |
+
|
| 452 |
+
{/* Content */}
|
| 453 |
+
<div className="relative z-10 flex-1 p-6 flex flex-col gap-6">
|
| 454 |
+
<div className="flex-1 glass-panel rounded-3xl p-1 overflow-hidden shadow-2xl">
|
| 455 |
+
<textarea
|
| 456 |
+
className="w-full h-full bg-transparent p-5 text-right text-lg text-white placeholder-slate-400 focus:outline-none resize-none leading-loose"
|
| 457 |
+
placeholder="متن خود را اینجا بنویسید... (مثال: سلام، به آوا هوش خوش آمدید)"
|
| 458 |
+
value={text}
|
| 459 |
+
onChange={e => setText(e.target.value)}
|
| 460 |
+
/>
|
| 461 |
+
</div>
|
| 462 |
+
|
| 463 |
+
{/* Controls */}
|
| 464 |
+
<div className="flex flex-col gap-4 mb-4">
|
| 465 |
+
<motion.button
|
| 466 |
+
whileTap={{ scale: 0.98 }}
|
| 467 |
+
onClick={speaking ? stop : speak}
|
| 468 |
+
className={`w-full py-5 rounded-2xl font-bold text-lg flex items-center justify-center gap-3 shadow-xl transition-all relative overflow-hidden ${speaking ? 'bg-rose-500' : 'bg-gradient-to-r from-blue-600 to-indigo-600'}`}
|
| 469 |
+
>
|
| 470 |
+
{speaking ? (
|
| 471 |
+
<>
|
| 472 |
+
<Square fill="currentColor" size={20} />
|
| 473 |
+
<span>توقف پخش</span>
|
| 474 |
+
<span className="absolute right-4 w-2 h-2 bg-white rounded-full animate-ping"></span>
|
| 475 |
+
</>
|
| 476 |
+
) : (
|
| 477 |
+
<>
|
| 478 |
+
<Play fill="currentColor" size={24} />
|
| 479 |
+
<span>پخش صدا</span>
|
| 480 |
+
</>
|
| 481 |
+
)}
|
| 482 |
+
</motion.button>
|
| 483 |
+
</div>
|
| 484 |
+
</div>
|
| 485 |
+
</motion.div>
|
| 486 |
+
);
|
| 487 |
+
};
|
| 488 |
+
|
| 489 |
// --- MAIN APP COMPONENT ---
|
| 490 |
const App = () => {
|
| 491 |
+
const [activeFeature, setActiveFeature] = useState(null);
|
| 492 |
+
|
| 493 |
+
const handleFeatureClick = (id) => {
|
| 494 |
+
if (id === 'tts') {
|
| 495 |
+
setActiveFeature('tts');
|
| 496 |
+
} else {
|
| 497 |
+
// For other features just show a simple alert or log for now
|
| 498 |
+
console.log(`Feature ${id} clicked`);
|
| 499 |
+
}
|
| 500 |
+
};
|
| 501 |
+
|
| 502 |
return (
|
| 503 |
<div className="min-h-screen relative overflow-x-hidden pb-10">
|
| 504 |
<BackgroundEffects />
|
| 505 |
|
| 506 |
<main className="relative z-10 pt-2">
|
|
|
|
| 507 |
<Header />
|
| 508 |
|
| 509 |
<div className="px-6 mb-4">
|
|
|
|
| 515 |
<div className="px-6 mt-4">
|
| 516 |
<div className="grid grid-cols-2 gap-5">
|
| 517 |
{FEATURES.map((item, index) => (
|
| 518 |
+
<FeatureCard
|
| 519 |
+
key={item.id}
|
| 520 |
+
item={item}
|
| 521 |
+
index={index}
|
| 522 |
+
onClick={() => handleFeatureClick(item.id)}
|
| 523 |
+
/>
|
| 524 |
))}
|
| 525 |
</div>
|
| 526 |
|
|
|
|
| 535 |
</div>
|
| 536 |
</div>
|
| 537 |
</main>
|
| 538 |
+
|
| 539 |
+
{/* Overlays */}
|
| 540 |
+
<AnimatePresence>
|
| 541 |
+
{activeFeature === 'tts' && (
|
| 542 |
+
<TTSOverlay key="tts" onClose={() => setActiveFeature(null)} />
|
| 543 |
+
)}
|
| 544 |
+
</AnimatePresence>
|
| 545 |
</div>
|
| 546 |
);
|
| 547 |
};
|