diff --git a/docs/acceptance/2026-11-28-wrap-up/pr-description.md b/docs/acceptance/2026-11-28-wrap-up/pr-description.md index 822fff73..db4d583f 100644 --- a/docs/acceptance/2026-11-28-wrap-up/pr-description.md +++ b/docs/acceptance/2026-11-28-wrap-up/pr-description.md @@ -12,9 +12,12 @@ - **导航签名**(ADR-0012 / OPEN-02a):页头改内缩白浮条(top 48 / 高 64,px 令牌);195 张基线重采。 - **语法棘轮批 1+2**(ADR-0013 / OPEN-05a):删 3 个零渲染点组件;`/about/brand` 清账;上限下调。 - **收尾**(2026-11-28):OPEN-16 死码判据升级为符号级可达性 + 自证 6 情景;README/CONTEXT/台账同步;OPEN-17/18 登记。 -- **OPEN-01 落地**(2026-12-01):B 类原语 `ui/span-field.tsx` × 六页首屏(5/7/4/6/8/6 层参数); - `check:grammar` 增 R22(六页必须有原语或影像,四向自证)⇒ 21/21 → **22/22**; - hub 24 张基线重采,并修掉 L2「卡片组件」对页面总高敏感的脆性捕获。 +- **OPEN-01 落地**(2026-12-01):首屏视觉支点走 **A 类本地生成影像** + `ui/hero-plate.tsx`(四张 4:5 建筑静帧,97–199KB/张),覆盖 16 个文件 / 18 条路由; + `check:grammar` 增 R22(首屏必须有影像片,四向自证)⇒ 21/21 → **22/22**; + 同时修订 ADR-0011 §4.1(A 类允许进首屏引言区的构图位)。 + 第一版是 B 类矢量原语(`span-field.tsx`,灰阶层叠块),当日被否决并撤除,复盘见 ADR §8.1。 + 另修掉 L2「卡片组件」对页面总高敏感的脆性捕获。 ## 关联 Issue @@ -74,16 +77,15 @@ **合并前必补(未验证项)** 1. `npm run test`(全量 E2E;dev 下 16 个 `@critical` GA4 用例按设计 skip,生产目标断言在下一项)。 -2. `npm run lighthouse`(需先 `npm run build`)。 +2. ~~`npm run lighthouse`~~ —— **2026-12-01 已跑过**:33 次运行(11 URL × 3)全部断言通过, + a11y 11/11 均 100 分,performance 97–100,best-practices 96–100,SEO 100。 3. ~~`npm run test:e2e:prod`~~ —— **2026-12-01 已在构建产物上跑过**: `102 passed / 33 failed / 9 skipped`,33 条**全部** `[firefox]`,错误统一 `Test timeout of 60000ms exceeded while setting up "page"`(本机沙箱 firefox 建页阻塞); GA4 四例在 chromium / chromium-mobile / webkit 三列全绿。 4. `npm run test:e2e:write-db`(已知残差抖动:3 跑 1 红;宣称前须连续两次 EXIT=0)。 -5. **firefox 视觉基线**:hub 六页的 `visual-firefox-desktop` 基线未重采(同一条沙箱限制), - 须在 firefox 可建页的机器/CI 上跑 - `npx playwright test visual-regression.spec.ts --project=visual-firefox-desktop --update-snapshots`。 - **在此之前不得宣称「视觉全绿」。** +5. ~~firefox 视觉基线~~ —— **已闭(2026-12-01)**:沙箱放开后 firefox `newPage` 恢复, + 七个 project 全部补采;全量只读复跑 **225 passed / 0 failed / EXIT=0**。 **范围内的已知残留** diff --git a/docs/acceptance/2026-12-01-fidelity/evaluation.md b/docs/acceptance/2026-12-01-fidelity/evaluation.md index ef1170c5..2a96551a 100644 --- a/docs/acceptance/2026-12-01-fidelity/evaluation.md +++ b/docs/acceptance/2026-12-01-fidelity/evaluation.md @@ -89,3 +89,25 @@ **达标度重估**:C1 补齐后,「复刻达成度」由 66 升至 **约 82**(口径同 §1:hub 视觉支点 20→17, 语法与形状 24 不变,首页 17 不变,详情页影像密度仍 6/15)。剩余扣分集中在 **C2(详情页无图)** 与 **C5/C6(闸覆盖与基线有效性)**,不再是「入口页空白」这种一眼可见的断档。 + +## 9. C1 终版:A 类影像片(2026-12-01 晚,用户裁定) + +§8 记的「B 类矢量原语」版本当日被用户否决——原话「右侧的矩形条是什么设计?有出处吗?不太好看呢」。 +复盘:灰阶堆叠在浅底上读成骨架屏/条形图,不是建筑;建筑感来自透视与材质,矢量剪影两样都没有。 +这与 ADR-0011 §2.4 记的先例(`brand-visuals.tsx` 抽象几何零消费者被弃)是同一个坑。 + +**改判**:走 A 类本地生成影像,并相应修订 ADR-0011 §4.1(A 类允许进首屏引言区的构图位)。 + +| 项 | 读数 | +|---|---| +| 组件 | `src/components/ui/hero-plate.tsx`(`variant` 四档,`aria-hidden` + `alt=""`) | +| 资产 | `public/images/hub/{facade,glass,hall,truss}.webp`,4:5 / 1000×1250 / 97–199KB | +| 覆盖 | 16 个文件,对应 20 条路由中的 18 条(排除 `/privacy` `/terms` `/cases/[slug]`) | +| 判据 | R22 改守 `80 **收成左上白方汉堡**(原 P3 的后半) | **已判定不做 2026-11-26** | — | 翻转需四条同时满足(ADR-0012 §6):汉堡含完整双轴 + focus trap + `Esc`;原 `nav-dropdown`/`nav-keyboard` 断言**作为「展开后」子断言保留**;滚动后导航可发现性三步复算;基线按 §5.58 重采 | | OPEN-03 | 正文行高统一(把 `--line-height-relaxed` 收进 `.prose` 层) | 未闭 | 库里已有法律页 HTML 自带行高;统一需**写库**或重采基线,二者都要单独授权 | 层内加 `line-height` 后 `/privacy` `/terms` 视觉零差异 | @@ -1902,3 +1902,21 @@ hub 首屏变高后,L2「卡片组件」的元素截图跟着红:webkit 捕 `client intended to send too large body: 791317541 bytes`,http 级 `client_max_body_size 100M`。 处理:`git.f.novalon.cn` 的 443 server 块加 `client_max_body_size 2g`(已备份原文件、`nginx -t` 通过、 reload 生效),随后 `47cdbcfb..9db24f68` 推送成功(32 笔 / 约 790MB)。 + +### 26.7 同日修订:B 类原语 → A 类影像片(用户裁定) + +§26.1–26.4 记的是第一版(矢量原语)。上线前用户判「右侧矩形条不好看」, +复盘为**语义错位**(灰阶堆叠读成骨架屏/条形图,不是建筑),当日晚改为 A 类本地生成影像: + +| 项 | 第一版(已撤) | 现行 | +|---|---|---| +| 组件 | `ui/span-field.tsx`(层叠体块 + 水平线) | `ui/hero-plate.tsx`(四张 4:5 建筑静帧) | +| 类别 | B 类矢量(ADR §4.1 允许构图位) | A 类影像(为此**修订** §4.1:首屏引言区放开构图位) | +| 资产 | 无(纯代码) | `public/images/hub/{facade,glass,hall,truss}.webp`,97–199KB/张 | +| 覆盖面 | 16 文件 | 16 文件(同) | +| 判据 | R22 守 `` 删掉,R12–R21 全绿, - * 于是「复刻完成」可以在一夜之间退回「六张白底文字块」而没有任何仪器喊。 + * 为什么这条判据存在:`OPEN-01` 的验收判据①是「首屏有 B 类原语且承担构图」。 + * 没有这条闸时,判据只活在 ADR 文字里 —— 把原语删掉,R12–R21 全绿, + * 于是「复刻完成」可以在一夜之间退回「白底文字块」而没有任何仪器喊。 * 分母为 0(路径全改)按「判据失去目标」判红,而不是静默通过。 + * + * 不在此列的两类(有意排除,不是漏): + * - `/privacy` `/terms`:法律文本页,排版服从可读性,不宜插装饰位; + * - `/cases/[slug]`:首屏是 Bain 式「大数字先行」构图,且零案例种子下不可达, + * 换了构图也没有可观测收益 —— 待有真实案例后按需并入。 */ const HUB_HERO_FILES = [ + // 六个 hub "src/app/(marketing)/products/products-content-v3.tsx", "src/app/(marketing)/solutions/solutions-content-v3.tsx", "src/app/(marketing)/services/services-content-v3.tsx", "src/app/(marketing)/cases/cases-content-v3.tsx", "src/app/(marketing)/news/news-content-v3.tsx", "src/app/(marketing)/insights/insights-content.tsx", + // 详情页(共享组件覆盖 standalone/[id] 与 erp-upgrade-v3) + "src/components/detail/detail-page-hero.tsx", + "src/app/(marketing)/products/product-detail-content-v3.tsx", + "src/app/(marketing)/solutions/solution-detail-content-v3.tsx", + "src/app/(marketing)/services/service-detail-content-v4.tsx", + "src/app/(marketing)/news/news-detail-content-v3.tsx", + // 内容页 + "src/app/(marketing)/about/about-content-v4.tsx", + "src/app/(marketing)/team/team-content-v3.tsx", + "src/app/(marketing)/methodology/methodology-content.tsx", + "src/app/(marketing)/contact/contact-content-v3.tsx", + "src/app/(marketing)/products/erp-upgrade/erp-upgrade-content-v2.tsx", ]; /** @@ -636,11 +654,13 @@ function checkGrammar(rawText, rawFiles, twConfig = "", opts = {}) { /** * R22 hub 六页首屏必须有构图支点(ADR-0011 §5 判据①)。 * - * 判「有」的两种形态:B 类原语 `` 不该算作构图支点。 + * `export { … } from` 正则。这里同理:一段被注释掉的 `` 不该算作构图支点。 * * 为什么分母按「找到几页」而不是恒定 6:路径改名时若照常除以 6,一条红都不会出, * 判据就变成了空转。缺页本身判红,与 R13 的 `MARKETING_FLOOR` 同一纪律。 @@ -650,15 +670,15 @@ function checkGrammar(rawText, rawFiles, twConfig = "", opts = {}) { const r22Red = []; for (const rel of hubPresent) { const src = stripComments(files.get(rel) ?? "", { line: true }); - if (!/ 也无 —— 该页退回「白底文字块」,构图支点缺失`); + if (!/ 也无 —— 该页退回「白底文字块」,构图支点缺失`); } } if (hubPresent.length < hubFloor) { - r22Red.push(`hub 首屏只找到 ${hubPresent.length}/${hubFloor} 页 —— 路径改名或文件被移动,本条对缺的那几页空转`); + r22Red.push(`营销页首屏只找到 ${hubPresent.length}/${hubFloor} 页 —— 路径改名或文件被移动,本条对缺的那几页空转`); } - rule({ id: "R22", name: "hub 六页首屏必须有构图支点(B 类原语或影像)", denominator: hubPresent.length, red: r22Red, - note: `找到 ${hubPresent.length}/${HUB_HERO_FILES.length} 页 · 判据 = 非注释行内出现 不算数」—— 这是本仓踩过的同一类坑 + * 第三维单独测「注释掉的 不算数」—— 这是本仓踩过的同一类坑 * (`constants.ts` 注释里的示例 import 曾骗过再导出正则)。 */ - const hubSrc = "export function Hero(){ return (
); }"; + const hubSrc = 'export function Hero(){ return (
); }'; const hubBare = "export function Hero(){ return (
纯白底文字块
); }"; // 「文件在、原语没了」= 单页判红;「文件本身缺了」= 分母缩水,靠 hubFloor 判。 // 两种失败形态分开测,否则一条闸看起来只防住了其中一半。 @@ -738,7 +758,7 @@ function selftest() { const r22Clean = r22RedFor(hubMapWithHole(null), { hubFloor: 0 }); const r22Hole = r22RedFor(hubMapWithHole(HUB_HERO_FILES[0]), { hubFloor: 0 }); const r22Commented = r22RedFor( - new Map(HUB_HERO_FILES.map((rel, i) => [rel, i === 0 ? "// " : hubSrc])), + new Map(HUB_HERO_FILES.map((rel, i) => [rel, i === 0 ? '// ' : hubSrc])), { hubFloor: 0 }, ); // 只给 5 页、地板仍是 6 ⇒ 必须判「对缺的那页空转」 @@ -749,14 +769,14 @@ function selftest() { const r22Catches = r22Hole.length === 1 && r22Hole[0].includes(HUB_HERO_FILES[0]); const r22Ignores = r22Clean.length === 0; const r22StripsComments = r22Commented.length === 1 && r22Commented[0].includes(HUB_HERO_FILES[0]); - const r22Floor = r22Short.length === 1 && r22Short[0].includes("5/6"); + const r22Floor = r22Short.length === 1 && r22Short[0].includes(`5/${HUB_HERO_FILES.length}`); if (!r22Catches || !r22Ignores || !r22StripsComments || !r22Floor) { console.log( - ` ✗ R22 不自证:缺原语判红 ${r22Catches}、齐全不误报 ${r22Ignores}、注释不算数 ${r22StripsComments}、缺页判红 ${r22Floor} ⇒ 这条闸没有约束力`, + ` ✗ R22 不自证:缺影像判红 ${r22Catches}、齐全不误报 ${r22Ignores}、注释不算数 ${r22StripsComments}、缺页判红 ${r22Floor} ⇒ 这条闸没有约束力`, ); return 1; } - console.log(" ✓ R22 四向:缺原语判红、六页齐全不误报、注释不算数、缺页按分母缩水判红"); + console.log(" ✓ R22 四向:缺影像判红、全页齐全不误报、注释不算数、缺页按分母缩水判红"); // R10 单独两侧自证:它是存量棘轮,判据是「数量 > 上限」,所以负例要按数量构造。 // 用真实 globals.css 做底,避免其它规则的红因混进来干扰这一维的读数。 diff --git a/src/app/(marketing)/about/about-content-v4.tsx b/src/app/(marketing)/about/about-content-v4.tsx index 1ae18f3a..791dfd7d 100644 --- a/src/app/(marketing)/about/about-content-v4.tsx +++ b/src/app/(marketing)/about/about-content-v4.tsx @@ -5,6 +5,7 @@ import { CTAButton } from '@/components/ui/cta-button'; import { MetricsBasisNote } from '@/components/ui/metrics-basis-note'; import { weakestBasis, type MetricBasis } from '@/lib/constants/metrics-basis'; import { ContentUnavailableState } from '@/components/ui/content-unavailable'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { Trophy, Shield, Award, Zap, @@ -52,8 +53,8 @@ function HeroSection({ data }: { data: AboutData }) { return (
-
-
+
+
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
); diff --git a/src/app/(marketing)/cases/cases-content-v3.tsx b/src/app/(marketing)/cases/cases-content-v3.tsx index cea67077..fa4375d2 100644 --- a/src/app/(marketing)/cases/cases-content-v3.tsx +++ b/src/app/(marketing)/cases/cases-content-v3.tsx @@ -8,7 +8,7 @@ import { type CaseStudy, } from '@/lib/constants/cases'; import { EARLY_ACCESS } from '@/lib/constants/company'; -import { SpanField } from '@/components/ui/span-field'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { cn } from '@/lib/utils'; const EASE_OUT = [0.22, 1, 0.36, 1] as const; @@ -198,13 +198,9 @@ export default function CasesContentV3({ - {/* B 类原语,第四组参数:六层、贴左 —— 案例页首屏此前完全没有视觉支点。 */} - + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} + diff --git a/src/app/(marketing)/contact/contact-content-v3.tsx b/src/app/(marketing)/contact/contact-content-v3.tsx index 85b7129b..4071e618 100644 --- a/src/app/(marketing)/contact/contact-content-v3.tsx +++ b/src/app/(marketing)/contact/contact-content-v3.tsx @@ -24,6 +24,7 @@ import { import { trackContactForm } from '@/lib/analytics'; import { BreadcrumbSchema } from '@/components/seo/structured-data'; import { LegacyTooltip as Tooltip } from '@/components/ui/tooltip'; +import { HeroPlate } from '@/components/ui/hero-plate'; const EASE_OUT = [0.22, 1, 0.36, 1] as const; @@ -242,8 +243,8 @@ function ContactFormContent({ data }: { data: ContactData }) { {/* Hero Section —— critique P2(2026-09-19):80vh 巨幅把转化表单推出首屏, 转化页按 DESIGN.md 紧凑档处理:无 min-h、py 收窄,表单回到首屏视野。 */}
-
-
+
+
{data.heroSubtitle && ( )}
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
diff --git a/src/app/(marketing)/insights/insights-content.tsx b/src/app/(marketing)/insights/insights-content.tsx index 49a4af77..d0312112 100644 --- a/src/app/(marketing)/insights/insights-content.tsx +++ b/src/app/(marketing)/insights/insights-content.tsx @@ -6,7 +6,7 @@ import { ScrollReveal } from '@/components/ui/scroll-reveal'; import { CTAButton } from '@/components/ui/cta-button'; import { COMPANY_INFO } from '@/lib/constants'; import { cn } from '@/lib/utils'; -import { SpanField } from '@/components/ui/span-field'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { ArrowRight } from 'lucide-react'; export type InsightKind = 'methodology' | 'case' | 'writing'; @@ -93,13 +93,9 @@ export default function InsightsContent({ entries }: { entries: InsightEntry[] } - {/* B 类原语,第六组参数:六层、线密、贴左。 */} - + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} + diff --git a/src/app/(marketing)/methodology/methodology-content.tsx b/src/app/(marketing)/methodology/methodology-content.tsx index d1ee66d0..1d2e1423 100644 --- a/src/app/(marketing)/methodology/methodology-content.tsx +++ b/src/app/(marketing)/methodology/methodology-content.tsx @@ -5,6 +5,7 @@ import { ScrollReveal, StaggerReveal } from '@/components/ui/scroll-reveal'; import { CTAButton } from '@/components/ui/cta-button'; import { CTA_LABELS } from '@/lib/constants/cta-labels'; import { EASE_OUT } from '@/components/ui/page-decoration'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { CheckCircle2 } from 'lucide-react'; interface MethodologyPhase { @@ -30,8 +31,8 @@ export function MethodologyContent({ data }: MethodologyContentProps) {
{/* Hero:品牌化定位,轻量 CTA */}
-
-
+
+
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
diff --git a/src/app/(marketing)/news/news-content-v3.tsx b/src/app/(marketing)/news/news-content-v3.tsx index 17b8bfb9..42910633 100644 --- a/src/app/(marketing)/news/news-content-v3.tsx +++ b/src/app/(marketing)/news/news-content-v3.tsx @@ -13,7 +13,7 @@ import { Search, Calendar, ArrowRight, Newspaper, ChevronLeft, ChevronRight } fr import { COMPANY_INFO } from '@/lib/constants'; import { type NewsItem } from '@/lib/constants/news'; import { SectionLabel, EASE_OUT } from '@/components/ui/page-decoration'; -import { SpanField } from '@/components/ui/span-field'; +import { HeroPlate } from '@/components/ui/hero-plate'; const categories = ['全部', '公司新闻', '研发动态']; const ITEMS_PER_PAGE = 9; @@ -147,13 +147,9 @@ export default function NewsContentV3({ news, pageCopy }: { news?: NewsItem[]; p
- {/* B 类原语,第五组参数:八层、线疏 —— 与其余五页错开,避免六页同一个图章。 */} - + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} + diff --git a/src/app/(marketing)/news/news-detail-content-v3.tsx b/src/app/(marketing)/news/news-detail-content-v3.tsx index acf39c1b..61a561be 100644 --- a/src/app/(marketing)/news/news-detail-content-v3.tsx +++ b/src/app/(marketing)/news/news-detail-content-v3.tsx @@ -10,6 +10,7 @@ import { SectionLabel, EASE_OUT } from '@/components/ui/page-decoration'; import { motion } from 'framer-motion'; import { NEWS_RELATED_LINKS, type NewsItem } from '@/lib/constants/news'; import { parseArticleBlocks, readingMinutes } from '@/lib/news-article'; +import { HeroPlate } from '@/components/ui/hero-plate'; function RelatedNewsCard({ news, index }: { news: NewsItem; index: number }) { return ( @@ -67,6 +68,8 @@ export default function NewsDetailContentV3({ news, relatedNews = [] }: NewsDeta {/* Hero Section */}
+
+
diff --git a/src/app/(marketing)/products/erp-upgrade/erp-upgrade-content-v2.tsx b/src/app/(marketing)/products/erp-upgrade/erp-upgrade-content-v2.tsx index 61c8d931..2d56bd06 100644 --- a/src/app/(marketing)/products/erp-upgrade/erp-upgrade-content-v2.tsx +++ b/src/app/(marketing)/products/erp-upgrade/erp-upgrade-content-v2.tsx @@ -17,6 +17,7 @@ import { } from 'lucide-react'; import { cn } from '@/lib/utils'; import type { ContentItem } from '@/lib/cms/types'; +import { HeroPlate } from '@/components/ui/hero-plate'; interface ErpUpgradeContentV2Props { item: ContentItem; @@ -128,7 +129,8 @@ export default function ErpUpgradeContentV2({ item }: ErpUpgradeContentV2Props)
{/* Hero Section */}
-
+
+
企业数字化升级专题 @@ -160,6 +162,11 @@ export default function ErpUpgradeContentV2({ item }: ErpUpgradeContentV2Props)
+
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
diff --git a/src/app/(marketing)/products/product-detail-content-v3.tsx b/src/app/(marketing)/products/product-detail-content-v3.tsx index daccf346..fa12c01e 100644 --- a/src/app/(marketing)/products/product-detail-content-v3.tsx +++ b/src/app/(marketing)/products/product-detail-content-v3.tsx @@ -10,6 +10,7 @@ import { SectionLabel, EASE_OUT } from '@/components/ui/page-decoration'; import type { Product } from '@/lib/constants/products'; import { MethodologyFramework, TechStackShowcase, FAQSection, DataProofSection } from '@/components/content/sections'; import { L3EmptyFallback, CaseStudiesSection, CertificationsSection } from '@/components/detail'; +import { HeroPlate } from '@/components/ui/hero-plate'; const PRODUCT_ICONS: Record = { '睿新ERP管理系统': , @@ -29,7 +30,8 @@ function DetailHero({ product }: DetailHeroProps) { return (
-
+
+
+
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
); diff --git a/src/app/(marketing)/products/products-content-v3.tsx b/src/app/(marketing)/products/products-content-v3.tsx index ef38a462..5a3c038f 100644 --- a/src/app/(marketing)/products/products-content-v3.tsx +++ b/src/app/(marketing)/products/products-content-v3.tsx @@ -6,7 +6,7 @@ import { EASE_OUT } from '@/components/ui/page-decoration'; import { StaticLink } from '@/components/ui/static-link'; import { CTAButton } from '@/components/ui/cta-button'; import { MetricsBasisNote } from '@/components/ui/metrics-basis-note'; -import { SpanField } from '@/components/ui/span-field'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { BentoGrid, BentoItem } from '@/components/sections/bento-grid'; import { ArrowRight, ArrowUpRight, Package, Cpu, TrendingUp, Users, Settings, FileText } from 'lucide-react'; import type { Product } from '@/lib/constants/products'; @@ -92,14 +92,9 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
- {/* B 类原语:承担首屏构图支点(ADR-0011 §4.2)。移动端是文字下方的一条带, - 桌面占据右 5 列;任何断点都不隐藏 —— 判据要求它「不能被 CSS 隐藏」。 */} - + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} + ); diff --git a/src/app/(marketing)/services/service-detail-content-v4.tsx b/src/app/(marketing)/services/service-detail-content-v4.tsx index a5eec2da..5af58dfd 100644 --- a/src/app/(marketing)/services/service-detail-content-v4.tsx +++ b/src/app/(marketing)/services/service-detail-content-v4.tsx @@ -15,6 +15,7 @@ import { import type { LucideIcon } from "lucide-react"; import type { Service } from "@/lib/constants/services"; import { L3EmptyFallback, CaseStudiesSection } from "@/components/detail"; +import { HeroPlate } from "@/components/ui/hero-plate"; const EASE_OUT = [0.22, 1, 0.36, 1] as const; @@ -34,8 +35,8 @@ function DetailHero({ service }: { service: Service }) { return (
-
-
+
+
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
); diff --git a/src/app/(marketing)/services/services-content-v3.tsx b/src/app/(marketing)/services/services-content-v3.tsx index c88a9ac1..508bd736 100644 --- a/src/app/(marketing)/services/services-content-v3.tsx +++ b/src/app/(marketing)/services/services-content-v3.tsx @@ -8,7 +8,7 @@ import { MetricsBasisNote } from '@/components/ui/metrics-basis-note'; import { CTA_LABELS, canonicalCtaLabel } from '@/lib/constants/cta-labels'; import type { Service, ServiceMetric } from '@/lib/constants/services'; import { weakestBasis } from '@/lib/constants/metrics-basis'; -import { SpanField } from '@/components/ui/span-field'; +import { HeroPlate } from '@/components/ui/hero-plate'; const EASE_OUT = [0.22, 1, 0.36, 1] as const; @@ -140,13 +140,9 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) { - {/* B 类原语,第三组参数:层数最少、线最疏、贴左 —— 与产品/方案两页拉开差异。 */} - + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} + ); diff --git a/src/app/(marketing)/solutions/solution-detail-content-v3.tsx b/src/app/(marketing)/solutions/solution-detail-content-v3.tsx index f47a2277..44e96035 100644 --- a/src/app/(marketing)/solutions/solution-detail-content-v3.tsx +++ b/src/app/(marketing)/solutions/solution-detail-content-v3.tsx @@ -10,6 +10,7 @@ import type { Product } from '@/lib/constants/products'; import { L3EmptyFallback, CaseStudiesSection, CertificationsSection } from '@/components/detail'; import { ResultsSlot } from '@/components/sections/results-slot'; import type { CaseStudy } from '@/lib/constants/cases'; +import { HeroPlate } from '@/components/ui/hero-plate'; /** 共创阶段的可验证事实 —— 与首页同一份语义,不冒充案例 */ const CO_CREATION_STEPS = [ @@ -57,7 +58,8 @@ function DetailHero({ solution }: DetailHeroProps) { 顺带收成单一容器 primitive:max-w-container + mx-auto + 三档 px 与 .container-x 本身重复(它已含 width/max-width/margin/padding),两套 gutter 同时在线是 计划 §6.5 点名的病。 */} -
+
+
+
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
); diff --git a/src/app/(marketing)/solutions/solutions-content-v3.tsx b/src/app/(marketing)/solutions/solutions-content-v3.tsx index 2d224a62..5547daeb 100644 --- a/src/app/(marketing)/solutions/solutions-content-v3.tsx +++ b/src/app/(marketing)/solutions/solutions-content-v3.tsx @@ -7,7 +7,7 @@ import { CTAButton } from '@/components/ui/cta-button'; import { MetricsBasisNote } from '@/components/ui/metrics-basis-note'; import { CTA_LABELS, canonicalCtaLabel } from '@/lib/constants/cta-labels'; import { weakestBasis } from '@/lib/constants/metrics-basis'; -import { SpanField } from '@/components/ui/span-field'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { type Solution } from '@/lib/constants/solutions'; import type { Product } from '@/lib/constants/products'; @@ -88,13 +88,9 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
- {/* B 类原语,第二组参数(ADR-0011 §4.2):层数更多、水平线更密。 */} - + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} + ); diff --git a/src/app/(marketing)/team/team-content-v3.tsx b/src/app/(marketing)/team/team-content-v3.tsx index 6b792ba1..fed0f5fe 100644 --- a/src/app/(marketing)/team/team-content-v3.tsx +++ b/src/app/(marketing)/team/team-content-v3.tsx @@ -6,6 +6,7 @@ import { CTAButton } from '@/components/ui/cta-button'; import { ContentUnavailableState } from '@/components/ui/content-unavailable'; import { Shield, Building2, Users, Code, Target, Layers, BookOpen, Sparkles, type LucideIcon } from 'lucide-react'; import { EASE_OUT } from '@/components/ui/page-decoration'; +import { HeroPlate } from '@/components/ui/hero-plate'; import { useReducedMotion } from '@/hooks/use-reduced-motion'; /** Icon name-to-component mapping for CMS string-based icons */ @@ -142,8 +143,8 @@ export default function TeamContentV3({ data }: { data: Record
{/* ============ L1: Hero 团队情感入口 ============ */}
-
-
+
+
{/* 眉标 Badge */} )}
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
diff --git a/src/components/detail/detail-page-hero.tsx b/src/components/detail/detail-page-hero.tsx index 8aa5cc0b..730b4191 100644 --- a/src/components/detail/detail-page-hero.tsx +++ b/src/components/detail/detail-page-hero.tsx @@ -1,4 +1,5 @@ import { CTAButton } from '@/components/ui/cta-button'; +import { HeroPlate } from '@/components/ui/hero-plate'; import type { HeroTheme } from '@/lib/constants/hero-themes'; /** @@ -52,7 +53,8 @@ export function DetailPageHero({ return (
-
+
+
{/* 产品线视觉身份的唯一落点:3px × 24px 短线。 色值来自真源(hero-themes.ts),此处只做透传 —— check:accents 判据 B 登记在此。 */} @@ -94,6 +96,11 @@ export function DetailPageHero({ )}
)} +
+ + {/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。 + 移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */} +
); diff --git a/src/components/ui/hero-plate.test.tsx b/src/components/ui/hero-plate.test.tsx new file mode 100644 index 00000000..dc52311d --- /dev/null +++ b/src/components/ui/hero-plate.test.tsx @@ -0,0 +1,43 @@ +import { render } from '@testing-library/react'; +import '@testing-library/jest-dom'; +import { HeroPlate } from './hero-plate'; + +/** + * 判据只锁三件事: + * ① 装饰位语义:aria-hidden + `alt=""`(不承载信息,读屏不该读它); + * ② 题材受控:只接受四张登记在案的片子,防止有人临时塞一张任意图; + * ③ 不接交互、不加品牌红面积。 + */ +describe('HeroPlate', () => { + it('一律 aria-hidden,且不接任何交互', () => { + const { container } = render(); + const el = container.firstElementChild as HTMLElement; + expect(el).toHaveAttribute('aria-hidden', 'true'); + expect(el.className).toContain('pointer-events-none'); + }); + + it('图片是空的 alt(装饰位),并且指向登记过的本地资产', () => { + const { container } = render(); + const img = container.querySelector('img'); + expect(img).not.toBeNull(); + expect(img).toHaveAttribute('alt', ''); + // next/image 会把 src 改写成 /_next/image?url=…,断言前需要解码 + const src = decodeURIComponent(img?.getAttribute('src') ?? ''); + expect(src).toContain('/images/hub/glass.webp'); + }); + + it('四个 variant 各自落到不同的文件(不是同一个图章)', () => { + const srcOf = (variant: 'facade' | 'glass' | 'hall' | 'truss') => { + const img = render().container.querySelector('img'); + return decodeURIComponent(img?.getAttribute('src') ?? ''); + }; + const all = [srcOf('facade'), srcOf('glass'), srcOf('hall'), srcOf('truss')]; + expect(new Set(all).size).toBe(4); + all.forEach((src) => expect(src).toContain('/images/hub/')); + }); + + it('外部 className 原样并入(控制占位尺寸)', () => { + const { container } = render(); + expect((container.firstElementChild as HTMLElement).className).toContain('h-40 w-full'); + }); +}); diff --git a/src/components/ui/hero-plate.tsx b/src/components/ui/hero-plate.tsx new file mode 100644 index 00000000..84b45137 --- /dev/null +++ b/src/components/ui/hero-plate.tsx @@ -0,0 +1,62 @@ +import Image from 'next/image'; +import { cn } from '@/lib/utils'; + +/** + * HeroPlate —— 首屏影像片(A 类,ADR-0011 §4.1):本地生成的建筑静帧。 + * + * 为什么从矢量原语换成影像(2026-12-01 用户裁定): + * 第一版按 ADR 的「层叠体块 + 水平线」做了一件抽象原语(`span-field.tsx`), + * 上线前被判「不好看」——诊断是**语义错位**:浅底上的灰阶堆叠读起来是骨架屏/条形图, + * 而不是建筑。对标的建筑感来自透视与材质,矢量剪影给不了这两个东西。 + * 于是回到 ADR 允许的另一条路:A 类本地生成影像(首页 `hero-architecture.webp` 已是先例)。 + * + * 准入四条(A 类):无人物 / 无可读文字 / 无客户或第三方标识 / 不暗示真实客户现场。 + * 四张图的题材都是抽象结构(混凝土肋、玻璃幕墙、工业厂房、钢桁架), + * 不含任何可辨识地标——ADR-0011 §3 禁的那一类(九天楼及其变体)一条都不沾。 + * + * 边界: + * - 一律 `aria-hidden` + `alt=""`:装饰位,不进证据位。 + * - `object-cover` + 4:5 竖构图:桌面吃右列,移动端裁成横幅带,同一个文件两用。 + * - 不做 hover / 不做视差 / 不加品牌红:面积纪律与动效约束都按既有门禁走。 + */ + +const PLATES = { + /** 混凝土竖肋立面:最接近「结构感」,用于产品族。 */ + facade: '/images/hub/facade.webp', + /** 玻璃幕墙:冷静、反射、无地标,用于方案族与联系页。 */ + glass: '/images/hub/glass.webp', + /** 工业厂房内景:纵深与柱列,用于服务族与团队页。 */ + hall: '/images/hub/hall.webp', + /** 钢桁架细部:高对比几何,用于案例/新闻/方法论。 */ + truss: '/images/hub/truss.webp', +} as const; + +export type HeroPlateVariant = keyof typeof PLATES; + +export function HeroPlate({ + variant = 'facade', + className, + priority = false, +}: { + variant?: HeroPlateVariant; + /** 只控制占位尺寸(高度/列宽);比例由图片自身 4:5 决定。 */ + className?: string; + /** 首屏以上的图片可置 true,其余交给默认懒加载。 */ + priority?: boolean; +}) { + return ( + + ); +} diff --git a/src/components/ui/span-field.test.tsx b/src/components/ui/span-field.test.tsx deleted file mode 100644 index abed06d2..00000000 --- a/src/components/ui/span-field.test.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { render } from '@testing-library/react'; -import '@testing-library/jest-dom'; -import { SpanField } from './span-field'; - -/** - * 原语的判据只锁 ADR-0011 允许它存在的理由,不锁实现细节: - * ① 一律 aria-hidden 且不接交互(它是装饰位,不是证据位); - * ② 不含品牌红(B 类原语只走 currentColor,否则 R16 的面积纪律会被绕过); - * ③ 层数受控(2–9),参数不同必须真的画得不一样 —— 六页复用一件原语的前提是 - * 「参数能拉开差异」,否则就是六个一样的图章; - * ④ align 两档镜像(体块贴边与脊线同时翻转)。 - */ -describe('SpanField', () => { - it('一律 aria-hidden,且不接任何交互', () => { - const { container } = render(); - const el = container.firstElementChild as HTMLElement; - expect(el).toHaveAttribute('aria-hidden', 'true'); - expect(el.className).toContain('pointer-events-none'); - }); - - it('不含品牌红:颜色只走 currentColor,不出现品牌色变量', () => { - const { container } = render(); - const html = container.innerHTML; - expect(html).not.toMatch(/--color-brand/); - expect(html).not.toMatch(/#C41E3A/i); - expect(container.querySelectorAll('rect').length).toBeGreaterThan(0); - Array.from(container.querySelectorAll('rect')).forEach((rect) => { - expect(rect.getAttribute('fill')).toBe('currentColor'); - }); - }); - - it('层数受控:默认 5 层 + 1 条脊线,参数不同则几何不同', () => { - const five = render().container; - const eight = render().container; - const countSlabs = (root: HTMLElement) => - root.querySelectorAll('rect').length - 1; // 减掉脊线 - expect(countSlabs(five)).toBe(5); - expect(countSlabs(eight)).toBe(8); - expect(five.querySelector('svg')?.getAttribute('viewBox')).not.toBe( - eight.querySelector('svg')?.getAttribute('viewBox'), - ); - }); - - it('层数越界时收进 2–9,不产生空图', () => { - const low = render().container; - const high = render().container; - expect(low.querySelectorAll('rect').length - 1).toBe(2); - expect(high.querySelectorAll('rect').length - 1).toBe(9); - }); - - it('align 两档镜像:首块 x 与脊线位置同时翻转', () => { - const left = render().container; - const right = render().container; - const firstSlabX = (root: HTMLElement) => - Number(root.querySelectorAll('rect')[1]?.getAttribute('x') ?? NaN); - const spineX = (root: HTMLElement) => - Number(root.querySelector('rect')?.getAttribute('x')); - expect(firstSlabX(left)).toBeLessThan(firstSlabX(right)); - expect(spineX(left)).toBe(0); - expect(spineX(right)).toBeGreaterThan(0); - }); - - it('密度档位控制水平线条数(不多画、不少画)', () => { - const countLines = (density: 'sparse' | 'regular' | 'dense') => - render().container.querySelectorAll('line').length; - expect(countLines('sparse')).toBe(2); - expect(countLines('regular')).toBe(4); - expect(countLines('dense')).toBe(6); - }); - - it('外部 className 原样并入(用于控制占位尺寸)', () => { - const { container } = render(); - expect((container.firstElementChild as HTMLElement).className).toContain('h-40 w-full'); - }); -}); diff --git a/src/components/ui/span-field.tsx b/src/components/ui/span-field.tsx deleted file mode 100644 index 620156a3..00000000 --- a/src/components/ui/span-field.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { cn } from '@/lib/utils'; - -/** - * SpanField —— B 类自有矢量原语(ADR-0011 §4.1/§4.2):层叠体块 + 水平线的建筑抽象。 - * - * 它要解决的问题不是「缺张好看的图」,而是一个结构缺口:hub 六页的引言区此前 - * 只有白底文字块,没有任何承担构图的元素(`public/images/hub/` 自 2026-11-02 建目录起 - * 始终 `total 0`)。ADR-0011 把 `OPEN-01` 的资产路线从「生成 ~10 张氛围照片」改判为 - * 「1 件原语 + 6 组参数」,理由是纯装饰的抽象几何在本仓被弃用过一次 - * (`ui/brand-visuals.tsx` 的 GeometricDecoration 零非测试消费者), - * ⇒ **原语必须承担构图功能,而不是当背景花纹**。 - * - * 边界(B 类准入四条的第三条): - * - **不含任何可辨识建筑的造型**:只有矩形体块与直线,没有坡顶、没有飞檐、没有塔身、 - * 没有可读文字;体块宽度/错位取自固定序列,不做随机(随机会让视觉基线逐次抖动)。 - * - 一律 `aria-hidden`:它不承载信息,读屏不该知道它存在。 - * - 不碰品牌红:颜色只走 `currentColor`(`text-ink`),面积纪律因此天然满足(R16 零命中)。 - * - 零圆角/零投影/零 hover(R13–R15):rect 不带 rx,SVG 不挂 shadow。 - * - * 为什么用 SVG 而不是渐变:渐变画不出「体块之间的缝」,而缝才是这套语法的骨。 - */ - -export type SpanFieldDensity = 'sparse' | 'regular' | 'dense'; -export type SpanFieldAlign = 'left' | 'right'; - -/** 体块高度与行距(viewBox 单位,非像素;实际尺寸由外层高度决定)。 */ -const SLAB_H = 46; -const SLAB_GAP = 28; -const VB_W = 320; - -/** 宽度占比序列:够长,六页各取不同 `layers` 就不会撞成同一张图。 */ -const WIDTH_SEQ = [0.62, 0.9, 0.48, 0.76, 0.56, 0.84, 0.7, 0.44, 0.66]; -/** 错位占比序列:0 = 贴齐对齐边,越大越往内缩。 */ -const OFFSET_SEQ = [0, 0.14, 0.04, 0.22, 0.08, 0.3, 0.02, 0.18, 0.1]; -/** 水平线条数:密度档位。 */ -const HAIRLINE_COUNT: Record = { sparse: 2, regular: 4, dense: 6 }; - -export function SpanField({ - layers = 5, - density = 'regular', - align = 'right', - className, -}: { - /** 体块层数(2–9)。承载页面「密度」,六页各取不同值。 */ - layers?: number; - /** 背景水平线的疏密。 */ - density?: SpanFieldDensity; - /** 对齐边:决定体块贴哪一侧,以及竖向脊线的位置。 */ - align?: SpanFieldAlign; - /** 只用于控制占位尺寸(高度/列宽),不参与几何定义。 */ - className?: string; -}) { - const n = Math.min(9, Math.max(2, Math.round(layers))); - const rowH = SLAB_H + SLAB_GAP; - const vbH = n * rowH - SLAB_GAP; - - const slabs = Array.from({ length: n }, (_, i) => { - // 序列长度固定且非空,`?? ` 分支只是给 noUncheckedIndexedAccess 一个出口。 - const w = (WIDTH_SEQ[i % WIDTH_SEQ.length] ?? 0.6) * VB_W; - const offset = (OFFSET_SEQ[i % OFFSET_SEQ.length] ?? 0) * (VB_W - w); - return { - x: align === 'right' ? VB_W - w - offset : offset, - y: i * rowH, - w, - // 越往下越淡:视线从顶部体块开始读,底部退成底纹。 - opacity: Number((0.82 - (i / Math.max(1, n - 1)) * 0.6).toFixed(2)), - }; - }); - - const hairlineCount = HAIRLINE_COUNT[density]; - const hairlines = Array.from( - { length: hairlineCount }, - (_, i) => ((i + 0.5) * vbH) / hairlineCount, - ); - - return ( - - ); -}