refactor(animation-sources): show cards without page intro

This commit is contained in:
Poyraz
2026-08-29 19:15:10 +03:00
parent 095a7301e5
commit 6cbfd24bd6
4 changed files with 5 additions and 31 deletions
+1 -6
View File
@@ -73,12 +73,7 @@ export default async function AnimationSourcesPage({
return ( return (
<AnimationSourcesContent <AnimationSourcesContent
sources={sources} sources={sources}
labels={{ emptyLabel={t("empty")}
title: t("title"),
description: t("description"),
empty: t("empty"),
itemCount: t("itemCount", { count: sources.length }),
}}
/> />
); );
} }
+4 -23
View File
@@ -5,34 +5,15 @@ import type { AnimationSource } from "@/data/animation-sources";
type AnimationSourcesContentProps = { type AnimationSourcesContentProps = {
sources: AnimationSource[]; sources: AnimationSource[];
labels: { emptyLabel: string;
title: string;
description: string;
empty: string;
itemCount: string;
};
}; };
export function AnimationSourcesContent({ export function AnimationSourcesContent({
sources, sources,
labels, emptyLabel,
}: AnimationSourcesContentProps) { }: AnimationSourcesContentProps) {
return ( return (
<section className="space-y-5"> <section>
<header className="border-b border-border pb-4">
<div className="flex flex-wrap items-end justify-between gap-3">
<div className="max-w-2xl">
<Typography variant="h2">{labels.title}</Typography>
<Typography variant="p" className="mt-1 text-sm text-muted-foreground">
{labels.description}
</Typography>
</div>
<Typography variant="small" className="text-muted-foreground">
{labels.itemCount}
</Typography>
</div>
</header>
{sources.length > 0 ? ( {sources.length > 0 ? (
<div className="space-y-3"> <div className="space-y-3">
{sources.map((source) => ( {sources.map((source) => (
@@ -55,7 +36,7 @@ export function AnimationSourcesContent({
) : ( ) : (
<Card className="rounded-sm border-border p-6 text-center"> <Card className="rounded-sm border-border p-6 text-center">
<Typography variant="p" className="text-muted-foreground"> <Typography variant="p" className="text-muted-foreground">
{labels.empty} {emptyLabel}
</Typography> </Typography>
</Card> </Card>
)} )}
-1
View File
@@ -89,7 +89,6 @@
"title": "Animation Sources", "title": "Animation Sources",
"description": "Production notes, prompts, and reusable code from animations I create for web and mobile products.", "description": "Production notes, prompts, and reusable code from animations I create for web and mobile products.",
"empty": "No animation sources have been added yet.", "empty": "No animation sources have been added yet.",
"itemCount": "{count} sources",
"back": "Back to animation sources", "back": "Back to animation sources",
"toc": "Table of Contents", "toc": "Table of Contents",
"closeToc": "Close table of contents", "closeToc": "Close table of contents",
-1
View File
@@ -89,7 +89,6 @@
"title": "Animasyon Kaynakları", "title": "Animasyon Kaynakları",
"description": "Web ve mobil ürünler için hazırladığım animasyonların üretim süreçleri, promptları ve uygulanabilir kodları.", "description": "Web ve mobil ürünler için hazırladığım animasyonların üretim süreçleri, promptları ve uygulanabilir kodları.",
"empty": "Henüz animasyon kaynağı eklenmedi.", "empty": "Henüz animasyon kaynağı eklenmedi.",
"itemCount": "{count} kaynak",
"back": "Animasyon kaynaklarına dön", "back": "Animasyon kaynaklarına dön",
"toc": "İçindekiler", "toc": "İçindekiler",
"closeToc": "İçindekileri kapat", "closeToc": "İçindekileri kapat",