Initial import of 1407 block sources under blocks/
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
type BlogBlocksCardProps = {
|
||||
category: string;
|
||||
title: string;
|
||||
description: string;
|
||||
date: string;
|
||||
authors: string[];
|
||||
};
|
||||
|
||||
export function BlogBlocksCard({ category, title, description, date, authors }: BlogBlocksCardProps) {
|
||||
return (
|
||||
<article
|
||||
data-slot="card"
|
||||
className="group relative row-span-5 grid grid-rows-subgrid gap-3 rounded-xl bg-card bg-linear-to-b from-card from-65% to-transparent p-6 text-card-foreground shadow-xl ring-1 shadow-black/6.5 ring-border"
|
||||
>
|
||||
<time className="text-sm text-muted-foreground">{date}</time>
|
||||
<h2 className="text-lg font-semibold text-foreground">{title}</h2>
|
||||
<p className="text-muted-foreground">{description}</p>
|
||||
<div className="grid grid-cols-[1fr_auto] items-end gap-2 pt-4">
|
||||
<div className="space-y-1">
|
||||
<span className="text-xs uppercase tracking-wide text-muted-foreground/80">{category}</span>
|
||||
<div className="text-sm text-muted-foreground">{authors.join(", ")}</div>
|
||||
</div>
|
||||
<div className="flex h-6 items-center text-sm font-medium text-primary transition-colors duration-200 group-hover:text-foreground">
|
||||
ادامه مطلب
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
type BlogBlocksCategoryTabsProps = {
|
||||
labels: string[];
|
||||
};
|
||||
|
||||
export function BlogBlocksCategoryTabs({ labels }: BlogBlocksCategoryTabsProps) {
|
||||
return (
|
||||
<div
|
||||
role="tablist"
|
||||
aria-label="دستهبندی وبلاگ"
|
||||
className="-ml-0.5 flex snap-x snap-mandatory overflow-x-auto py-3 max-md:px-6"
|
||||
>
|
||||
{labels.map((label, index) => (
|
||||
<button
|
||||
key={label}
|
||||
role="tab"
|
||||
aria-selected={index === 0}
|
||||
className="group snap-center px-1 text-muted-foreground disabled:pointer-events-none disabled:opacity-50"
|
||||
>
|
||||
<span
|
||||
className={
|
||||
index === 0
|
||||
? "flex w-fit items-center gap-2 rounded-md bg-card px-3 py-1.5 text-sm font-medium text-primary shadow-sm ring-1 shadow-black/6.5 ring-border transition-colors"
|
||||
: "flex w-fit items-center gap-2 rounded-md px-3 py-1.5 text-sm transition-colors group-hover:bg-foreground/5 hover:text-foreground"
|
||||
}
|
||||
>
|
||||
<span className="capitalize">{label}</span>
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user