feat(website): 官网多页面 + 中英文切换 + Kimi 风格科技风重设计

- 多页路由:首页 / 功能 / 更新日志 / 下载(HashRouter,适配 GitHub Pages)
- 中英文切换(zh/en 双语文案 + localStorage 记忆)
- Kimi 品牌配色(中性灰 + 蓝)+ 科技风(网格底纹 / 辉光按钮 / 渐变强调词)
- 更新日志页:运行时同步 GitHub Releases,localStorage 缓存 1h,网络失败回退内置列表
- 功能页 8 张截图卡片;下载页含自动更新说明
- 修复资源路径 404(asset() + %BASE_URL%);自托管 Inter/Fira Code 字体
This commit is contained in:
KimiSwitch Dev committed 2026-08-01 19:04:33 +08:00
1 parent ce282524db
commit 3fbd70932c
76 files changed
+5018

No files matched your search

+76
View File
@@ -0,0 +1,76 @@
import SectionShell from "../components/SectionShell";
import { useInView } from "../hooks";
import { useLang } from "../i18n";
import { asset } from "../lib/asset";
import {
Stack,
PlusCircle,
Gauge,
ChatsCircle,
Key,
SlidersHorizontal,
MagnifyingGlass,
DownloadSimple,
type Icon,
} from "@phosphor-icons/react";
const icons: Record<string, Icon> = {
"multi-provider": Stack,
"custom-provider": PlusCircle,
usage: Gauge,
sessions: ChatsCircle,
"kimi-auth": Key,
"usage-config": SlidersHorizontal,
"model-discovery": MagnifyingGlass,
"auto-update": DownloadSimple,
};
export default function Features() {
const { t } = useLang();
const [gridRef, gridInView] = useInView<HTMLDivElement>();
return (
<SectionShell
id="features"
title={t.features.title}
subtitle={t.features.subtitle}
>
<div
ref={gridRef}
className="grid grid-cols-1 gap-6 sm:grid-cols-2"
>
{t.features.items.map((f, i) => {
const Icon = icons[f.id] ?? Stack;
return (
<div
key={f.id}
style={{ transitionDelay: `${i * 60}ms` }}
className={`card overflow-hidden p-0 transition-all duration-500 ease-out hover:border-primary/50 ${
gridInView
? "motion-safe:opacity-100 motion-safe:translate-y-0"
: "motion-safe:opacity-0 motion-safe:translate-y-4"
}`}
>
<div className="border-b border-border bg-muted">
<img
src={asset(f.img)}
alt={`Kimi Switch - ${f.title}`}
loading="lazy"
className="aspect-[16/9] w-full object-cover object-top"
/>
</div>
<div className="p-6">
<div className="mb-3 flex h-10 w-10 items-center justify-center rounded-xl border border-primary/25 bg-primary/10 text-primary">
<Icon className="h-5 w-5" weight="duotone" />
</div>
<h3 className="mb-2 text-lg font-semibold">{f.title}</h3>
<p className="text-sm leading-relaxed text-muted-foreground">
{f.desc}
</p>
</div>
</div>
);
})}
</div>
</SectionShell>
);
}