This commit is contained in:
eric
2026-03-12 02:23:10 -05:00
parent f653dccd6d
commit 421f979e10
21 changed files with 709 additions and 264 deletions

View File

@@ -10,13 +10,6 @@ type ToolsProps = {
export default function Tools({ data }: ToolsProps) {
const categories = data.categories;
const { t } = useTranslation("tools");
const total = categories.reduce((s, c) => s + c.tools.length, 0);
const toolStats = [
{ value: `${total}+`, key: "tools" as const },
{ value: String(categories.length), key: "categories" as const },
{ value: "数字游民", key: "nomad" as const },
{ value: "佣金", key: "affiliate" as const },
];
return (
<section id="tools" className="py-20 sm:py-28 dark:bg-slate-950">
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
@@ -73,20 +66,6 @@ export default function Tools({ data }: ToolsProps) {
</div>
))}
</div>
<div className="mt-14 grid grid-cols-2 gap-4 sm:grid-cols-4">
{toolStats.map((s) => (
<div
key={s.key}
className="rounded-2xl border border-slate-100 bg-white p-5 text-center shadow-sm dark:border-slate-800 dark:bg-slate-900"
>
<div className="text-3xl font-extrabold text-sky-600 dark:text-sky-400">
{s.value}
</div>
<div className="mt-1 text-sm text-slate-500 dark:text-slate-400">{t(`stats.${s.key}`)}</div>
</div>
))}
</div>
</div>
</section>
);