Skip to content

Commit 040b303

Browse files
committed
fix(website): route incomplete modules to overview page from homepage
1 parent d3a0a22 commit 040b303

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎website/components/features/FeaturesPage.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function FeaturesPage() {
2727
{MODULES.map((m, i) => (
2828
<SectionReveal key={m.name} delay={i * 0.08}>
2929
<Link
30-
href={m.href}
30+
href={m.ready ? m.href : "/download"}
3131
className="group relative block rounded-3xl p-7 h-full transition-all duration-500 hover:-translate-y-1 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-kb-brand"
3232
style={{
3333
background: "var(--kb-bg-elevated)",

‎website/lib/features/modules.ts‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ export interface FeatureModule {
88
origin: string;
99
desc: string;
1010
color: string;
11-
/** 详情页路径;未上线模块指向 /download 引导下载 */
11+
/**
12+
* 详情页路径。
13+
* 首页直接用 href(已上线模块指详情页,未上线模块指 /features 总览页);
14+
* 总览页自身在渲染时覆盖未上线模块为 /download,引导下载。
15+
*/
1216
href: string;
1317
/** 详情页是否已上线 */
1418
ready: boolean;
1519
}
1620

1721
export const MODULES: FeatureModule[] = [
1822
{ name: "深潜", origin: "番茄钟", desc: "切断海面噪音,潜入零干扰的心流深海。", color: "var(--kb-focus-blue)", href: "/features/dive", ready: true },
19-
{ name: "结礁", origin: "智能笔记", desc: "将漂浮的碎片,沉淀为坚实的认知暗礁。", color: "var(--kb-brand-400)", href: "/download", ready: false },
20-
{ name: "回声定位", origin: "课堂助手", desc: "捕捉深海回声,打捞暗流中的知识暗物质。", color: "var(--kb-cyber-cyan)", href: "/download", ready: false },
21-
{ name: "反衰减呼吸", origin: "闪卡复习", desc: "规律吐纳,让记忆在深海高压下依然鲜活。", color: "var(--kb-moss-green)", href: "/download", ready: false },
22-
{ name: "浮出水面", origin: "费曼学习法", desc: "向世界呼出你的理解。雾散了,轮廓就清晰了。", color: "var(--kb-amber)", href: "/download", ready: false },
23-
{ name: "萤火海沟", origin: "灵感空间", desc: "安放微光,它们终将照亮整片深域。", color: "var(--kb-accent-400)", href: "/download", ready: false },
23+
{ name: "结礁", origin: "智能笔记", desc: "将漂浮的碎片,沉淀为坚实的认知暗礁。", color: "var(--kb-brand-400)", href: "/features", ready: false },
24+
{ name: "回声定位", origin: "课堂助手", desc: "捕捉深海回声,打捞暗流中的知识暗物质。", color: "var(--kb-cyber-cyan)", href: "/features", ready: false },
25+
{ name: "反衰减呼吸", origin: "闪卡复习", desc: "规律吐纳,让记忆在深海高压下依然鲜活。", color: "var(--kb-moss-green)", href: "/features", ready: false },
26+
{ name: "浮出水面", origin: "费曼学习法", desc: "向世界呼出你的理解。雾散了,轮廓就清晰了。", color: "var(--kb-amber)", href: "/features", ready: false },
27+
{ name: "萤火海沟", origin: "灵感空间", desc: "安放微光,它们终将照亮整片深域。", color: "var(--kb-accent-400)", href: "/features", ready: false },
2428
];

0 commit comments

Comments
 (0)