Files
ai-directory-platform/src/components/footer.tsx
T
CoolChange.AIandClaude Fable 5 845503ad2f feat: 用户收藏、定价筛选、分类落地页、ISR 与 Newsletter/Docker 完善
- 收藏功能:favorite server actions + FavoritesProvider/FavoriteButton(乐观更新、未登录引导登录),列表卡片/详情页收藏按钮,仪表盘"我的收藏"
- 前台定价筛选(免费/免费增值/付费)与卡片定价徽标;首页"精选"改为查询 featured=true,不足时按最新补齐
- /category/[slug] 从 redirect 壳子改为真实落地页:分类双语描述 + 工具网格 + 完整 metadata + JSON-LD
- ISR:首页/工具详情/分类页 revalidate 3600 + generateStaticParams,[locale] layout 补 generateStaticParams;verify-email 与 reset-password 的 useSearchParams 包 Suspense
- 新增共享 ToolLogo 组件(next/image 优化 + data URL 降级 + 首字母占位),核心页面裸 img 全部替换;next.config 补 remotePatterns(R2 域名/Google favicon/https 通配)
- getCategoriesWithCount 只统计 published 工具;featured-tools 文案迁移至 next-intl
- Newsletter:footer 订阅表单 + 落库 + 可选同步 Resend Audience + 退订路由
- Docker:多阶段 Dockerfile(standalone)+ docker-compose(含 Postgres)+ 构建期数据库不可用的容错回退
- i18n:新增 pnpm i18n:check 一致性检查并补齐双语缺失键

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 20:35:17 -07:00

104 lines
3.2 KiB
TypeScript

"use client";
import React from "react";
import { Logo } from "./Logo";
import { useTranslations } from 'next-intl';
import { LocaleLink } from './locale-link';
import { NewsletterForm } from '@/features/marketing/components/newsletter-form';
export const Footer = () => {
const t = useTranslations();
const links = [
{
name: t('navigation.main.blog'),
href: "/blog",
},
{
name: t('navigation.main.contact'),
href: "/contact",
},
];
const legal = [
{
name: t('navigation.footer.legal.terms'),
href: "/terms",
},
{
name: t('navigation.footer.legal.privacy'),
href: "/privacy",
},
{
name: t('navigation.footer.legal.cookies'),
href: "/cookies",
},
];
const socials = [
{
name: t('footer.social.twitter'),
href: "https://x.com/ToolsoAI",
external: true,
},
{
name: t('footer.social.github'),
href: "https://github.com/coolchange-ai/toolso-ai-open",
external: true,
},
];
return (
<div className="relative">
<div className="border-t border-border px-8 pt-20 pb-32 relative bg-background">
<div className="max-w-7xl mx-auto">
{/* Footer Links Section */}
<div className="text-sm text-muted-foreground flex sm:flex-row flex-col justify-between items-start">
<div>
<div className="mr-4 md:flex mb-4">
<Logo />
</div>
<div>{t('common.brand.copyright')}</div>
<div className="mt-2">{t('common.brand.allRightsReserved')}</div>
<NewsletterForm />
</div>
<div className="grid grid-cols-3 gap-10 items-start mt-10 md:mt-0">
<div className="flex justify-center space-y-4 flex-col mt-4">
{links.map((link) => (
<LocaleLink
key={link.name}
className="transition-colors hover:text-foreground text-muted-foreground text-xs sm:text-sm"
href={link.href}
>
{link.name}
</LocaleLink>
))}
</div>
<div className="flex justify-center space-y-4 flex-col mt-4">
{legal.map((link) => (
<LocaleLink
key={link.name}
className="transition-colors hover:text-foreground text-muted-foreground text-xs sm:text-sm"
href={link.href}
>
{link.name}
</LocaleLink>
))}
</div>
<div className="flex justify-center space-y-4 flex-col mt-4">
{socials.map((link) => (
<a
key={link.name}
className="transition-colors hover:text-foreground text-muted-foreground text-xs sm:text-sm"
href={link.href}
target="_blank"
rel="noopener noreferrer"
>
{link.name}
</a>
))}
</div>
</div>
</div>
</div>
</div>
</div>
);
};