diff --git a/app/bazi/page.tsx b/app/bazi/page.tsx index 3f46976..42ecc09 100644 --- a/app/bazi/page.tsx +++ b/app/bazi/page.tsx @@ -1,11 +1,10 @@ import PageShell from "@/components/page-shell"; import BaziForm from "@/components/modes/bazi-form"; -import { APP_CONTAINER } from "@/lib/layout"; export default function BaziPage() { return ( - -
+ +

生辰八字

四柱排盘 · 十神大运 · AI 命理解读 diff --git a/app/combined/page.tsx b/app/combined/page.tsx index dc357ca..efcb1f3 100644 --- a/app/combined/page.tsx +++ b/app/combined/page.tsx @@ -1,11 +1,10 @@ import PageShell from "@/components/page-shell"; import CombinedForm from "@/components/modes/combined-form"; -import { APP_CONTAINER } from "@/lib/layout"; export default function CombinedPage() { return ( - -

+ +

综合测算

天时 · 地利 · 人和 · 六爻可选 diff --git a/app/learn/[slug]/page.tsx b/app/learn/[slug]/page.tsx index c7bbabf..a0322ae 100644 --- a/app/learn/[slug]/page.tsx +++ b/app/learn/[slug]/page.tsx @@ -52,7 +52,7 @@ export default async function GuaDetailPage({ const num = guaNumFromMark(guaMark); return ( - +

← 返回总览 diff --git a/app/learn/other/[slug]/page.tsx b/app/learn/other/[slug]/page.tsx index 85f5586..76c3915 100644 --- a/app/learn/other/[slug]/page.tsx +++ b/app/learn/other/[slug]/page.tsx @@ -48,7 +48,7 @@ export default async function GuaOtherDetailPage({ const content = stripFrontmatter(raw); return ( - +
← 返回简体总览 diff --git a/app/learn/other/page.tsx b/app/learn/other/page.tsx index c5a8d51..e86a528 100644 --- a/app/learn/other/page.tsx +++ b/app/learn/other/page.tsx @@ -2,7 +2,6 @@ import Link from "next/link"; import PageShell from "@/components/page-shell"; import { GuaGrid } from "@/components/learn/gua-grid"; import { ZenCard } from "@/components/ui/zen-card"; -import { APP_CONTAINER } from "@/lib/layout"; import { getGuaName, guaNumFromMark, @@ -18,7 +17,7 @@ export default async function LearnOtherPage() { })); return ( - +

易经学习

diff --git a/app/learn/page.tsx b/app/learn/page.tsx index 33a3db4..7034ba1 100644 --- a/app/learn/page.tsx +++ b/app/learn/page.tsx @@ -2,7 +2,6 @@ import Link from "next/link"; import PageShell from "@/components/page-shell"; import { GuaGrid } from "@/components/learn/gua-grid"; import { ZenCard } from "@/components/ui/zen-card"; -import { APP_CONTAINER } from "@/lib/layout"; import { getGuaName, guaNumFromMark, @@ -18,7 +17,7 @@ export default async function LearnPage() { })); return ( - +

易经学习

diff --git a/app/liuyao/page.tsx b/app/liuyao/page.tsx index 479f1f2..f2a6c10 100644 --- a/app/liuyao/page.tsx +++ b/app/liuyao/page.tsx @@ -1,11 +1,10 @@ import PageShell from "@/components/page-shell"; import LiuyaoForm from "@/components/modes/liuyao-form"; -import { APP_CONTAINER } from "@/lib/layout"; export default function LiuyaoPage() { return ( - -

+ +

六爻算卦

问事 · 起卦时空 · 线上 / 线下六爻 diff --git a/app/page.tsx b/app/page.tsx index 72f3dbf..2a35f8f 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,7 +2,6 @@ import Link from "next/link"; import PageShell from "@/components/page-shell"; import { BookOpen, BrainCircuit, Compass, Sparkles } from "lucide-react"; import { ZenCard } from "@/components/ui/zen-card"; -import { HOME_CONTAINER } from "@/lib/layout"; import { TaijiIcon } from "@/components/svg/taiji"; const MODULES = [ @@ -38,7 +37,7 @@ const MODULES = [ export default function Home() { return ( - +

知命阁

diff --git a/components/layout/mode-workspace.tsx b/components/layout/mode-workspace.tsx index f2de4f4..1783f5d 100644 --- a/components/layout/mode-workspace.tsx +++ b/components/layout/mode-workspace.tsx @@ -1,7 +1,6 @@ "use client"; import { Sparkles } from "lucide-react"; -import { MODE_CONTAINER } from "@/lib/layout"; export function ModeWorkspace({ children, @@ -13,7 +12,7 @@ export function ModeWorkspace({ aiTitle?: string; }) { return ( -
+
{children} diff --git a/components/layout/taiji-backdrop.tsx b/components/layout/taiji-backdrop.tsx index 653d15a..5fa4ac5 100644 --- a/components/layout/taiji-backdrop.tsx +++ b/components/layout/taiji-backdrop.tsx @@ -1,15 +1,13 @@ import { TaijiWatermark } from "@/components/svg/taiji"; -/** 全页太极背景水印(居中,不撑满超宽屏) */ +/** 全页太极背景水印 — 仅居中,不铺满超宽屏 */ export default function TaijiBackdrop() { return (
- - - +
); } diff --git a/components/learn/gua-grid.tsx b/components/learn/gua-grid.tsx index a7503e5..d7ae45d 100644 --- a/components/learn/gua-grid.tsx +++ b/components/learn/gua-grid.tsx @@ -9,7 +9,7 @@ export interface GuaGridItem { export function GuaGrid({ items }: { items: GuaGridItem[] }) { return ( -
+
{items.map(({ num, name, href }) => ( +
-
{children}
+
+ {children} +
); diff --git a/lib/layout.ts b/lib/layout.ts index b3f764f..2bf65e1 100644 --- a/lib/layout.ts +++ b/lib/layout.ts @@ -1,10 +1,22 @@ -const CENTER = "mx-auto w-full px-4 sm:px-6 lg:px-8"; +const pad = "px-4 sm:px-6 lg:px-8"; -/** 页眉 / 页脚 / 学习 / 测算页标题 — 居中留白,最大约 1152px */ -export const APP_CONTAINER = `${CENTER} max-w-6xl`; +/** 内容区宽度档位(带鱼屏居中,两侧留空) */ +export const CONTENT_SHELL = { + /** 常规页:约 896px */ + default: `w-full max-w-4xl ${pad}`, + /** 首页、文章:约 768px */ + narrow: `w-full max-w-3xl ${pad}`, + /** 双栏测算:约 960px */ + wide: `w-full max-w-[960px] ${pad}`, +} as const; -/** 首页单列 — 更窄一些 */ -export const HOME_CONTAINER = `${CENTER} max-w-4xl`; +export type ContentShellWidth = keyof typeof CONTENT_SHELL; -/** 双栏测算工作区 — 与全站同宽,避免带鱼屏拉满 */ -export const MODE_CONTAINER = `${CENTER} max-w-6xl xl:px-10`; +/** 页眉 / 页脚 — 与最宽内容区对齐 */ +export const APP_CONTAINER = `mx-auto ${CONTENT_SHELL.wide}`; + +/** @deprecated 使用 PageShell width="narrow" */ +export const HOME_CONTAINER = `mx-auto ${CONTENT_SHELL.narrow}`; + +/** 双栏测算工作区 */ +export const MODE_CONTAINER = `mx-auto ${CONTENT_SHELL.wide}`;