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 (
<AnimationSourcesContent
sources={sources}
labels={{
title: t("title"),
description: t("description"),
empty: t("empty"),
itemCount: t("itemCount", { count: sources.length }),
}}
emptyLabel={t("empty")}
/>
);
}
+4 -23
View File
@@ -5,34 +5,15 @@ import type { AnimationSource } from "@/data/animation-sources";
type AnimationSourcesContentProps = {
sources: AnimationSource[];
labels: {
title: string;
description: string;
empty: string;
itemCount: string;
};
emptyLabel: string;
};
export function AnimationSourcesContent({
sources,
labels,
emptyLabel,
}: AnimationSourcesContentProps) {
return (
<section className="space-y-5">
<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>
<section>
{sources.length > 0 ? (
<div className="space-y-3">
{sources.map((source) => (
@@ -55,7 +36,7 @@ export function AnimationSourcesContent({
) : (
<Card className="rounded-sm border-border p-6 text-center">
<Typography variant="p" className="text-muted-foreground">
{labels.empty}
{emptyLabel}
</Typography>
</Card>
)}
-1
View File
@@ -89,7 +89,6 @@
"title": "Animation Sources",
"description": "Production notes, prompts, and reusable code from animations I create for web and mobile products.",
"empty": "No animation sources have been added yet.",
"itemCount": "{count} sources",
"back": "Back to animation sources",
"toc": "Table of Contents",
"closeToc": "Close table of contents",
-1
View File
@@ -89,7 +89,6 @@
"title": "Animasyon Kaynakları",
"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.",
"itemCount": "{count} kaynak",
"back": "Animasyon kaynaklarına dön",
"toc": "İçindekiler",
"closeToc": "İçindekileri kapat",