Initial import of 1407 block sources under blocks/
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
import { ArrowDownRight, Star } from "lucide-react";
|
||||
|
||||
import { Avatar, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface Hero3Props {
|
||||
heading?: string;
|
||||
description?: string;
|
||||
buttons?: {
|
||||
primary?: {
|
||||
text: string;
|
||||
url: string;
|
||||
className?: string;
|
||||
};
|
||||
secondary?: {
|
||||
text: string;
|
||||
url: string;
|
||||
};
|
||||
};
|
||||
reviews?: {
|
||||
count: number;
|
||||
avatars: {
|
||||
src: string;
|
||||
alt: string;
|
||||
}[];
|
||||
rating?: number;
|
||||
};
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Hero3 = ({
|
||||
heading = "مجموعهای از بلاکهای آماده برای توسعه سریع رابط کاربری",
|
||||
description = "صدها بلاک و کامپوننت آماده مبتنی بر رابط کاربری، استایلدهی مدرن و ری یو آی که میتوانید بدون نیاز به طراحی از ابتدا، مستقیماً در پروژههای خود استفاده کنید.",
|
||||
buttons = {
|
||||
primary: {
|
||||
text: "ایجاد حساب کاربری",
|
||||
url: "https://www.ShadcnBlocks",
|
||||
},
|
||||
secondary: {
|
||||
text: "شروع رایگان",
|
||||
url: "https://www.ShadcnBlocks",
|
||||
},
|
||||
},
|
||||
reviews = {
|
||||
count: 200,
|
||||
rating: 5.0,
|
||||
avatars: [
|
||||
{
|
||||
src: "/block-media/shadcnblocks/block/avatar-1.webp",
|
||||
alt: "آواتار ۱",
|
||||
},
|
||||
{
|
||||
src: "/block-media/shadcnblocks/block/avatar-2.webp",
|
||||
alt: "آواتار ۲",
|
||||
},
|
||||
{
|
||||
src: "/block-media/shadcnblocks/block/avatar-3.webp",
|
||||
alt: "آواتار ۳",
|
||||
},
|
||||
{
|
||||
src: "/block-media/shadcnblocks/block/avatar-4.webp",
|
||||
alt: "آواتار ۴",
|
||||
},
|
||||
{
|
||||
src: "/block-media/shadcnblocks/block/avatar-5.webp",
|
||||
alt: "آواتار ۵",
|
||||
},
|
||||
],
|
||||
},
|
||||
className,
|
||||
}: Hero3Props) => {
|
||||
return (
|
||||
<section className={cn("py-32", className)}>
|
||||
<div className="container grid items-center gap-10 lg:grid-cols-2 lg:gap-20">
|
||||
<div className="mx-auto flex flex-col items-center text-center md:ml-auto lg:max-w-3xl lg:items-start lg:text-start">
|
||||
<h1 className="my-6 text-xl font-bold text-pretty lg:text-2xll xl:text-2xll">
|
||||
{heading}
|
||||
</h1>
|
||||
<p className="mb-8 max-w-xl text-muted-foreground lg:text-xl">
|
||||
{description}
|
||||
</p>
|
||||
<div className="mb-12 flex w-fit flex-col items-center gap-4 sm:flex-row">
|
||||
<span className="inline-flex items-center -space-x-4">
|
||||
{reviews.avatars.map((avatar, index) => (
|
||||
<Avatar key={index} className="size-12 border">
|
||||
<AvatarImage src={avatar.src} alt={avatar.alt} />
|
||||
</Avatar>
|
||||
))}
|
||||
</span>
|
||||
<div>
|
||||
<div className="flex items-center gap-1">
|
||||
{[...Array(5)].map((_, index) => (
|
||||
<Star
|
||||
key={index}
|
||||
className="size-5 fill-yellow-400 text-yellow-400"
|
||||
/>
|
||||
))}
|
||||
<span className="ms-1 font-semibold">
|
||||
{reviews.rating?.toFixed(1)}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-start font-medium text-muted-foreground">
|
||||
مورد اعتماد بیش از {reviews.count} کاربر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start">
|
||||
{buttons.primary && (
|
||||
<Button asChild className="w-full sm:w-auto">
|
||||
<a href={buttons.primary.url}>{buttons.primary.text}</a>
|
||||
</Button>
|
||||
)}
|
||||
{buttons.secondary && (
|
||||
<Button asChild variant="outline">
|
||||
<a href={buttons.secondary.url}>
|
||||
{buttons.secondary.text}
|
||||
<ArrowDownRight className="size-4 rtl:rotate-180" />
|
||||
</a>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex">
|
||||
<img
|
||||
src="/block-media/shadcnblocks/block/placeholder-1.svg"
|
||||
alt="تصویر نمونه قهرمان"
|
||||
className="max-h-[600px] w-full rounded-md object-cover lg:max-h-[800px]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export { Hero3 };
|
||||
Reference in New Issue
Block a user