feat: i18n 翻译覆盖 + DB 动态数据 + 模型选择器 API

This commit is contained in:
yuzhiran-dev
2026-05-22 16:55:18 +08:00
parent 23edb74bce
commit 1b4c19daa6
16 changed files with 763 additions and 1036 deletions
+16 -14
View File
@@ -1,35 +1,37 @@
import Link from 'next/link';
import { useT } from '@/i18n';
export function Footer() {
const t = useT();
return (
<footer className="border-t border-border bg-muted/30">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-16">
<div className="grid grid-cols-2 md:grid-cols-4 gap-8">
<div className="col-span-2 md:col-span-1">
<h3 className="text-lg font-bold bg-gradient-to-r from-brand-600 to-brand-400 bg-clip-text text-transparent mb-4"> AI</h3>
<p className="text-sm text-muted-foreground"> AI</p>
<p className="text-sm text-muted-foreground">{t.footer.tagline}</p>
</div>
<div>
<h4 className="text-sm font-semibold mb-3"></h4>
<h4 className="text-sm font-semibold mb-3">{t.footer.explore}</h4>
<ul className="space-y-2.5">
<li><Link href="/courses" className="text-sm text-muted-foreground hover:text-foreground transition-colors"></Link></li>
<li><Link href="/sandbox" className="text-sm text-muted-foreground hover:text-foreground transition-colors">AI </Link></li>
<li><Link href="/prompts" className="text-sm text-muted-foreground hover:text-foreground transition-colors"></Link></li>
<li><Link href="/models" className="text-sm text-muted-foreground hover:text-foreground transition-colors"></Link></li>
<li><Link href="/tools" className="text-sm text-muted-foreground hover:text-foreground transition-colors">AI </Link></li>
<li><Link href="/courses" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.nav.courses}</Link></li>
<li><Link href="/sandbox" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.nav.sandbox}</Link></li>
<li><Link href="/prompts" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.nav.prompts}</Link></li>
<li><Link href="/models" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.footer.models}</Link></li>
<li><Link href="/tools" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.footer.aiTools}</Link></li>
</ul>
</div>
<div>
<h4 className="text-sm font-semibold mb-3"></h4>
<h4 className="text-sm font-semibold mb-3">{t.footer.about}</h4>
<ul className="space-y-2.5">
<li><Link href="/about" className="text-sm text-muted-foreground hover:text-foreground transition-colors"></Link></li>
<li><Link href="/privacy" className="text-sm text-muted-foreground hover:text-foreground transition-colors"></Link></li>
<li><Link href="/terms" className="text-sm text-muted-foreground hover:text-foreground transition-colors"></Link></li>
<li><Link href="/ai-agreement" className="text-sm text-muted-foreground hover:text-foreground transition-colors">AI </Link></li>
<li><Link href="/about" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.footer.aboutUs}</Link></li>
<li><Link href="/privacy" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.footer.privacy}</Link></li>
<li><Link href="/terms" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.footer.terms}</Link></li>
<li><Link href="/ai-agreement" className="text-sm text-muted-foreground hover:text-foreground transition-colors">{t.footer.aiAgreement}</Link></li>
</ul>
</div>
<div>
<h4 className="text-sm font-semibold mb-3"></h4>
<h4 className="text-sm font-semibold mb-3">{t.footer.contact}</h4>
<ul className="space-y-2.5">
<li className="text-sm text-muted-foreground">contact@yuzhiran.com</li>
<li className="text-sm text-muted-foreground"></li>
@@ -38,7 +40,7 @@ export function Footer() {
</div>
<div className="mt-10 pt-8 border-t border-border">
<div className="flex flex-col md:flex-row items-center justify-between gap-2 text-xs text-muted-foreground">
<p>&copy; {new Date().getFullYear()} </p>
<p>{t.footer.copyright.replace('{year}', String(new Date().getFullYear()))}</p>
<p>
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" className="hover:text-foreground transition-colors">
ICP ICP备XXXXXXXX号