Initial import of 1407 block sources under blocks/
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
import { ArrowRight } from "lucide-react";
|
||||
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface Post {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
label: string;
|
||||
author: string;
|
||||
published: string;
|
||||
url: string;
|
||||
image: string;
|
||||
}
|
||||
|
||||
interface Blog23Props {
|
||||
tagline: string;
|
||||
heading: string;
|
||||
description: string;
|
||||
buttonText: string;
|
||||
buttonUrl: string;
|
||||
posts: Post[];
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Blog23 = ({
|
||||
tagline = "آخرین بهروزرسانیها",
|
||||
heading = "مطالب وبلاگ",
|
||||
description = "جدیدترین روندها، نکات و بهترین روشهای توسعه وب مدرن را دنبال کنید؛ از طراحی رابط کاربری تا سیستمهای طراحی، همراه با آموزشها و تجربههای متخصصان.",
|
||||
buttonText = "مشاهده همه مطالب",
|
||||
buttonUrl = "https://ShadcnBlocks",
|
||||
posts = [
|
||||
{
|
||||
id: "post-1",
|
||||
title: "شروع کار با کامپوننتهای ری یو آی",
|
||||
summary:
|
||||
"یاد بگیرید چگونه کامپوننتهای shadcn/ui را در پروژههای Next.js بهسرعت پیادهسازی و سفارشیسازی کنید و با بهترین روشهای ساخت رابطهای کاربری مدرن آشنا شوید.",
|
||||
label: "آموزش",
|
||||
author: "سارا احمدی",
|
||||
published: "۱۱ دی ۱۴۲",
|
||||
url: "https://ShadcnBlocks",
|
||||
image:
|
||||
"/block-media/shadcnblocks/block/placeholder-dark-1.svg",
|
||||
},
|
||||
{
|
||||
id: "post-2",
|
||||
title: "ساخت وباپلیکیشنهای دسترسپذیر",
|
||||
summary:
|
||||
"با کامپوننتهای دسترسپذیر shadcn/ui تجربههای وب فراگیر بسازید. نکات عملی برای برچسبهای ARIA، ناوبری با کیبورد و HTML معنایی را بیاموزید.",
|
||||
label: "دسترسپذیری",
|
||||
author: "محمد رضایی",
|
||||
published: "۱۱ دی ۱۴۲",
|
||||
url: "https://ShadcnBlocks",
|
||||
image:
|
||||
"/block-media/shadcnblocks/block/placeholder-dark-1.svg",
|
||||
},
|
||||
{
|
||||
id: "post-3",
|
||||
title: "سیستمهای طراحی مدرن با استایلدهی مدرن",
|
||||
summary:
|
||||
"ساخت سیستمهای طراحی مقیاسپذیر با Tailwind CSS و shadcn/ui را بررسی کنید. چگونه یکنواختی را حفظ کنید و در عین حال کتابخانهای انعطافپذیر و قابل نگهداری بسازید.",
|
||||
label: "سیستم طراحی",
|
||||
author: "اما حسینی",
|
||||
published: "۱۱ دی ۱۴۲",
|
||||
url: "https://ShadcnBlocks",
|
||||
image:
|
||||
"/block-media/shadcnblocks/block/placeholder-dark-1.svg",
|
||||
},
|
||||
],
|
||||
className,
|
||||
}: Blog23Props) => {
|
||||
return (
|
||||
<section dir="rtl" lang="fa" className={cn("py-32", className)}>
|
||||
<div className="container max-w-4xl">
|
||||
<div className="text-center">
|
||||
<Badge variant="secondary" className="mb-6">
|
||||
{tagline}
|
||||
</Badge>
|
||||
<h2 className="mb-3 text-3xl font-semibold text-pretty md:mb-4 md:text-2xll lg:mb-6">
|
||||
{heading}
|
||||
</h2>
|
||||
<p className="mb-12 text-muted-foreground md:text-base lg:text-lg">
|
||||
{description}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-12">
|
||||
{posts.map((post) => (
|
||||
<Card
|
||||
key={post.id}
|
||||
className="overflow-hidden border-0 bg-transparent shadow-none"
|
||||
>
|
||||
<div className="mb-6">
|
||||
<a
|
||||
href={post.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="block transition-opacity duration-200 hover:opacity-90"
|
||||
>
|
||||
<img
|
||||
src={post.image}
|
||||
alt={post.title}
|
||||
className="aspect-16/9 h-full w-full rounded-lg object-cover object-center"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div className="space-y-4 text-start">
|
||||
<div className="flex flex-wrap items-center gap-4 text-sm text-muted-foreground">
|
||||
<Badge variant="secondary">{post.label}</Badge>
|
||||
<span>{post.author}</span>
|
||||
<span>{post.published}</span>
|
||||
</div>
|
||||
<h3 className="text-xl leading-tight font-bold lg:text-3xl">
|
||||
<a
|
||||
href={post.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="hover:underline"
|
||||
>
|
||||
{post.title}
|
||||
</a>
|
||||
</h3>
|
||||
<p className="text-lg text-muted-foreground">{post.summary}</p>
|
||||
<a
|
||||
href={post.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center text-primary hover:underline"
|
||||
>
|
||||
ادامه مطلب
|
||||
<ArrowRight className="ms-2 size-4 rtl:rotate-180" />
|
||||
</a>
|
||||
</div>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="mt-16 text-center">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="lg"
|
||||
className="w-full sm:w-auto"
|
||||
asChild
|
||||
>
|
||||
<a href={buttonUrl} target="_blank" rel="noopener noreferrer">
|
||||
{buttonText}
|
||||
<ArrowRight className="ms-2 size-4 rtl:rotate-180" />
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export { Blog23 };
|
||||
Reference in New Issue
Block a user