feat: dist-site 多主题模板 + 中英双语 i18n

- 新增 4 套主题模板:starter/default/dark/minimal
  - Starter: 毛玻璃 + GradientText + SpotlightCard (原有风格)
  - Default: Aurora 极光背景 + SplitText + TiltedCard
  - Dark: Particles 粒子 + DecryptedText 赛博朋克风格
  - Minimal: 极简优雅 + FadeContent 淡入动画
- 新增 i18n 中英双语支持 (i18next + browser-languagedetector)
- 新增 ThemeProvider 运行时主题切换 (根据 theme_template 字段)
- 新增 11 个 react-bits 动画组件
- 所有页面文案国际化 (Login/Register/Dashboard/Tokens/Pricing/Packages)
- 新增 README.md + README.zh.md 含主题切换指南

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
abingyydsandClaude Sonnet 4.6 committed 2026-03-21 09:04:25 +09:00
1 parent cc9a8bcc0e
commit 01405ca8cf
68 files changed
+4429 -433

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import en from './locales/en.json';
import zh from './locales/zh.json';
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
load: 'languageOnly',
resources: { en, zh },
fallbackLng: 'en',
interpolation: { escapeValue: false },
detection: {
order: ['navigator', 'htmlTag', 'querystring'],
caches: ['localStorage'],
},
});
export default i18n;
+159
View File
@@ -0,0 +1,159 @@
{
"translation": {
"nav.home": "Home",
"nav.pricing": "Pricing",
"nav.packages": "Packages",
"nav.dashboard": "Dashboard",
"nav.apiKeys": "API Keys",
"nav.login": "Login",
"nav.signUp": "Sign Up",
"nav.logout": "Logout",
"nav.contact": "Contact",
"home.heroSubtitle": "Access the world's most powerful AI models through a single API endpoint. Simple, affordable, reliable.",
"home.getStarted": "Get Started Free",
"home.viewPricing": "View Pricing",
"home.goToDashboard": "Go to Dashboard",
"home.aiModels": "AI Models",
"home.uptime": "Uptime",
"home.latency": "Latency",
"home.whyChooseUs": "Why Choose Us",
"home.whyChooseUsDesc": "Everything you need to build AI-powered applications",
"home.lightningFast": "Lightning Fast",
"home.lightningFastDesc": "Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability.",
"home.securePrivate": "Secure & Private",
"home.securePrivateDesc": "Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data.",
"home.payAsYouGo": "Pay As You Go",
"home.payAsYouGoDesc": "Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available.",
"home.availableModels": "Available Models",
"home.availableModelsDesc": "Access {{count}} AI models through a unified API",
"home.viewAllModels": "View all {{count}} models",
"home.plansPackages": "Plans & Packages",
"home.choosePlan": "Choose a plan that fits your needs",
"home.subscribe": "Subscribe",
"home.days": "{{count}} days",
"home.readyToStart": "Ready to Get Started?",
"home.readyToStartDesc": "Create your account and start building with AI in minutes. No credit card required.",
"home.createFreeAccount": "Create Free Account",
"home.signIn": "Sign In",
"home.defaultHeroTitle": "AI API Platform",
"login.welcomeBack": "Welcome Back",
"login.signInTo": "Sign in to {{name}}",
"login.signInToDefault": "Sign in to your account",
"login.username": "Username",
"login.password": "Password",
"login.enterUsername": "Enter your username",
"login.enterPassword": "Enter your password",
"login.signingIn": "Signing in...",
"login.signInBtn": "Sign In",
"login.noAccount": "Don't have an account?",
"login.createOne": "Create one",
"login.fillAllFields": "Please fill in all fields",
"login.welcomeBackToast": "Welcome back!",
"register.createAccount": "Create Account",
"register.getStartedWith": "Get started with {{name}}",
"register.getStartedDefault": "Get started with our platform",
"register.username": "Username",
"register.email": "Email",
"register.password": "Password",
"register.confirmPassword": "Confirm Password",
"register.chooseUsername": "Choose a username",
"register.emailPlaceholder": "your@email.com (optional)",
"register.passwordPlaceholder": "8-20 characters",
"register.repeatPassword": "Repeat your password",
"register.creating": "Creating...",
"register.createAccountBtn": "Create Account",
"register.hasAccount": "Already have an account?",
"register.signIn": "Sign in",
"register.fillRequired": "Please fill in all required fields",
"register.passwordMismatch": "Passwords do not match",
"register.passwordLength": "Password must be 8-20 characters",
"register.accountCreated": "Account created! Please sign in.",
"dashboard.welcome": "Welcome,",
"dashboard.manageDesc": "Manage your API usage, keys, and account",
"dashboard.balance": "Balance",
"dashboard.quotaUnits": "{{count}} quota units",
"dashboard.used": "Used",
"dashboard.totalRequests": "Total Requests",
"dashboard.redeemCode": "Redeem Code",
"dashboard.enterCode": "Enter redemption code",
"dashboard.redeeming": "Redeeming...",
"dashboard.redeem": "Redeem",
"dashboard.redeemSuccess": "Code redeemed successfully!",
"dashboard.quickLinks": "Quick Links",
"dashboard.apiKeys": "API Keys",
"dashboard.manageKeys": "Manage your keys",
"dashboard.packages": "Packages",
"dashboard.viewPlans": "View plans",
"dashboard.pricing": "Pricing",
"dashboard.modelPrices": "Model prices",
"dashboard.apiDocs": "API Docs",
"dashboard.comingSoon": "Coming soon",
"tokens.title": "API Keys",
"tokens.subtitle": "Manage your API access tokens",
"tokens.newKey": "+ New Key",
"tokens.createApiKey": "Create API Key",
"tokens.name": "Name",
"tokens.namePlaceholder": "e.g. my-app-key",
"tokens.cancel": "Cancel",
"tokens.creating": "Creating...",
"tokens.create": "Create",
"tokens.newApiKey": "Your New API Key",
"tokens.keyWarning": "This is the only time you'll see this key. Copy it now and store it securely.",
"tokens.copied": "Copied!",
"tokens.copy": "Copy",
"tokens.copiedToClipboard": "Copied to clipboard!",
"tokens.savedKey": "I've saved my key",
"tokens.deleteToken": "Delete Token",
"tokens.deleteConfirm": "Delete \"{{name}}\"? This cannot be undone.",
"tokens.delete": "Delete",
"tokens.noKeys": "No API keys yet",
"tokens.createFirst": "Create Your First Key",
"tokens.enabled": "Enabled",
"tokens.disabled": "Disabled",
"tokens.tokenDisabled": "Token disabled",
"tokens.tokenEnabled": "Token enabled",
"tokens.tokenDeleted": "Token deleted",
"tokens.enterName": "Please enter a name",
"tokens.quickStart": "Quick Start",
"tokens.quickStartComment": "# Use your API key with OpenAI-compatible endpoint",
"pricing.title": "Model Pricing",
"pricing.subtitle": "Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens.",
"pricing.searchPlaceholder": "Search models...",
"pricing.noMatch": "No models match your search",
"pricing.noModels": "No models available",
"pricing.model": "Model",
"pricing.inputPrice": "Input / 1M tokens",
"pricing.outputPrice": "Output / 1M tokens",
"pricing.status": "Status",
"pricing.online": "Online",
"pricing.unknown": "Unknown",
"packages.title": "Packages & Plans",
"packages.subtitle": "Choose a package that fits your usage. All plans include access to all available models.",
"packages.noPackages": "No packages available at the moment.",
"packages.checkPricing": "Check model pricing",
"packages.daysAccess": "{{count}} days access",
"packages.creditIncluded": "${{amount}} credit included",
"packages.requestsMin": "{{count}} requests/min",
"packages.allModels": "All models access",
"packages.openaiApi": "OpenAI-compatible API",
"packages.subscribeNow": "Subscribe Now",
"packages.signUpToSubscribe": "Sign Up to Subscribe",
"packages.processing": "Processing...",
"packages.confirmTitle": "Confirm Subscription",
"packages.confirmDesc": "Subscribe to {{name}} for ${{price}}?",
"packages.yourBalance": "Your balance:",
"packages.insufficientBalance": "Insufficient balance. Please top up before subscribing.",
"packages.confirm": "Confirm",
"packages.subscribedSuccess": "Subscribed successfully!",
"common.sessionExpired": "Session expired, please log in again",
"common.requestFailed": "Request failed"
}
}
+159
View File
@@ -0,0 +1,159 @@
{
"translation": {
"nav.home": "首页",
"nav.pricing": "定价",
"nav.packages": "套餐",
"nav.dashboard": "控制台",
"nav.apiKeys": "API 密钥",
"nav.login": "登录",
"nav.signUp": "注册",
"nav.logout": "退出",
"nav.contact": "联系我们",
"home.heroSubtitle": "通过单一 API 端点访问全球最强大的 AI 模型。简单、实惠、可靠。",
"home.getStarted": "免费开始",
"home.viewPricing": "查看定价",
"home.goToDashboard": "进入控制台",
"home.aiModels": "AI 模型",
"home.uptime": "在线率",
"home.latency": "延迟",
"home.whyChooseUs": "为什么选择我们",
"home.whyChooseUsDesc": "构建 AI 应用所需的一切",
"home.lightningFast": "极速响应",
"home.lightningFastDesc": "优化的路由和缓存以最低延迟交付响应。跨多个供应商负载均衡,确保最大可靠性。",
"home.securePrivate": "安全可靠",
"home.securePrivateDesc": "企业级安全性,API 密钥加密存储。默认不记录请求日志。您的数据由您掌控。",
"home.payAsYouGo": "按量付费",
"home.payAsYouGoDesc": "透明定价,无隐藏费用。按使用量付费。提供多种充值方式和订阅套餐。",
"home.availableModels": "可用模型",
"home.availableModelsDesc": "通过统一 API 访问 {{count}} 个 AI 模型",
"home.viewAllModels": "查看全部 {{count}} 个模型",
"home.plansPackages": "套餐方案",
"home.choosePlan": "选择适合您需求的方案",
"home.subscribe": "订阅",
"home.days": "{{count}} 天",
"home.readyToStart": "准备好了吗?",
"home.readyToStartDesc": "创建账户,几分钟内即可开始使用 AI 构建应用。无需信用卡。",
"home.createFreeAccount": "免费创建账户",
"home.signIn": "登录",
"home.defaultHeroTitle": "AI API 平台",
"login.welcomeBack": "欢迎回来",
"login.signInTo": "登录到 {{name}}",
"login.signInToDefault": "登录您的账户",
"login.username": "用户名",
"login.password": "密码",
"login.enterUsername": "请输入用户名",
"login.enterPassword": "请输入密码",
"login.signingIn": "登录中...",
"login.signInBtn": "登录",
"login.noAccount": "还没有账户?",
"login.createOne": "立即注册",
"login.fillAllFields": "请填写所有字段",
"login.welcomeBackToast": "欢迎回来!",
"register.createAccount": "创建账户",
"register.getStartedWith": "开始使用 {{name}}",
"register.getStartedDefault": "开始使用我们的平台",
"register.username": "用户名",
"register.email": "邮箱",
"register.password": "密码",
"register.confirmPassword": "确认密码",
"register.chooseUsername": "请选择用户名",
"register.emailPlaceholder": "your@email.com(可选)",
"register.passwordPlaceholder": "8-20 个字符",
"register.repeatPassword": "请再次输入密码",
"register.creating": "创建中...",
"register.createAccountBtn": "创建账户",
"register.hasAccount": "已有账户?",
"register.signIn": "立即登录",
"register.fillRequired": "请填写所有必填字段",
"register.passwordMismatch": "两次密码不一致",
"register.passwordLength": "密码长度需为 8-20 个字符",
"register.accountCreated": "账户创建成功!请登录。",
"dashboard.welcome": "欢迎,",
"dashboard.manageDesc": "管理您的 API 用量、密钥和账户",
"dashboard.balance": "余额",
"dashboard.quotaUnits": "{{count}} 额度单位",
"dashboard.used": "已使用",
"dashboard.totalRequests": "总请求数",
"dashboard.redeemCode": "兑换码",
"dashboard.enterCode": "请输入兑换码",
"dashboard.redeeming": "兑换中...",
"dashboard.redeem": "兑换",
"dashboard.redeemSuccess": "兑换码兑换成功!",
"dashboard.quickLinks": "快捷入口",
"dashboard.apiKeys": "API 密钥",
"dashboard.manageKeys": "管理您的密钥",
"dashboard.packages": "套餐",
"dashboard.viewPlans": "查看方案",
"dashboard.pricing": "定价",
"dashboard.modelPrices": "模型价格",
"dashboard.apiDocs": "API 文档",
"dashboard.comingSoon": "即将推出",
"tokens.title": "API 密钥",
"tokens.subtitle": "管理您的 API 访问令牌",
"tokens.newKey": "+ 新建密钥",
"tokens.createApiKey": "创建 API 密钥",
"tokens.name": "名称",
"tokens.namePlaceholder": "例如 my-app-key",
"tokens.cancel": "取消",
"tokens.creating": "创建中...",
"tokens.create": "创建",
"tokens.newApiKey": "您的新 API 密钥",
"tokens.keyWarning": "这是您唯一一次看到此密钥的机会。请立即复制并安全保存。",
"tokens.copied": "已复制!",
"tokens.copy": "复制",
"tokens.copiedToClipboard": "已复制到剪贴板!",
"tokens.savedKey": "我已保存密钥",
"tokens.deleteToken": "删除令牌",
"tokens.deleteConfirm": "删除 \"{{name}}\"?此操作不可撤销。",
"tokens.delete": "删除",
"tokens.noKeys": "暂无 API 密钥",
"tokens.createFirst": "创建您的第一个密钥",
"tokens.enabled": "已启用",
"tokens.disabled": "已禁用",
"tokens.tokenDisabled": "令牌已禁用",
"tokens.tokenEnabled": "令牌已启用",
"tokens.tokenDeleted": "令牌已删除",
"tokens.enterName": "请输入名称",
"tokens.quickStart": "快速开始",
"tokens.quickStartComment": "# 使用 OpenAI 兼容端点调用 API",
"pricing.title": "模型定价",
"pricing.subtitle": "透明的按量付费定价。价格以每百万 token 计。",
"pricing.searchPlaceholder": "搜索模型...",
"pricing.noMatch": "没有匹配的模型",
"pricing.noModels": "暂无可用模型",
"pricing.model": "模型",
"pricing.inputPrice": "输入 / 百万 token",
"pricing.outputPrice": "输出 / 百万 token",
"pricing.status": "状态",
"pricing.online": "在线",
"pricing.unknown": "未知",
"packages.title": "套餐方案",
"packages.subtitle": "选择适合您用量的套餐。所有方案均可访问全部可用模型。",
"packages.noPackages": "暂无可用套餐。",
"packages.checkPricing": "查看模型定价",
"packages.daysAccess": "{{count}} 天有效期",
"packages.creditIncluded": "含 ${{amount}} 额度",
"packages.requestsMin": "{{count}} 次请求/分钟",
"packages.allModels": "全部模型可用",
"packages.openaiApi": "OpenAI 兼容 API",
"packages.subscribeNow": "立即订阅",
"packages.signUpToSubscribe": "注册后订阅",
"packages.processing": "处理中...",
"packages.confirmTitle": "确认订阅",
"packages.confirmDesc": "订阅 {{name}},价格 ${{price}}?",
"packages.yourBalance": "您的余额:",
"packages.insufficientBalance": "余额不足,请先充值。",
"packages.confirm": "确认",
"packages.subscribedSuccess": "订阅成功!",
"common.sessionExpired": "会话已过期,请重新登录",
"common.requestFailed": "请求失败"
}
}