172 lines
5.9 KiB
TypeScript
172 lines
5.9 KiB
TypeScript
"use client";
|
|
|
|
import { motion } from "framer-motion";
|
|
import { Forward } from "lucide-react";
|
|
import { useState } from "react";
|
|
|
|
import { Marquee } from "@/components/magicui/marquee";
|
|
import { Button } from "@/components/ui/button";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const IMAGES = [
|
|
{
|
|
id: "img11-a",
|
|
src: "/block-media/shadcnblocks/block/guri3/img11.jpeg",
|
|
imageAlt: "گزارش عملکرد",
|
|
},
|
|
{
|
|
id: "img1-a",
|
|
src: "/block-media/shadcnblocks/block/guri3/img1.jpeg",
|
|
imageAlt: "داشبورد تحلیل داده",
|
|
},
|
|
{
|
|
id: "img7-a",
|
|
src: "/block-media/shadcnblocks/block/guri3/img7.jpeg",
|
|
imageAlt: "نمودار شاخص کلیدی",
|
|
},
|
|
{
|
|
id: "img12-a",
|
|
src: "/block-media/shadcnblocks/block/guri3/img12.jpeg",
|
|
imageAlt: "گزارش عملکرد",
|
|
},
|
|
{
|
|
id: "img13-a",
|
|
src: "/block-media/shadcnblocks/block/guri3/img13.jpeg",
|
|
imageAlt: "داشبورد تحلیل داده",
|
|
},
|
|
{
|
|
id: "img3-a",
|
|
src: "/block-media/shadcnblocks/block/guri3/img3.jpeg",
|
|
imageAlt: "نمودار شاخص کلیدی",
|
|
},
|
|
{
|
|
id: "img11-b",
|
|
src: "/block-media/shadcnblocks/block/guri3/img11.jpeg",
|
|
imageAlt: "گزارش عملکرد",
|
|
},
|
|
{
|
|
id: "img1-b",
|
|
src: "/block-media/shadcnblocks/block/guri3/img1.jpeg",
|
|
imageAlt: "داشبورد تحلیل داده",
|
|
},
|
|
{
|
|
id: "img7-b",
|
|
src: "/block-media/shadcnblocks/block/guri3/img7.jpeg",
|
|
imageAlt: "نمودار شاخص کلیدی",
|
|
},
|
|
{
|
|
id: "img12-b",
|
|
src: "/block-media/shadcnblocks/block/guri3/img12.jpeg",
|
|
imageAlt: "گزارش عملکرد",
|
|
},
|
|
] as const;
|
|
|
|
const BRAND = {
|
|
url: "https://www.ShadcnBlocks",
|
|
src: "/block-media/shadcnblocks/block/logos/ShadcnBlockscom-icon.svg",
|
|
alt: "داشبورد تحلیل داده",
|
|
title: "آنالیتیکس",
|
|
} as const;
|
|
|
|
interface Feature285Props {
|
|
className?: string;
|
|
}
|
|
|
|
const Feature285 = ({ className }: Feature285Props) => {
|
|
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
|
|
|
return (
|
|
<section
|
|
dir="rtl"
|
|
lang="fa"
|
|
className={cn("h-full overflow-hidden py-32 lg:h-screen", className)}
|
|
>
|
|
<div className="container flex h-full w-full items-center justify-center">
|
|
<div className="grid h-full w-full max-w-7xl grid-cols-1 overflow-hidden rounded-4xl bg-muted lg:grid-cols-2">
|
|
<div className="relative flex flex-col justify-between p-15 text-start">
|
|
<a href={BRAND.url} className="flex items-center gap-2">
|
|
<img src={BRAND.src} className="max-h-8 w-8" alt={BRAND.alt} />
|
|
<span className="text-xl font-semibold tracking-tight">
|
|
{BRAND.title}
|
|
</span>
|
|
</a>
|
|
<div>
|
|
<h2 className="relative mt-12 font-sans text-xl font-semibold tracking-tighter text-balance md:text-2xll lg:mt-0 xl:text-2xll">
|
|
داده پراکنده را به تصمیم تبدیل کنید
|
|
</h2>
|
|
<p className="text-md mx-auto mt-2 mb-10 max-w-2xl text-pretty text-muted-foreground/50 md:text-lg">
|
|
گزارشهای بصری نشان میدهند کدام اقدام بیشترین اثر را روی درآمد و نگهداشت مشتری داشته است.
|
|
</p>
|
|
</div>
|
|
<Button className="h-12 w-fit gap-2 rounded-xl !px-5">
|
|
شروع کنید
|
|
<Forward className="size-4 rtl:rotate-180" />
|
|
</Button>
|
|
</div>
|
|
<div className="relative me-3 flex h-120 flex-row items-center justify-end overflow-hidden lg:h-full">
|
|
<Marquee pauseOnHover vertical className="[--duration:20s]">
|
|
{IMAGES.map((image, index) => (
|
|
<motion.img
|
|
onMouseEnter={() => setHoveredIndex(index)}
|
|
onMouseLeave={() => setHoveredIndex(null)}
|
|
transition={{
|
|
duration: 0.2,
|
|
ease: "easeOut",
|
|
delay: index * 0.1 + 0.5,
|
|
}}
|
|
animate={{
|
|
filter:
|
|
hoveredIndex !== null && hoveredIndex !== index
|
|
? "blur(10px)"
|
|
: "blur(0px)",
|
|
transition: {
|
|
duration: 0.3,
|
|
ease: "easeOut",
|
|
delay: 0,
|
|
},
|
|
}}
|
|
key={`marquee1-${image.id}`}
|
|
src={image.src}
|
|
alt={image.imageAlt}
|
|
className="w-full rounded-3xl object-cover lg:h-60"
|
|
/>
|
|
))}
|
|
</Marquee>
|
|
<Marquee reverse pauseOnHover vertical className="[--duration:20s]">
|
|
{IMAGES.map((image, index) => (
|
|
<motion.img
|
|
onMouseEnter={() => setHoveredIndex(index)}
|
|
onMouseLeave={() => setHoveredIndex(null)}
|
|
transition={{
|
|
duration: 0.2,
|
|
ease: "easeOut",
|
|
delay: index * 0.1 + 0.5,
|
|
}}
|
|
animate={{
|
|
filter:
|
|
hoveredIndex !== null && hoveredIndex !== index
|
|
? "blur(10px)"
|
|
: "blur(0px)",
|
|
transition: {
|
|
duration: 0.3,
|
|
ease: "easeOut",
|
|
delay: 0,
|
|
},
|
|
}}
|
|
key={`marquee2-${image.id}`}
|
|
src={image.src}
|
|
alt={image.imageAlt}
|
|
className="w-full rounded-3xl object-cover lg:h-60"
|
|
/>
|
|
))}
|
|
</Marquee>
|
|
<div className="pointer-events-none absolute inset-x-0 top-0 block h-1/4 bg-gradient-to-b from-muted lg:hidden" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
);
|
|
};
|
|
|
|
export { Feature285 };
|