From 18dd2e35017010b725452726824dc783fd440186 Mon Sep 17 00:00:00 2001 From: dekun Date: Thu, 11 Jun 2026 00:04:10 +0800 Subject: [PATCH] Narrow desktop layout margins and fix taiji icon in light mode. Cap content width at 1152px with side margins on ultrawide screens, add stroke to taiji logo for light backgrounds, and shrink backdrop watermark. Co-authored-by: Cursor --- app/page.tsx | 7 ++--- components/layout/mode-workspace.tsx | 4 +-- components/layout/taiji-backdrop.tsx | 10 +++---- components/svg/taiji.tsx | 39 ++++++++++++++++++---------- lib/layout.ts | 13 +++++++--- 5 files changed, 47 insertions(+), 26 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 0a8196b..72f3dbf 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,7 +2,8 @@ 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 { APP_CONTAINER } from "@/lib/layout"; +import { HOME_CONTAINER } from "@/lib/layout"; +import { TaijiIcon } from "@/components/svg/taiji"; const MODULES = [ { @@ -37,9 +38,9 @@ const MODULES = [ export default function Home() { return ( - +
-

+

知命阁

融合周易智慧与人工智能 diff --git a/components/layout/mode-workspace.tsx b/components/layout/mode-workspace.tsx index 8fa84fc..f2de4f4 100644 --- a/components/layout/mode-workspace.tsx +++ b/components/layout/mode-workspace.tsx @@ -1,7 +1,7 @@ "use client"; import { Sparkles } from "lucide-react"; -import { APP_CONTAINER } from "@/lib/layout"; +import { MODE_CONTAINER } from "@/lib/layout"; export function ModeWorkspace({ children, @@ -13,7 +13,7 @@ export function ModeWorkspace({ aiTitle?: string; }) { return ( -

+
{children} diff --git a/components/layout/taiji-backdrop.tsx b/components/layout/taiji-backdrop.tsx index 44a07c5..653d15a 100644 --- a/components/layout/taiji-backdrop.tsx +++ b/components/layout/taiji-backdrop.tsx @@ -1,15 +1,15 @@ import { TaijiWatermark } from "@/components/svg/taiji"; -/** 全页太极背景水印 */ +/** 全页太极背景水印(居中,不撑满超宽屏) */ export default function TaijiBackdrop() { return (
- - - + + +
); } diff --git a/components/svg/taiji.tsx b/components/svg/taiji.tsx index 1cc73a7..755f5e0 100644 --- a/components/svg/taiji.tsx +++ b/components/svg/taiji.tsx @@ -1,10 +1,7 @@ import React from "react"; import { cn } from "@/lib/utils"; -const YANG = "fill-stone-100 dark:fill-stone-200"; -const YIN = "fill-stone-800 dark:fill-stone-900"; - -/** 太极阴阳鱼图标(页眉 Logo) */ +/** 太极阴阳鱼图标(页眉 Logo)— 亮色模式描边保证阴阳分界可见 */ export const TaijiIcon = React.memo(function TaijiIcon({ className, }: { @@ -14,16 +11,21 @@ export const TaijiIcon = React.memo(function TaijiIcon({ - + - - + + ); }); @@ -41,13 +43,24 @@ export function TaijiWatermark({ className={className} aria-hidden > - + + - - + + ); } diff --git a/lib/layout.ts b/lib/layout.ts index 69b4ab9..b3f764f 100644 --- a/lib/layout.ts +++ b/lib/layout.ts @@ -1,3 +1,10 @@ -/** 全站内容区宽度:手机满宽,带鱼屏最大约 1920px 并留边距 */ -export const APP_CONTAINER = - "mx-auto w-full max-w-[min(100%,1920px)] px-4 sm:px-6 lg:px-8 xl:px-12 2xl:px-16"; +const CENTER = "mx-auto w-full px-4 sm:px-6 lg:px-8"; + +/** 页眉 / 页脚 / 学习 / 测算页标题 — 居中留白,最大约 1152px */ +export const APP_CONTAINER = `${CENTER} max-w-6xl`; + +/** 首页单列 — 更窄一些 */ +export const HOME_CONTAINER = `${CENTER} max-w-4xl`; + +/** 双栏测算工作区 — 与全站同宽,避免带鱼屏拉满 */ +export const MODE_CONTAINER = `${CENTER} max-w-6xl xl:px-10`;