From 0967ac6d9b70c7ad99632ba3770a3ece629fa5a6 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 17 Mar 2026 20:00:09 +0800 Subject: [PATCH 1/4] Replace hero cards with video showcase shell --- src/app/page.tsx | 144 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 112 insertions(+), 32 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index fd62204..6f0de82 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -21,7 +21,6 @@ import { import useSWR from "swr"; import Footer from "../components/Footer"; -import { HeroCard } from "../components/HeroCard"; import UnifiedNavigation from "../components/UnifiedNavigation"; import { useLanguage } from "../i18n/LanguageProvider"; import { translations } from "../i18n/translations"; @@ -182,37 +181,11 @@ export function HeroSection() { -
-
-
-

- {isChinese ? "主要入口" : "Launch paths"} -

-

- {isChinese - ? "从接入、托管到观测,保留原有入口,但改成更轻的阅读节奏。" - : "Keep the same entry points, but present them with a calmer editorial rhythm."} -

-
- - {t.heroCards.length} {isChinese ? "个入口" : "entry paths"} - -
- -
- {t.heroCards.map((card) => { - const Icon = getIcon(card.title, PlusCircle); - return ( - - ); - })} -
+
+ card.title)} + isChinese={isChinese} + />
@@ -498,6 +471,113 @@ type LatestBlogPost = { date?: string; }; +function HeroVideoShell({ + items, + isChinese, +}: { + items: string[]; + isChinese: boolean; +}) { + return ( +
+
+
+
+

+ {isChinese ? "产品演示" : "Product demo"} +

+

+ {isChinese + ? "这里预留为视频展示区,后续可以直接替换成产品介绍、工作流演示或 onboarding 视频。" + : "Reserved for a video showcase. You can later replace it with a product intro, workflow demo, or onboarding clip."} +

+
+ + {isChinese ? "16:9 占位" : "16:9 shell"} + +
+
+ +
+
+
+
+
+
+
+ + + {isChinese ? "视频待接入" : "Video pending"} + + + 00:00 / 02:18 + +
+ +
+ +
+

+ {isChinese + ? "用一段视频解释从灵感到上线的完整路径" + : "Show the full path from idea to launch in one video"} +

+

+ {isChinese + ? "建议后续放 60 到 120 秒的产品导览、集成配置流程,或真实部署 walkthrough。" + : "Best used for a 60-120 second product tour, integration setup flow, or real deployment walkthrough."} +

+
+
+ +
+
+
+
+
+ + {isChinese ? "开场介绍" : "Intro"} + + + {isChinese ? "集成配置" : "Setup"} + + + {isChinese ? "上线演示" : "Launch"} + +
+
+
+
+ +
+ {items.map((item) => ( + + {item} + + ))} +
+
+
+ ); +} + function LogoPill({ label }: { label: string }) { return ( From d6d062daa91d962c584968bfd76f6c436dd9ec68 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 17 Mar 2026 20:02:45 +0800 Subject: [PATCH 2/4] refactor(public-pages): unify docs services and about styling --- src/app/about/page.tsx | 298 ++++++++++--------- src/app/docs/Feedback.tsx | 68 +++-- src/app/docs/[collection]/[...slug]/page.tsx | 132 ++++---- src/app/docs/page.tsx | 173 +++++++++-- src/app/globals.css | 150 ++++++++++ src/app/services/page.tsx | 292 +++++++----------- src/components/doc/DocArticle.tsx | 10 +- src/components/doc/DocMetaPanel.tsx | 39 ++- src/components/public/PublicPageShell.tsx | 82 +++++ 9 files changed, 779 insertions(+), 465 deletions(-) create mode 100644 src/components/public/PublicPageShell.tsx diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index 44acc0c..f8156bb 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -1,161 +1,167 @@ "use client"; -import React from "react"; -import { translations } from "../../i18n/translations"; -import { useLanguage } from "../../i18n/LanguageProvider"; -import UnifiedNavigation from "../../components/UnifiedNavigation"; -import Footer from "../../components/Footer"; +import { AlertTriangle, ArrowUpRight, Heart, Sparkles } from "lucide-react"; + +import { + PublicPageIntro, + PublicPageShell, +} from "@/components/public/PublicPageShell"; +import { useLanguage } from "@/i18n/LanguageProvider"; +import { translations } from "@/i18n/translations"; +import { cn } from "@/lib/utils"; export default function AboutPage() { const { language } = useLanguage(); + const isChinese = language === "zh"; const t = translations[language].about; return ( -
-
+ +
+
+ -
- - -
-
- {/* Header */} -
-

- {t.title} -

-

{t.subtitle}

-
- - {/* Disclaimer Section */} -
-
-
- - - - - -
-
-

- Disclaimer -

-

- {t.disclaimer} -

-
-
-
- - {/* Acknowledgments */} -
-
-

- {t.acknowledgmentsTitle} -

-

- {t.acknowledgments} -

- -
- {t.sections.map((section, sIndex) => ( -
-

- {section.title} -

- - {section.content && ( -

- {section.content} -

- )} - - {section.items && ( -
- {section.items.map((item, iIndex) => ( -
-
- - {item.label} - - -

- {item.description} -

-
-
- ))} -
- )} - - {section.links && ( - - )} -
- ))} -
-
- -
-
-
- - - -

{t.opensource}

-
+
+

+ {isChinese ? "维护方式" : "Maintenance"} +

+
+
+
+

+ {isChinese + ? "独立开发者维护,围绕 AI 服务、可观测性与云原生控制面持续演进。" + : "Maintained independently, evolving around AI services, observability, and cloud-native control planes."} +

-
+
+
-
-
-
+
+
+
+ +
+
+

+ {isChinese ? "免责声明" : "Disclaimer"} +

+

+ {t.disclaimer} +

+
+
+
+ +
+
+
+

+ {isChinese ? "致谢与驱动力" : "Acknowledgements"} +

+

+ {t.acknowledgmentsTitle} +

+

+ {t.acknowledgments} +

+
+ +
+ {t.sections.map((section, index) => ( +
+
+
+ {isChinese ? "章节" : "Section"} {index + 1} +
+

+ {section.title} +

+
+ + {section.content ? ( +

+ {section.content} +

+ ) : null} + + {section.items ? ( +
+ {section.items.map((item) => ( + +
+
+

+ {item.label} +

+

+ {item.description} +

+
+ +
+
+ ))} +
+ ) : null} + + {section.links ? ( +
+ {section.links.map((link) => ( + + + {link.label} + + ))} +
+ ) : null} +
+ ))} +
+
+
+ +
+
+
+ +
+
+

+ {isChinese ? "开源协作" : "Open source"} +

+

+ {t.opensource} +

+
+
+
+ ); } diff --git a/src/app/docs/Feedback.tsx b/src/app/docs/Feedback.tsx index 61b2514..bab4f0d 100644 --- a/src/app/docs/Feedback.tsx +++ b/src/app/docs/Feedback.tsx @@ -1,36 +1,44 @@ -'use client' +"use client"; -import { useState } from 'react' -import { ThumbsUp, ThumbsDown } from 'lucide-react' +import { useState } from "react"; +import { ThumbsDown, ThumbsUp } from "lucide-react"; export default function Feedback() { - const [voted, setVoted] = useState<'yes' | 'no' | null>(null) + const [voted, setVoted] = useState<"yes" | "no" | null>(null); - return ( -
-
-

Is this page helpful?

- {voted === null ? ( -
- - -
- ) : ( -

Thanks for your feedback!

- )} -
+ return ( +
+
+
+

+ Feedback +

+

+ Is this page helpful? +

- ) + + {voted === null ? ( +
+ + +
+ ) : ( +

Thanks for your feedback.

+ )} +
+
+ ); } diff --git a/src/app/docs/[collection]/[...slug]/page.tsx b/src/app/docs/[collection]/[...slug]/page.tsx index 0b2ecbd..8c50355 100644 --- a/src/app/docs/[collection]/[...slug]/page.tsx +++ b/src/app/docs/[collection]/[...slug]/page.tsx @@ -1,104 +1,128 @@ -export const dynamic = 'error' -export const revalidate = false +export const dynamic = "error"; +export const revalidate = false; -import { notFound } from 'next/navigation' -import type { Metadata } from 'next' +import type { Metadata } from "next"; +import Link from "next/link"; +import { notFound } from "next/navigation"; +import { ChevronRight } from "lucide-react"; -import DocArticle from '@/components/doc/DocArticle' -import DocMetaPanel from '@/components/doc/DocMetaPanel' -import Feedback from '../../Feedback' -import { getDocVersionParams, getDocVersion } from '../../resources.server' -import { isFeatureEnabled } from '@lib/featureToggles' -import Link from 'next/link' -import { ChevronRight } from 'lucide-react' +import DocArticle from "@/components/doc/DocArticle"; +import DocMetaPanel from "@/components/doc/DocMetaPanel"; +import { PublicPageIntro } from "@/components/public/PublicPageShell"; +import { isFeatureEnabled } from "@lib/featureToggles"; -// Simple Breadcrumbs Component inline (or could be separate) -function DocsBreadcrumbs({ items }: { items: { label: string; href: string }[] }) { +import Feedback from "../../Feedback"; +import { getDocVersion, getDocVersionParams } from "../../resources.server"; + +function DocsBreadcrumbs({ + items, +}: { + items: { label: string; href: string }[]; +}) { return ( -