Initial import of 1407 block sources under blocks/
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { useState } from "react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface Feature234Props {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Feature234 = ({ className }: Feature234Props) => {
|
||||
return (
|
||||
<section dir="rtl" lang="fa" className={cn("bg-background py-32", className)}>
|
||||
<div className="container flex flex-col items-center">
|
||||
<h1 className="font-inter mx-auto max-w-4xl text-center text-[70px] leading-[65px] font-semibold tracking-tighter text-balance lg:text-[85px] lg:leading-[86px]">
|
||||
عملیات سازمان را یکپارچه کنید
|
||||
</h1>
|
||||
<CardsContainer />
|
||||
<p className="font-inter mx-auto max-w-xl text-center text-lg font-medium text-pretty text-black">
|
||||
گزارشهای یکپارچه نشان میدهد کدام بخش بیشترین تأثیر را روی سودآوری دارد.
|
||||
</p>
|
||||
<div className="mt-10 flex items-center gap-2">
|
||||
<Button
|
||||
asChild
|
||||
variant="default"
|
||||
className="block h-fit w-fit rounded-full px-6 py-2 text-sm leading-loose"
|
||||
>
|
||||
<a href="#">از خرید تا فروش در یک سیستم</a>
|
||||
</Button>
|
||||
<Button
|
||||
asChild
|
||||
variant="secondary"
|
||||
className="block h-fit w-fit rounded-full px-6 py-2 text-sm leading-loose"
|
||||
>
|
||||
<a href="#">یکپارچگی</a>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export { Feature234 };
|
||||
|
||||
interface CardItem {
|
||||
id: string;
|
||||
imageAlt: string;
|
||||
rotate: number;
|
||||
isDark: boolean;
|
||||
image: string;
|
||||
}
|
||||
|
||||
const CARDS: CardItem[] = [
|
||||
{
|
||||
id: "card-1",
|
||||
imageAlt: "گزارش مالی یکپارچه",
|
||||
rotate: -10.87,
|
||||
isDark: false,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-1.svg",
|
||||
},
|
||||
{
|
||||
id: "card-2",
|
||||
imageAlt: "داشبورد ERP",
|
||||
rotate: -7.95,
|
||||
isDark: true,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-black-1.svg",
|
||||
},
|
||||
{
|
||||
id: "card-3",
|
||||
imageAlt: "مدیریت عملیات",
|
||||
rotate: -4.5,
|
||||
isDark: false,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-3.svg",
|
||||
},
|
||||
{
|
||||
id: "card-4",
|
||||
imageAlt: "گزارش مالی یکپارچه",
|
||||
rotate: 0,
|
||||
isDark: false,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-4.svg",
|
||||
},
|
||||
{
|
||||
id: "card-5",
|
||||
imageAlt: "داشبورد ERP",
|
||||
rotate: 4.5,
|
||||
isDark: false,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-5.svg",
|
||||
},
|
||||
{
|
||||
id: "card-6",
|
||||
imageAlt: "مدیریت عملیات",
|
||||
rotate: 7.95,
|
||||
isDark: false,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-6.svg",
|
||||
},
|
||||
{
|
||||
id: "card-7",
|
||||
imageAlt: "گزارش مالی یکپارچه",
|
||||
rotate: 10.87,
|
||||
isDark: true,
|
||||
image: "/block-media/shadcnblocks/block/placeholder-black-1.svg",
|
||||
},
|
||||
];
|
||||
|
||||
const CardsContainer = () => {
|
||||
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
||||
|
||||
return (
|
||||
<div className="my-16 ms-[50px] flex items-center justify-center lg:ms-0">
|
||||
{CARDS.map((card, index) => {
|
||||
const yOffset = Math.pow(Math.abs(index - 3), 1.2) * 12;
|
||||
const isHovered = hoveredIndex === index;
|
||||
const visibilityClasses =
|
||||
(index === 0 || index === 1 || index === 5 || index === 6
|
||||
? " hidden sm:hidden "
|
||||
: "") +
|
||||
(index === 0 || index === 6 ? "md:hidden " : "md:block ") +
|
||||
"lg:block";
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className={visibilityClasses}
|
||||
key={card.id}
|
||||
onMouseEnter={() => setHoveredIndex(index)}
|
||||
onMouseLeave={() => setHoveredIndex(null)}
|
||||
initial={{ y: yOffset }}
|
||||
animate={{
|
||||
y: isHovered ? yOffset - 20 : yOffset,
|
||||
zIndex: isHovered ? 10 : 0,
|
||||
}}
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"relative h-[176px] w-[177px] overflow-hidden rounded-3xl border",
|
||||
card.isDark
|
||||
? "mb-14 border-[#8b8b8b] bg-black shadow-2xl"
|
||||
: "border-[#cecece] bg-[#f5f5f5] shadow-lg",
|
||||
)}
|
||||
style={{
|
||||
transform: `rotate(${card.rotate}deg)`,
|
||||
marginInlineStart: index === 0 ? "0px" : "-50px",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={card.image}
|
||||
alt={card.imageAlt}
|
||||
className="size-full object-cover object-center"
|
||||
/>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user