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:
1 parent
ce282524db
commit
3fbd70932c
76 files changed
+5018
No files matched your search
@@ -0,0 +1,52 @@
|
||||
import { useEffect } from "react";
|
||||
import { Route, Routes, useLocation } from "react-router-dom";
|
||||
import Nav from "./components/Nav";
|
||||
import Hero from "./sections/Hero";
|
||||
import Features from "./sections/Features";
|
||||
import Changelog from "./sections/Changelog";
|
||||
import Download from "./sections/Download";
|
||||
import Privacy from "./sections/Privacy";
|
||||
import CTA from "./sections/CTA";
|
||||
import Footer from "./components/Footer";
|
||||
|
||||
function ScrollToTop() {
|
||||
const { pathname } = useLocation();
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, [pathname]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const homePage = (
|
||||
<>
|
||||
<Hero />
|
||||
<CTA />
|
||||
</>
|
||||
);
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<Nav />
|
||||
<main className="flex-1">
|
||||
<ScrollToTop />
|
||||
<Routes>
|
||||
<Route path="/" element={homePage} />
|
||||
<Route
|
||||
path="/features"
|
||||
element={
|
||||
<>
|
||||
<Features />
|
||||
<Privacy />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Route path="/changelog" element={<Changelog />} />
|
||||
<Route path="/download" element={<Download />} />
|
||||
<Route path="*" element={homePage} />
|
||||
</Routes>
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user