Skip to content

Commit ba6f158

Browse files
os-zhuangCopilot
andcommitted
feat(docs): expand top nav and add section rhythm to homepage
- Top nav: add Docs + Changelog alongside Download (one-item nav felt bare; mainstream OSS sites like Resend/Convex/Fly use 3-5 items). Labels localized for EN+CN; URLs locale-prefixed. - Changelog links to GitHub Releases (no separate page to maintain). - Homepage: add numbered eyebrow labels (01/02/03) above each section and give the previously-anonymous Capabilities grid an explicit heading + subheading, mirroring the Linear/Stripe rhythm. - Thread `lang` through all baseOptions() callers so nav links resolve to the correct locale. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 73b09eb commit ba6f158

8 files changed

Lines changed: 80 additions & 14 deletions

File tree

‎apps/docs/app/[lang]/blog/[[...slug]]/page.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ export default async function BlogPage({
2323
}: {
2424
params: Promise<{ lang: string; slug?: string[] }>;
2525
}) {
26-
const { slug } = await params;
26+
const { slug, lang } = await params;
2727

2828
// If no slug, show blog index
2929
if (!slug || slug.length === 0) {
3030
const posts = blog.getPages();
3131

3232
return (
33-
<HomeLayout {...baseOptions()}>
33+
<HomeLayout {...baseOptions(lang)}>
3434
<main className="container max-w-5xl mx-auto px-4 py-16">
3535
<div className="mb-12">
3636
<h1 className="text-4xl font-bold mb-4">Blog</h1>
@@ -112,7 +112,7 @@ export default async function BlogPage({
112112
const MDX = page.data.body;
113113

114114
return (
115-
<HomeLayout {...baseOptions()}>
115+
<HomeLayout {...baseOptions(lang)}>
116116
<main className="container max-w-4xl mx-auto px-4 py-16">
117117
<Link
118118
href="/blog"

‎apps/docs/app/[lang]/docs/layout.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default async function Layout({
1515
return (
1616
<DocsLayout
1717
tree={source.pageTree[lang]}
18-
{...baseOptions()}
18+
{...baseOptions(lang)}
1919
i18n
2020
>
2121
{children}

‎apps/docs/app/[lang]/download/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default async function DownloadPage({
4040
];
4141

4242
return (
43-
<HomeLayout {...baseOptions()} i18n>
43+
<HomeLayout {...baseOptions(lang)} i18n>
4444
<main className="relative flex min-h-screen flex-col items-center bg-background text-foreground overflow-hidden">
4545
<div className="absolute inset-0 -z-10 h-full w-full bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_15%,#000_70%,transparent_100%)] pointer-events-none" />
4646

‎apps/docs/app/[lang]/page.tsx‎

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default async function HomePage({
111111
];
112112

113113
return (
114-
<HomeLayout {...baseOptions()} i18n>
114+
<HomeLayout {...baseOptions(lang)} i18n>
115115
<main className="relative flex min-h-screen flex-col items-center text-center bg-background text-foreground selection:bg-primary/20 overflow-hidden">
116116

117117
{/* Grid Pattern Background */}
@@ -132,6 +132,9 @@ export default async function HomePage({
132132
{/* Deploy Modes */}
133133
<section className="w-full px-4 py-24 max-w-6xl">
134134
<div className="mb-12 text-center">
135+
<div className="text-xs font-mono uppercase tracking-[0.18em] text-primary/70 mb-3">
136+
{t.deployModes.eyebrow}
137+
</div>
135138
<h2 className="text-3xl sm:text-4xl font-bold tracking-tight mb-3 bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent">
136139
{t.deployModes.heading}
137140
</h2>
@@ -156,6 +159,17 @@ export default async function HomePage({
156159

157160
{/* Capabilities */}
158161
<section className="w-full px-4 py-24 max-w-6xl">
162+
<div className="mb-12 text-center">
163+
<div className="text-xs font-mono uppercase tracking-[0.18em] text-primary/70 mb-3">
164+
{t.capabilities.eyebrow}
165+
</div>
166+
<h2 className="text-3xl sm:text-4xl font-bold tracking-tight mb-3 bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent">
167+
{t.capabilities.heading}
168+
</h2>
169+
<p className="text-foreground/70 max-w-2xl mx-auto">
170+
{t.capabilities.subheading}
171+
</p>
172+
</div>
159173
<div className="grid grid-cols-1 gap-6 text-left sm:grid-cols-2 lg:grid-cols-3">
160174
{features.map((feature) => (
161175
<FeatureCard
@@ -171,9 +185,14 @@ export default async function HomePage({
171185

172186
{/* Personas */}
173187
<section className="w-full px-4 py-24 max-w-5xl">
174-
<h2 className="text-3xl sm:text-4xl font-bold tracking-tight mb-12 text-center bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent">
175-
{t.personas.heading}
176-
</h2>
188+
<div className="mb-12 text-center">
189+
<div className="text-xs font-mono uppercase tracking-[0.18em] text-primary/70 mb-3">
190+
{t.personas.eyebrow}
191+
</div>
192+
<h2 className="text-3xl sm:text-4xl font-bold tracking-tight bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent">
193+
{t.personas.heading}
194+
</h2>
195+
</div>
177196
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
178197
{personas.map((persona) => (
179198
<PersonaCard

‎apps/docs/app/[lang]/privacy/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default async function PrivacyPage({
6060
const t = content[lang === 'cn' ? 'cn' : 'en'];
6161

6262
return (
63-
<HomeLayout {...baseOptions()} i18n>
63+
<HomeLayout {...baseOptions(lang)} i18n>
6464
<main className="mx-auto w-full max-w-3xl px-4 py-16 sm:py-24">
6565
<h1 className="text-3xl sm:text-4xl font-bold tracking-tight mb-2">{t.title}</h1>
6666
<p className="text-sm text-foreground/60 mb-12">{t.updated}</p>

‎apps/docs/app/[lang]/terms/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default async function TermsPage({
6868
const t = content[lang === 'cn' ? 'cn' : 'en'];
6969

7070
return (
71-
<HomeLayout {...baseOptions()} i18n>
71+
<HomeLayout {...baseOptions(lang)} i18n>
7272
<main className="mx-auto w-full max-w-3xl px-4 py-16 sm:py-24">
7373
<h1 className="text-3xl sm:text-4xl font-bold tracking-tight mb-2">{t.title}</h1>
7474
<p className="text-sm text-foreground/60 mb-12">{t.updated}</p>

‎apps/docs/lib/homepage-i18n.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface HomepageTranslations {
6969

7070
// Deploy Modes Section
7171
deployModes: {
72+
eyebrow: string;
7273
heading: string;
7374
subheading: string;
7475
docker: {
@@ -94,6 +95,13 @@ export interface HomepageTranslations {
9495
};
9596
};
9697

98+
// Capabilities Section
99+
capabilities: {
100+
eyebrow: string;
101+
heading: string;
102+
subheading: string;
103+
};
104+
97105
// Bottom CTA
98106
bottomCta: {
99107
heading: string;
@@ -142,6 +150,7 @@ export interface HomepageTranslations {
142150

143151
// Personas Section
144152
personas: {
153+
eyebrow: string;
145154
heading: string;
146155
itOps: {
147156
title: string;
@@ -218,7 +227,13 @@ export const en: HomepageTranslations = {
218227
description: 'ObjectOS runs in your environment — private cloud, on-prem, or fully air-gapped. Business data and AI prompts stay inside your perimeter. No third party in the loop.',
219228
},
220229
},
230+
capabilities: {
231+
eyebrow: '02 — How it’s safe',
232+
heading: 'AI Access, Without Giving Up Control',
233+
subheading: 'Every safeguard your platform already has — identity, permissions, audit, network boundary — applies the moment an agent touches your data. Nothing new to govern.',
234+
},
221235
personas: {
236+
eyebrow: '03 — Who it’s for',
222237
heading: 'Built for the Three People Who Have to Say Yes',
223238
itOps: {
224239
title: 'IT & Platform Operators',
@@ -237,6 +252,7 @@ export const en: HomepageTranslations = {
237252
},
238253
},
239254
deployModes: {
255+
eyebrow: '01 — Deploy',
240256
heading: 'Runs Where Your Data Already Lives',
241257
subheading: 'Same artifact, same behavior. Pick the shape that matches your infrastructure — ObjectOS, and the AI access that comes with it, stays inside your network.',
242258
docker: {
@@ -360,7 +376,13 @@ export const cn: HomepageTranslations = {
360376
description: 'ObjectOS 跑在你的环境里 —— 私有云、本地机房、甚至完全离线的内网。业务数据和 AI 提示词都留在企业边界内,链路上没有第三方。',
361377
},
362378
},
379+
capabilities: {
380+
eyebrow: '02 — 安全之上',
381+
heading: '让 AI 接得进来,但放不出去',
382+
subheading: '你平台上已有的身份、权限、审计、网络边界 —— 在 Agent 一接触数据的那一刻就全部生效。没有需要额外治理的新东西。',
383+
},
363384
personas: {
385+
eyebrow: '03 — 适用人群',
364386
heading: '为最终需要点头的三类人设计',
365387
itOps: {
366388
title: 'IT 与平台运维',
@@ -379,6 +401,7 @@ export const cn: HomepageTranslations = {
379401
},
380402
},
381403
deployModes: {
404+
eyebrow: '01 — 部署',
382405
heading: '跑在你数据已经在的地方',
383406
subheading: '同一份发布包,同一种行为。挑一种贴合你基础设施的形态 —— ObjectOS 和它带来的 AI 访问能力,都留在你的网络内。',
384407
docker: {

‎apps/docs/lib/layout.shared.tsx‎

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,21 @@ export const gitConfig = {
77
branch: 'main',
88
};
99

10-
export function baseOptions(): BaseLayoutProps {
10+
const NAV_LABELS: Record<string, { docs: string; download: string; changelog: string }> = {
11+
en: { docs: 'Docs', download: 'Download', changelog: 'Changelog' },
12+
cn: { docs: '文档', download: '下载', changelog: '更新日志' },
13+
};
14+
15+
const RELEASES_URL = 'https://github.com/objectstack-ai/objectos/releases';
16+
17+
function localePrefix(lang: string): string {
18+
return lang === 'en' ? '' : `/${lang}`;
19+
}
20+
21+
export function baseOptions(lang: string = 'en'): BaseLayoutProps {
22+
const labels = NAV_LABELS[lang] ?? NAV_LABELS.en;
23+
const prefix = localePrefix(lang);
24+
1125
return {
1226
nav: {
1327
title: (
@@ -26,10 +40,20 @@ export function baseOptions(): BaseLayoutProps {
2640
},
2741
links: [
2842
{
29-
text: 'Download',
30-
url: '/download',
43+
text: labels.docs,
44+
url: `${prefix}/docs`,
3145
active: 'nested-url',
3246
},
47+
{
48+
text: labels.download,
49+
url: `${prefix}/download`,
50+
active: 'nested-url',
51+
},
52+
{
53+
text: labels.changelog,
54+
url: RELEASES_URL,
55+
external: true,
56+
},
3357
],
3458
githubUrl: `https://github.com/${gitConfig.user}/${gitConfig.repo}`,
3559
};

0 commit comments

Comments
 (0)