From d58f46bc80b5a5a1d84f309a885423aeb9a0819a Mon Sep 17 00:00:00 2001 From: rosemariejebbjtxbfp Date: Wed, 24 Jun 2026 03:16:41 +0000 Subject: [PATCH] =?UTF-8?q?feat(public-frontend):=20=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=20UI=20=E8=A7=86=E8=A7=89=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 引入统一品牌主题(色阶/字体/阴影/动效),重做首页 hero、卡片、导航与页脚,统一各页面的卡片/输入框/按钮样式。 - tailwind: 新增 brand 色阶、Inter 字体、card/glow 阴影与 fade-up 动效 - index.html: 引入 Inter 字体与 theme-color/description meta - index.css: 双径向渐变背景 + @layer 组件类(.card/.input/.btn-primary 等) - App/Home/ProductView/Contribute/ApiDocs/Account: 套用新设计系统 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- public-frontend/index.html | 13 +- public-frontend/src/App.tsx | 103 ++++++------ public-frontend/src/components/Account.tsx | 22 +-- public-frontend/src/components/ApiDocs.tsx | 14 +- public-frontend/src/components/Contribute.tsx | 38 ++--- public-frontend/src/components/Home.tsx | 156 ++++++++++++------ .../src/components/ProductView.tsx | 16 +- public-frontend/src/index.css | 35 +++- public-frontend/tailwind.config.js | 51 +++++- 9 files changed, 297 insertions(+), 151 deletions(-) diff --git a/public-frontend/index.html b/public-frontend/index.html index 6382ebc..cb94942 100644 --- a/public-frontend/index.html +++ b/public-frontend/index.html @@ -3,7 +3,18 @@ - 天工商品档案公共仓 + + + 天工 · 商品档案公共仓 + + +
diff --git a/public-frontend/src/App.tsx b/public-frontend/src/App.tsx index dfb27db..764db53 100644 --- a/public-frontend/src/App.tsx +++ b/public-frontend/src/App.tsx @@ -14,6 +14,13 @@ type View = | { name: "api" } | { name: "account" }; +const NAV: { key: View["name"]; label: string; icon: typeof Search }[] = [ + { key: "home", label: "检索", icon: Search }, + { key: "contribute", label: "贡献档案", icon: PlusCircle }, + { key: "api", label: "API", icon: Code2 }, + { key: "account", label: "API 密钥", icon: KeyRound }, +]; + export default function App() { const [view, setView] = useState({ name: "home" }); const [qualified, setQualified] = useState(null); @@ -27,53 +34,46 @@ export default function App() { return (
-
-
+
+
-
-
+
{view.name === "home" && ( setView({ name: "product", id })} @@ -91,22 +91,27 @@ export default function App() { {view.name === "account" && }
-