refactor(marketing): 营销面影像整批退役,正文改内容图、首屏改纯排版
四次否决指向同一件事:照片不承担语义。抽象几何(无出处)、建筑混凝土(与业务无关)、 技术静物(与文案无关)、首屏建筑四图(同上)——每次都不是题材没选好,而是「先立密度指标 再去为指标找图」这个顺序错了。参考站的影像密度来自真实项目摄影,本仓没有这类素材, 零编造也不许造,任何替代品都只能是装饰。 正文(R23 改判载体): - 新增 ui/stage-index.tsx:条目按序号排成脊线,withDetail 时拆「标题:说明」, 数据全部来自 product.process / solution.solutions / service.process; 整块 aria-hidden(它是索引,不让屏幕阅读器把同一份文字读两遍) - 新增 ui/band-index.tsx:满幅文字索引带,替代原 t-b 影像带; /solutions 取方案清单(meta 用 subtitle,避免与下方卡片 h3 重复)、/news 取标题 - 落点:三个详情模板 + /solutions + /news;/cases 零数据不渲染且不进登记表(零渲染页=假锚) - 撤除:/products「企业套装」、/services、/insights 三个偏移位(所在区块没有可承载条目) 首屏(R22 判据掉头): - 16 个首屏文件移除 <HeroPlate>(覆盖 18 条路由),文本列收成整行,内部 max-w 继续管字宽 - 删除 ui/hero-plate.tsx 与 public/images/hub/**(4 张) - R22 从「必须有影像片」改为「零影像,出现即判红」;自证改五向 (HeroPlate 回潮 / Image 回潮 / 干净页不误报 / 注释不算数 / 缺页分母缩水) 判据与文档: - R23 分母 9→5、R25 上限 8→5(同步分母),R12 自证夹具改为从 ASPECT_MEASURED 派生 (此前手抄四键,加 portrait 后自证恒红,说明 B1「check:visual EXIT=0」的宣称不成立) - R23/R25 负例从已退出登记的 /products 移到 /news(否则自证报「R25 未被抓到」) - LEDGER 重写为影像退役记账;计划补「B3 改判」「首屏去板」两节 门禁:check:grammar 25/25 + selftest EXIT=0 · tsc 0 · eslint 0 error · jest 161 套件/1891 例 · e2e:fast 59 passed(25 skipped 为 dev 下 GA4 组,既有口径)
This commit is contained in:
1 parent
84ac9b2123
commit
498a0cad3f
29 files changed
+1046
-285
No files matched your search
@@ -0,0 +1,420 @@
|
||||
# 2026-12-01 · 差距补全实施计划 **v2**(impeccable 评估后修订)
|
||||
|
||||
- 基线:`feat/porsche-ui-replica` @ `84ac9b21`(工作树含 2 处文档修正,见 §10)
|
||||
- 目标:**参考保时捷咨询的设计思路、交互、动效**,不追求像素级复刻
|
||||
- v1 见 git 历史;本版是设计评审后的重写,不是润色
|
||||
|
||||
## v1 → v2 的五条实质改动
|
||||
|
||||
| # | v1 的问题 | v2 的改法 |
|
||||
|---|---|---|
|
||||
| 1 | **指标错位**:M2 只数「页面有没有正文影像」,不判「影像承担什么构图」 | 改为**构型判据**:三个登记过的构图型(T-A/T-B/T-C),每页必须命中指定型;同型不得相邻 |
|
||||
| 2 | **无记忆点**:加满 9 页影像后仍可能「像 AI 做的」 | 明确差异化支点 = **贯穿带(bleed band)**,全站只上 3 处 |
|
||||
| 3 | **动效方向错**:6% 持续视差是装饰,且与 CONTEXT.md「每个动效必须服务内容」冲突 | 改为**一次性揭示 + 终态静止**;持续位移只留给贯穿带且 ≤4% |
|
||||
| 4 | **排版轴缺席**:`DisplayStatement` 全站只有 1 个消费者,页级断言仍裸写 `text-6xl` | 新增轻量 P1.5:目标页断言统一走 `DisplayStatement`,加 R25 守门 |
|
||||
| 5 | **验收只有机器读数**:没有「人眼」环节 | P4 增 **AI slop 盲测**与**同构并排检查**,任一不过即返工构图 |
|
||||
|
||||
---
|
||||
|
||||
## 0. 一页结论
|
||||
|
||||
| 缺口 | 现状(本树实测) | v2 目标 | 阶段 |
|
||||
|---|---|---|---|
|
||||
| G1 影像密度 | 营销面 `<Image` **6 处**(home 4 + brand 2)+ 首屏 `HeroPlate` 16 页;**正文影像 0 处** | 首屏 **18/18**;正文 **9 页 × 1 构型位**(三型配额);全站落点 **≥27** | P1/P2 |
|
||||
| G2 滚动编排 | 只有 `whileInView` 淡入;无滚动驱动状态 | 1 件编排原语 + 3 处贯穿带落点;一次性揭示,终态静止 | P3 |
|
||||
| G3 判据覆盖 | `check:grammar` **22 条**;不覆盖构型、编排、字阶用法 | **≥25 条**(R23/R24/R25)+ 四向自证 | P0 |
|
||||
|
||||
**口径更正(沿用 v1)**:`evaluation.md` §4「12 个详情页无图」**已过期**。详情模板都有首屏影像;
|
||||
真正无首屏影像的只有 **2 条路由**(`/products/erp-upgrade-v3`、`/products/standalone/[id]`,
|
||||
走 `DetailPageHero`,`detail-page-hero.tsx:64` 只有 `accentColor` 色块)。
|
||||
|
||||
---
|
||||
|
||||
## 0.5 原语盘点(v2.1 修订:砍掉一个新建原语)
|
||||
|
||||
开工前盘了一遍现有 `ui/`,结论直接改了两处范围:
|
||||
|
||||
`src/components/ui/image-module.tsx` 已经具备:比例令牌(`IMAGE_RATIOS`)、**视差 8%**、
|
||||
**Ken Burns 1.06 / 12s 一次播完**、压暗层 `overlay`、reduce 短路、SSR 首帧对齐、`aria-hidden`。
|
||||
**但它零消费者**——`node scripts/dead-modules.mjs` 判「零引用」。
|
||||
|
||||
这是继 `brand-visuals`(抽象几何)、`span-field`(矢量构图)之后**第三件做完没人用的视觉原语**。
|
||||
所以:
|
||||
|
||||
1. **P1 不新建 `ScrollBand`**,改为「复活 `ImageModule` + 一层薄壳 `EditorialFigure`」。
|
||||
薄壳只决定构型、列宽、对齐、题注,不碰动效。
|
||||
2. **P3 的动效参数作废**(v2 写的 280ms / 4% 是我凭空定的):`ImageModule` 用的已是
|
||||
ADR-0004 批准的档位(Ken Burns 一次播完、视差略高于 ADR 下限)。**沿用现成规格,不另立一套**,
|
||||
我只按页决定启不启用。
|
||||
3. **R24 白名单是三个既有文件**,不是新建文件:
|
||||
`ui/image-module.tsx`(允许)、`sections/story-stage.tsx`、`sections/case-detail-page.tsx`(存量豁免)。
|
||||
4. **判据上线方式**:R23/R25 若 0 容忍,`check:grammar` 立刻红 9 页、把仓库封住。
|
||||
改为**递减棘轮**(与 ADR-0013 / R16 同款):当前上限 = 9 页未达,每批下调,归零后锁死。
|
||||
|
||||
---
|
||||
|
||||
## 1. 设计论点(先定这个,再谈实现)
|
||||
|
||||
> 对标的不是「保时捷长什么样」,是它的**论证方式**:用影像立结构,用数字立证据,用一处红立决断。
|
||||
|
||||
- **论点**:每页三段 —— **结构(影像)→ 证据(指标/事实)→ 决断(CTA)**。
|
||||
影像是**结构件**,不是配图;因此它必须有固定构型、固定配额、固定落位,不能自由摆放。
|
||||
- **记忆点(唯一)**:**贯穿带** —— 一条横贯视口的影像带,带内左下角一枚 mono 索引 + 一行断言行。
|
||||
全站只上 3 处(`/solutions` `/cases` `/insights`)。它的作用是**打断栅格节奏**:
|
||||
其余页面都是 1360 容器内的分栏,只有这三页把画面推到边缘。
|
||||
- **反 slop 红线**(新增块一律不许):
|
||||
1. 图标 + 标题 + 副文案的三件套卡
|
||||
2. 毛玻璃、渐变文字、发光描边
|
||||
3. 影像 hover 放大 / 跟随鼠标
|
||||
4. 同一构图型连续出现两页
|
||||
5. 影像承担证据语义(客户、现场、成果)
|
||||
6. 人物、手、办公室、握手类题材
|
||||
|
||||
---
|
||||
|
||||
## 2. 现状取证(可复算)
|
||||
|
||||
| 事实 | 命令 | 读数 |
|
||||
|---|---|---|
|
||||
| 营销路由 | `find "src/app/(marketing)" -name page.tsx \| wc -l` | **20** |
|
||||
| 首屏支点 | `check:grammar` R22 | `16/16` |
|
||||
| 正文影像 | `grep -rn "<Image" "src/app/(marketing)"` | **6 处**(home 4 + brand 2) |
|
||||
| 字阶高档位 | `grep -rn "text-display\|text-statement"` | `text-display` **0** 次、`text-statement` **1** 次(仅 `ui/display-statement.tsx`) |
|
||||
| 首屏标题实现 | `products-content-v3.tsx:48` | `lg:text-6xl font-bold tracking-tighter leading-[0.95]`(1024 起 ≈81px,**尺寸已对齐**对标 80px 档) |
|
||||
| 语法闸 | `check:grammar` | **22/22** |
|
||||
| 动效违规 | `check:motion` | **0**(267 文件 / 216 时长字面量) |
|
||||
| 视觉基线 | `git ls-files e2e/visual-snapshots \| wc -l`;`du -sh` | **227 张 / 478MB**(单张 ≈2.1MB) |
|
||||
| 全量 E2E | 4 project(2026-12-01 19:02) | **1106 passed / 2 failed / 44 skipped** |
|
||||
|
||||
> 排版结论先说:**尺寸不是问题**(81px 已在对标 80px 档),问题是**用法不统一**——
|
||||
> `DisplayStatement` 有实现、有测试、只 1 个消费者,其余页级断言裸写 `text-6xl`。
|
||||
> 所以 P1.5 只做统一,不做字阶重排;这一条直接避免了 18 页的排版返工。
|
||||
|
||||
**基线是最大的成本项**:单页 5 project ≈ **10.5MB**。这是 D4 分批上限的唯一依据。
|
||||
|
||||
---
|
||||
|
||||
## 3. 构图三型(v2 的核心新增)
|
||||
|
||||
| 型 | 形态 | 用途 | 页 | 与文本的关系 |
|
||||
|---|---|---|---|---|
|
||||
| **T-A 分栏** | 3:2 影像占 5 列 / 文本 7 列;影像顶边对齐文本首行下 **24px** | 产品族、三个详情模板 | `/products` + 3 详情模板 | 文本先读、影像右证 |
|
||||
| **T-B 贯穿带** | 100vw 满幅、高 **42–48vh**;带内左下 mono 索引(`01 / 06`)+ 一行断言行 | 方案/案例/洞察 | `/solutions` `/cases` `/insights` | 打断容器节奏,作为**章节分界** |
|
||||
| **T-C 偏移板** | 4:5 竖幅偏右 **1 列**,左侧留 2 列空白 | 服务族、新闻 | `/services` `/news` | 空白承担停顿,影像不抢首读 |
|
||||
|
||||
规则(写成 R23 的判据):
|
||||
|
||||
1. 每页**恰好 1 处**正文构型(不叠加第二处,防堆图)。
|
||||
2. `PAGE_COMPOSITION` 常量表登记「页 → 型」,R23 逐页比对,**错型也判红**(不只是缺图)。
|
||||
3. **相邻导航页不得同型**:`/products`(A) → `/solutions`(B) → `/services`(C) 天然错开;
|
||||
`/cases`(B) 与 `/insights`(B) 相邻,故 `/insights` 退为 T-C。
|
||||
最终表:products A · solutions B · services C · cases B · insights C · news C · 详情模板 A。
|
||||
4. 贯穿带内的 mono 索引与断言整块 `aria-hidden`(纯装饰),**不进 heading 结构**,
|
||||
避免 `check:headings` 分母变化。
|
||||
5. 影像一律 `aria-hidden` + `alt=""`(ADR-0011 §4.1:不承担证据位)。
|
||||
|
||||
---
|
||||
|
||||
## 4. 阶段
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
P0[P0 判据 22→25<br/>零像素] --> P1[P1 资产 8 张]
|
||||
P1 --> P1b[P1.5 断言件统一]
|
||||
P1b --> P2[P2 铺页 3 批]
|
||||
P2 --> P3[P3 编排 3 处]
|
||||
P3 --> P4[P4 收口 + 人眼盲测]
|
||||
```
|
||||
|
||||
### P0 · 判据先行(零像素,必须先红)
|
||||
|
||||
| 任务 | 内容 | 判据 |
|
||||
|---|---|---|
|
||||
| T0-1 | **R23 构型守卫**:`PAGE_COMPOSITION` 表 + 每页须命中对应 `EditorialFigure variant` | 棘轮上限 **9 页未达**(当前树 0/9);每批下调,归零后锁死 |
|
||||
| T0-2 | **R24 滚动 API 白名单**:`useScroll` / `useTransform` / `useMotionValueEvent` 只许出现在 3 个登记文件 | 当前树已 0 违规(白名单 = `ui/image-module.tsx` + 2 个存量 `sections/*`),**0 容忍**;夹具双向 |
|
||||
| T0-3 | **R25 断言件统一**:9 个目标页**禁用裸 `text-6xl` / `text-7xl`**,页级断言须走 `DisplayStatement` | 旧树实测 **8/9 文件含 6xl/7xl 类名**(`insights-content.tsx` 为 0)⇒ 预期判红 ≥7 页,逐页记录 |
|
||||
| T0-4 | R12 扩:读**真实图片**宽高比(`image-size`)与 `src/lib/constants/image-ratios.ts` 对账 | 现状只对账 token 数字(ADR-0011 §2.2 已记盲区) |
|
||||
| T0-5 | `check:grammar:selftest` 补 R23/R24/R25 四向(缺型 / 齐 / 注释掉 / 缺页) | `--selftest` EXIT=0 |
|
||||
|
||||
**P0 完成判据**:三条新闸在**当前树全部判红**,且自证四向全过。任一新闸在旧树直接绿 ⇒ 返工。
|
||||
|
||||
### P1 · 资产与原语(复活,不新建)
|
||||
|
||||
- **原语**:`ImageModule` 直接复用(已有视差/Ken Burns/overlay/reduce);新增
|
||||
`src/components/ui/editorial-figure.tsx` 只做**构型层**:定列宽、对齐基准、题注、变体(T-A/B/C),
|
||||
内部渲染 `ImageModule`。**不重写动效**。
|
||||
- **资产**:8 张 A 类 webp,题材四分**每类 2 张**:材料细部 / 工业纵深 / 结构几何 / 光与界面。
|
||||
明暗各半(至少 3 张深底),否则整站是「浅灰白 + 亮图」的同一调子。
|
||||
- 先出 **2 张样张**(一张深底、一张材料细部)交你裁决,通过再批量。
|
||||
> 2026-12-01 第一版(B 类矢量)批量做完才被否,代价是整轮返工。
|
||||
- 准入四条 + 清洗流程沿用 §26.7(裁底部 8% 水印 → webp ≤220KB → 源 PNG 不入库)。
|
||||
- 新建 `public/images/LEDGER.md`:生成方式 / 日期 / 尺寸 / 字节 / 准入自查 / 落点页。
|
||||
- **反向守卫**:`EditorialFigure` 落地后,若 `ImageModule` 仍零消费者,R23 判红 —— 防「薄壳做了、
|
||||
基座又死一次」。
|
||||
|
||||
### P1.5 · 断言件统一(低风险)
|
||||
|
||||
`DisplayStatement` 已存在且有测试,只做替换:9 个目标页的页级断言改用它(尺寸不变,仍是 81px 档),
|
||||
换掉裸 `text-6xl`。**不改任何尺寸、不改字重**,因此视觉基线只可能因行高微差而变——
|
||||
若实测零差异,本阶段不产生基线写入。
|
||||
|
||||
### P2 · 铺页(3 批,不是 5 批)
|
||||
|
||||
| 批 | 页 | 型 | 基线写入 |
|
||||
|---|---|---|---|
|
||||
| **B1** | `/products` `/solutions` `/services` | A / B / C | 15 张 |
|
||||
| **B2** | `/cases` `/insights` `/news` | B / C / C | 15 张 |
|
||||
| **B3** | 三个详情模板 + 2 条无影像路由首屏 | A ×3 + 首屏补图 | 25 张 |
|
||||
|
||||
单批上限 **6 页 / 30 张 ≈63MB**(单页 5 project ≈10.5MB)。超限必撞 413(2026-12-01 已发生)。
|
||||
|
||||
每批固定动作:改页 → R23 由红转绿(只绿本批)→ `test:e2e:fast` → 视觉**只读**复跑
|
||||
(应只红本批)→ 逐页归因 → 采基线 → 独立只读复跑 0 failed 才进下一批。
|
||||
|
||||
### P3 · 编排(沿用现成原语,不新造参数)
|
||||
|
||||
| 项 | 规格(全部来自既有实现 / ADR-0004) |
|
||||
|---|---|
|
||||
| 主效果 | `ImageModule` 的 `kenBurns`:scale 1.00→**1.06**,**一次播完**(12s),终态停住,不循环 |
|
||||
| 贯穿带 | `parallax`:位移 **8%**(ADR-0004 给的是 5–15% 弱档,取偏保守值),仅 `no-preference` 且非 reduce |
|
||||
| reduce | `ImageModule` 已短路为静态图,无「先动一下再停」 |
|
||||
| 禁止 | `pin`(改文档流高度,毁基线捕获落点)、循环、弹簧、鼠标跟随、hover 放大 |
|
||||
| 不新增 | 不写 `ScrollBand`、不改 280ms / 4% 这类我自定的数(v2 已作废) |
|
||||
|
||||
按页决定「启不启用」:T-B 贯穿带启用 `parallax + kenBurns`;T-A / T-C 只启 `kenBurns`。
|
||||
契约同步:`CONTEXT.md` 动效节补一行「影像动效 = ADR-0004 档位,页面只决定启停」;
|
||||
`check:motion` 扩扫 `useTransform` 位移字面量(T0-4 已铺路)。
|
||||
|
||||
### P4 · 收口
|
||||
|
||||
| 任务 | 判据 |
|
||||
|---|---|
|
||||
| T4-1 **AI slop 盲测** | 5 张截图(去 logo)交 2 个独立评审(人或 agent),问「像 AI 做的吗」;**≥2 判「是」→ 返工构图**(不是调色) |
|
||||
| T4-2 **同构并排检查** | 相邻页截图并排,若一眼同构 → 改型,不改间距 |
|
||||
| T4-3 `uj-08` 根因 | cookie 横幅拦截导航点击;先复现再判(横幅过高 or 夹具未关)。**不得加 `force:true` 变绿** |
|
||||
| T4-4 `p3-compatibility` firefox triage | 非 firefox 全绿 ⇒ 环境差异;chromium 也复现 ⇒ 按缺陷修 |
|
||||
| T4-5 基线负对照(C6) | 故意改 1px → 只读跑必须红在该页 → 回滚 |
|
||||
| T4-6 文档 | qa-tracker §27、ADR-0011 §8.5、`DESIGN.md` 影像节、PR #65 正文 |
|
||||
|
||||
---
|
||||
|
||||
## 5. 验收(机器 + 人眼两层)
|
||||
|
||||
| 层 | 项 | 通过线 |
|
||||
|---|---|---|
|
||||
| 机器 | `check:grammar` | **≥25/25 / EXIT=0** |
|
||||
| 机器 | `check:motion` | 0 违规 |
|
||||
| 机器 | `test:all` | EXIT=0 |
|
||||
| 机器 | 视觉只读 | 0 failed |
|
||||
| 机器 | 全量 E2E | 非 firefox 0 红 |
|
||||
| 人眼 | slop 盲测 | ≤1 人判「像 AI」 |
|
||||
| 人眼 | 同构并排 | 相邻页可区分 |
|
||||
|
||||
> Nielsen 十项快评只记录不作为门禁:本计划改的是表达层,不改任务流,
|
||||
> 用它当门禁会把「影像是否好看」误判成「系统是否好用」。
|
||||
|
||||
---
|
||||
|
||||
## 6. 裁定记录(2026-12-01 19:21 · 全按推荐)
|
||||
|
||||
| ID | 问题 | 裁定 |
|
||||
|---|---|---|
|
||||
| D1 | 构型覆盖 | **A 9 页三型**(products A · solutions B · services C · cases B · insights C · news C · 详情模板 A) |
|
||||
| D2 | 记忆点 | **A 贯穿带 3 处**(solutions / cases / insights) |
|
||||
| D3 | 编排 | **A** 且按 §0.5 修订:沿用 `ImageModule` 的 ADR-0004 档位,不新造参数 |
|
||||
| D4 | 基线批量 | **A 6 页/批** |
|
||||
| D5 | R-1 | **A 本轮不修只登记** |
|
||||
| D6 | P1.5 断言件统一 | **A 本轮做** |
|
||||
|
||||
改判条件(写死,防中途漂移):只有「盲测判像 AI 且换型无效」或「`ImageModule` 复活失败」
|
||||
两种情况允许回退到 B 选项,且须记入 qa-tracker。
|
||||
|
||||
---
|
||||
|
||||
## 7. 风险与回滚
|
||||
|
||||
| 风险 | 触发信号 | 处置 |
|
||||
|---|---|---|
|
||||
| 生成图再次被否 | 2 张样张裁决不过 | 只损失样张;改题材为「纯材料细部」,不加建筑轮廓 |
|
||||
| 贯穿带破版 | 390/768 下横向溢出、`100vw` 触发滚动条 | `overflow-x: clip` + `width:100vw; margin-left:calc(50% - 50vw)`;移动端退化为 T-A 分栏 |
|
||||
| 基线体积失控 | 单批 >30 张 / >70MB | 拆批;必要豁免须你签字 |
|
||||
| 三型仍被判同构 | 盲测/并排不过 | 只改**型**(换行宽、换明暗、换落位),不改色与间距 |
|
||||
| 编排与固定头部冲突 | 位移压到标题 | 位移降到 2%;仍冲突则退化为纯揭示,无随滚动位移 |
|
||||
|
||||
**回滚粒度**:每批 1 个 commit(页面 + 基线 + 归因);判据独立 commit,
|
||||
保证「闸变严」与「页面变样」可分别 revert。
|
||||
|
||||
---
|
||||
|
||||
## 8. 不做清单
|
||||
|
||||
- `OPEN-03/04/06/10/11/13/17`:需授权或外部资源,维持登记。
|
||||
- C 类实景照片与 CMS `MediaAsset.credit`:仍是开放问题(ADR-0011 §3.2)。
|
||||
- 首页首屏换图:ADR-0011 §4.3 已定「不换」。
|
||||
- 字阶/字重的全局重排:§2 已证尺寸对齐,重排只有返工风险没有收益。
|
||||
|
||||
---
|
||||
|
||||
## 9. 与「参考而非复刻」的关系
|
||||
|
||||
复刻要求像素一致,参考只要求**论证方式一致**。所以本计划的对齐点是:
|
||||
|
||||
| 对齐 | 不对齐 |
|
||||
|---|---|
|
||||
| 三段式页面节奏(结构 → 证据 → 决断) | 保时捷的具体版式与配色 |
|
||||
| 大画幅影像承担结构 | 它的实拍素材与拍摄地 |
|
||||
| 一处红承担决断 | 红的面积与位置 |
|
||||
| 编排服务内容 | 它的具体滚动特效 |
|
||||
| 类型系统可机器校验 | 它的字体族 |
|
||||
|
||||
---
|
||||
|
||||
## 10. 与本轮收尾的关系(已做 / 待做)
|
||||
|
||||
已改(未提交):
|
||||
- `pr-description.md`:提交数 38→**41**、链接 40→**42 处**、no-console「60 条」→ **88 warning(总数口径)**
|
||||
- `qa-tracker.md` §26.5:给「firefox 六张基线未采」加失效批注
|
||||
|
||||
待做:`qa-tracker` §27 盘点节、PR #65 正文 PATCH(正文仍写 38 个提交)。
|
||||
|
||||
---
|
||||
|
||||
## 11. 执行记录
|
||||
|
||||
### P0 判据先行 · 已完成(2026-12-01 19:26)
|
||||
|
||||
| 判据 | 读数 |
|
||||
|---|---|
|
||||
| `node scripts/check-visual-grammar.mjs` | **25/25 / EXIT=0**(22 → 25) |
|
||||
| R23 构型守卫 | 分母 9 · **未达 9/9 · 上限 9**(棘轮起点,每批下调) |
|
||||
| R24 滚动 API 白名单 | 分母 3 · **3 个文件全在白名单** · 0 违规 · 0 容忍 |
|
||||
| R25 裸高档字阶 | 分母 9 · **裸写 8/9 · 上限 8** |
|
||||
| `--selftest` | **13/13 条规则对已知违规判红**,含 R23/R24/R25;自证把两条棘轮上限压到 0 才跑(默认值恰好「等于上限不判红」,用默认值测到的是恒真) |
|
||||
| `npm run check:visual` | EXIT=0 |
|
||||
|
||||
**同批修正了 v2 两处设计错误**(见 §0.5):
|
||||
- 原计划新建 `ScrollBand`,实际 `ui/image-module.tsx` 已有视差/Ken Burns/overlay/reduce,
|
||||
只是**零消费者**(`dead-modules` 判零引用)⇒ 改为复活它,`EditorialFigure` 只做构型层。
|
||||
- 原计划 R24 连 `whileInView` 一起禁,实测 **26 个文件**在用 ⇒ 会把收尾变成全站重构。
|
||||
收窄为只禁滚动驱动 API(`useScroll/useTransform/useMotionValueEvent`),实测仅 **3 个文件**。
|
||||
|
||||
**下一步(P1 第一刀)**:出 2 张样张(一张深底、一张材料细部)交裁决;
|
||||
通过后批量 8 张,再动 `EditorialFigure`。
|
||||
|
||||
### P1 资产 + 构型件 · 已完成(2026-12-01 19:40)
|
||||
|
||||
| 项 | 结果 |
|
||||
|---|---|
|
||||
| 资产 | **8 张**(四族各 2,**实测亮度 4 深 / 4 浅**),903KB,单张 ≤220KB;台账 `public/images/LEDGER.md` |
|
||||
| 比例令牌 | 新增 `--aspect-portrait: 0.8` + `IMAGE_RATIOS.PORTRAIT`,R12 两侧对账通过(拆掉了「T-C 用 TILE 近似」的隐患) |
|
||||
| `ImageModule` | `ratio` 改为可选:贯穿带定高 42–48vh 不能用比例表达(硬套 2.31 会算出 69vh) |
|
||||
| `EditorialFigure` | 三型 t-a(1.5) / t-b(定高满幅) / t-c(0.8);装饰位 `aria-hidden` + `alt=""`;单测 **6/6** |
|
||||
| 门禁 | `check:grammar` **25/25**;`tsc --noEmit` 0;新文件 eslint 0 |
|
||||
|
||||
**仍未动的**:pages 一个都还没铺(R23 仍是「未达 9/9」,上限 9)。铺页与采基线属下一步。
|
||||
|
||||
### P2 · B1 三页已铺(2026-12-01 19:55,未采基线)
|
||||
|
||||
| 页 | 型 | 落点 | 读数 |
|
||||
|---|---|---|---|
|
||||
| `/products` | t-a | 「企业套装」头部改 12 列(文本 7 + 影像 5),不再另起区块 | 影像与文本底对齐 |
|
||||
| `/solutions` | t-b | 网格区与 CTA 之间,满幅贯穿带 | 1440 视口实测 **1440×432**(48vh) |
|
||||
| `/services` | t-c | 服务流程区与 CTA 之间,视口右侧偏移板 | 实测 **503×629**(0.8)、x=852(第 8 列起) |
|
||||
|
||||
R23 未达由 **9 → 6**,上限同步下调到 6(棘轮纪律);`tsc` 0、三个页面 `eslint` 0。
|
||||
|
||||
**首版截图暴露的两个问题(已修)**:
|
||||
1. **t-c 左侧全空**被读成「图放错位置」,不是版式 —— 补了左下的 mono 索引 + 材质注记作锚点。
|
||||
2. **`lg:col-span-5 lg:col-start-8` 的 start 被吃掉**:`col-span-*` 编译成 `grid-column: span 5 / span 5`,
|
||||
会重置 start,影像实际落在第 5 列(x=523)。改用 `col-start-8 col-end-13` 后 x=852,正确。
|
||||
|
||||
**待做**:视觉只读复跑(应只红这三页)→ 逐页归因 → 采 15 张基线(≈31MB)。
|
||||
|
||||
### P2 · B1 基线已采(2026-12-01 20:02)
|
||||
|
||||
| 步骤 | 命令 | 读数 |
|
||||
|---|---|---|
|
||||
| 只读比对(采前) | `-g "产品中心\|解决方案列表\|服务列表" --update-snapshots=none` | **恰好 15 例红**(3 页 × 5 project),无非目标页 |
|
||||
| 采基线 | 同过滤 + `--update-snapshots=changed` | **15 passed / 1.7m**,逐张写盘 |
|
||||
| 只读复核(采后) | 同过滤 + `--update-snapshots=none` | **15 passed / 0 failed** |
|
||||
| 体积 | `du -sh e2e/visual-snapshots` | 478MB → **495MB(+17MB)**(预算 31MB,因移动端页高增幅小于预估) |
|
||||
|
||||
> 归因:三页差异全部来自本批新增的影像落点与其撑高的页长,没有一处来自配色、字阶或间距改动。
|
||||
|
||||
### P2 · B1 全量只读收口(2026-12-01 20:25)
|
||||
|
||||
| 步骤 | 读数 |
|
||||
|---|---|
|
||||
| 全量只读 #1 | **220 passed / 5 failed** —— 5 条全是「卡片组件」,非本批页面 |
|
||||
| 卡片的两个真因 | ① 落点取 `header.height + 8`,但头部是**内缩浮条**(top 48 / 高 64),卡片顶边被压在浮条下,截图拍到**浮条后面透出的页面内容**;② 帧驱动动效不受 `animations:'disabled'` 控制 |
|
||||
| 修法 | ①改 `rect.bottom + 8` 并取整;②`EditorialFigure` **关闭 Ken Burns / 视差**(见下) |
|
||||
| 重采 | 三页 15 张 + 卡片 5 张 = **20 张**,`du` 478MB → **496MB(+18MB)** |
|
||||
| 全量只读 #2 | **225 passed / 0 failed / EXIT=0(10.3m)** |
|
||||
|
||||
**P3 编排降级的真实原因(如实登记)**:`animations: 'disabled'` 只接管 CSS 动画,管不到
|
||||
framer-motion 的 rAF 帧驱动。全量 5 project 并行时,`/services` 贯穿带被拍到中间帧
|
||||
(firefox 单跑两次都绿、全量一次红,0.01% 像素差)。守卫的确定性优先于装饰性位移,
|
||||
所以正文件改为**静帧构图**;帧动效要开,先修 R-1(`reducedMotion` 写在 `use` 层被忽略),
|
||||
属独立动作,不夹在本批里。
|
||||
|
||||
### P2 · B2 三页已铺 + 基线(2026-12-01 20:50)
|
||||
|
||||
| 页 | 型 | 图 | 实测 |
|
||||
|---|---|---|---|
|
||||
| `/cases` | t-b | `perforated-night-dark` | 1440×432 |
|
||||
| `/insights` | t-c | `soffit-geometry-light` | 495×619 · x=851 |
|
||||
| `/news` | t-b | `facade-dark-diagonal` | 1440×432 |
|
||||
|
||||
**对原表的一处修正**:原表写 `news = t-c`,但它与 `insights` 相邻 ⇒ 同型相邻违反「相邻页不同型」。
|
||||
改 `news = t-b`(`cases(B)` 与 `news(B)` 之间隔着 `insights(C)`,不相邻)。`PAGE_COMPOSITION` 已同步。
|
||||
|
||||
**首版 `insights` 用了 `steel-rust-dark`,截图否决**:锈色在整页克制的中性调里像一张「材质贴图」,
|
||||
且抢品牌红的位置。换成 `soffit-geometry-light`(浅底结构几何),左下的 mono 索引 + 注记作锚点后成立。
|
||||
`steel-rust-dark` 降级为备用资产,台账已记。
|
||||
|
||||
R23 未达 **6 → 3**,上限同步 3;采前只读 **恰好 15 红**、采后 **15 绿**。
|
||||
|
||||
### P2 · B3 改判:影像 → 内容图(2026-12-01 晚)
|
||||
|
||||
**触发**:B3 铺到第一个模板时用户连提两条否决 ——「我们是一个 IT 技术咨询公司,怎么全是钢筋混凝土了」、
|
||||
「我感觉你的配图跟页面的文案不相关呢」。第一条否的是题材,第二条否的是**载体本身**。
|
||||
|
||||
**判定**:照片不承担语义。「实施流程」「企业套装」「解决方案」讲的是关系与阶段,
|
||||
任何静物(建筑 / 器材)都只能提供气氛 ⇒ 这不是换图能解决的,是 P1「影像密度 G1」这条指标立错了:
|
||||
先有指标再找图,必然产出装饰。
|
||||
|
||||
**改判后的 G1**:正文不再要求影像;要求的是**每个登记位有一件承载页面自身数据的内容图**。
|
||||
- t-a 分栏 → `ui/stage-index.tsx`:条目排成序号脊线(标题 + 说明取自 `process` / `solutions`)
|
||||
- t-b 满幅带 → `ui/band-index.tsx`:条目横排成索引带(行业 / 新闻标题)
|
||||
- t-c 偏移板 → **退役**:三个偏移位所在区块没有可承载的条目,硬放只会与下方列表重复
|
||||
|
||||
**落地(未提交)**:五页五件 —— 3 个详情模板(StageIndex withDetail)+ `/solutions` `/news`(BandIndex)。
|
||||
`/cases` 案例表为空 ⇒ 带子不渲染,也不进 R23 登记表(登记零渲染页 = 假锚)。
|
||||
撤除:`editorial-figure.tsx`、正文 `body/` 全部影像(14 张)、`--aspect-portrait` 令牌、`/products` `/services` `/insights` 三个影像位。
|
||||
R23 判据改判「载体标记」(`<StageIndex` / `<BandIndex`,须在非注释行),分母 9 → **5**,上限 0;
|
||||
R25 上限 9→6→**5**(分母同步);另修掉两处仪器缺陷:R12 自证夹具手抄四键(漏 `portrait`)、
|
||||
R23/R25 负例挂在已退出登记的 `/products` 上(自证报「R25 未被抓到」)。
|
||||
|
||||
**未做**:基线未重采(6 页的参照仍是旧版,视觉门禁当前应为红);`/cases` 零数据形态待有真实案例后再定。
|
||||
|
||||
### P2 · 首屏去板(2026-12-01 深夜)
|
||||
|
||||
**触发**:用户「2. 换掉」——首屏四张建筑影像(`hub/{facade,glass,hall,truss}`)与正文被否的是同一类东西。
|
||||
|
||||
**判定**:首屏保留影像的理由(构图支点)站不住,因为照片承担的仍然是"气氛"而非语义;
|
||||
能站住的替代只有两种 —— 换成该页的条目索引(会与下方卡片重复)或去掉板子让排版立骨。用户选后者。
|
||||
|
||||
**落地**:
|
||||
- 16 个首屏文件移除 `<HeroPlate>`(18 条路由:六 hub、三类详情共享壳、ERP 专题、关于/团队/方法论/联系、新闻详情),
|
||||
文本列由 `lg:col-span-7` 收到 `lg:col-span-12`(内部 `max-w-4xl/2xl` 继续管字宽);
|
||||
- 删除 `ui/hero-plate.tsx` + 测试、`public/images/hub/**`(4 张);
|
||||
- **R22 判据掉头**:从「首屏必须有 `<HeroPlate>` 或 `<Image>`」改为「**零影像**:出现任一件即判红」。
|
||||
这是本闸第二次反向(`<SpanField>` → 影像 → 零影像),两次都是被"照片不承担语义"逼的;
|
||||
note 里明写「排版支点没有机器可判形态,由视觉基线与人工评审兜」,不假装自动。
|
||||
自证同步改五向(`<HeroPlate>` 回潮 / `<Image>` 回潮 / 干净页不误报 / 注释不算数 / 缺页分母缩水)。
|
||||
|
||||
**实测(1440×900)**:`/products` h1 1008×276、`/about` 1008×352、`/solutions` 1008×181、
|
||||
产品详情 1008×93(紧凑引言档,符合 DESIGN.md「叶子详情页"紧凑引言"」的旧账)。
|
||||
|
||||
**未处置**:首页 `home/hero-architecture.webp` 仍是建筑影像(ADR-0011 §4.3 定"不换"),
|
||||
按本轮判据同样站不住,是否换另行决定;`about/brand` 与新闻配图属内容图,不在此列。
|
||||
@@ -0,0 +1,48 @@
|
||||
# 影像台账(ADR-0011 §4.1 落点)
|
||||
|
||||
> 为什么要有这张表:ADR-0011 §2.2 记过「`docs/` 下零条来源/授权记录,`MediaAsset` 只有 alt、无 credit」——
|
||||
> 一旦引入外部素材,没有任何位置能证明它能商用。本仓只用 **A 类本地生成图**(无需外部授权),
|
||||
> 但仍须记「生成方式与日期」,否则下一次换图没人知道上一张是怎么来的。
|
||||
|
||||
## 准入(A 类四条,逐张自查)
|
||||
|
||||
1. 无人物
|
||||
2. 无可读文字
|
||||
3. 无客户或第三方标识
|
||||
4. 不暗示真实客户现场
|
||||
|
||||
另:不得含可辨识地标(ADR-0011 §3 硬禁,含剪影/单色/去字变体)。一律 `aria-hidden` + `alt=""`,不进证据位。
|
||||
|
||||
## ⚠ 2026-12-01:营销面影像整批退役(本轮最贵的一课)
|
||||
|
||||
**结论:营销页(首屏与正文)不再使用装饰影像。** 四轮方案都被否,且都不是「题材没选好」:
|
||||
|
||||
| 轮次 | 载体 / 题材 | 用户原话 | 真实缺陷 |
|
||||
|---|---|---|---|
|
||||
| 1 | 抽象几何(层叠体块 + 水平线) | 「右侧的矩形条是什么设计?有出处吗?不太好看呢」 | 无对标出处,语义错位 |
|
||||
| 2 | 建筑影像(混凝土 / 钢构 / 柱廊 / 中庭 / 穿孔立面) | 「我们是一个IT技术咨询公司,怎么全是钢筋混凝土了?」 | 题材与业务无关,且无出处 |
|
||||
| 3 | 技术静物(机架理线 / 光纤束 / 散热鳍片 / 冷通道) | 「我感觉你的配图跟页面的文案不相关呢」 | **照片不承担语义**:静物给不了「流程」「套装」「方案组合」 |
|
||||
| 4 | 首屏四张建筑影像(facade/glass/hall/truss,18 条路由) | 「2. 换掉」 | 与第 2 轮同源:首屏也没有理由用建筑相 |
|
||||
|
||||
**根因(写给下一次的自己)**:先立「每页一张影像」的密度指标,再去为指标找图。
|
||||
参考站的影像密度来自**真实项目摄影**,本仓没有这类素材(零编造也不允许造),
|
||||
所以任何替代品都只能是装饰 —— 装饰迟早会被问「这跟文案什么关系」。
|
||||
|
||||
**现行做法(ADR-0011 §8.6)**:
|
||||
|
||||
| 位置 | 载体 | 数据来源 |
|
||||
|---|---|---|
|
||||
| 三个详情模板的「实施流程 / 解决方案 / 服务流程」 | `ui/stage-index.tsx`(序号脊线,标题 + 说明) | `product.process` / `solution.solutions` / `service.process` |
|
||||
| `/solutions`、`/news` 满幅带 | `ui/band-index.tsx`(文字索引带) | 方案清单(subtitle 作归属)/ 新闻标题 |
|
||||
| 16 个营销首屏 | **无影像**:大字号断言 + eyebrow 规则 + 双轨 CTA | — |
|
||||
| `/products`「企业套装」、`/services`、`/insights` 偏移位、`/cases` 带 | 撤除,或零数据时不渲染 | — |
|
||||
|
||||
已删除的资产与代码:`public/images/hub/**`(4 张)、`public/images/body/**`(14 张)、
|
||||
`ui/hero-plate.tsx`、`ui/editorial-figure.tsx`;`--aspect-portrait` 令牌一并撤回。
|
||||
|
||||
## 仍在使用的影像(未在本轮处置)
|
||||
|
||||
| 文件 | 用途 | 说明 |
|
||||
|---|---|---|
|
||||
| `home/hero-architecture.webp` | 首页首屏主图 | ADR-0011 §4.3 定「不换」;**按本轮判据它同样站不住**,是否处置待单独决定 |
|
||||
| `about/brand/**`、`news/**` 等页面自带图 | 品牌资产页 / 新闻配图 | 属内容图或新闻配图(有出处),不在装饰位,保留 |
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 173 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 98 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 146 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 199 KiB |
@@ -87,6 +87,64 @@ const HUB_HERO_FILES = [
|
||||
"src/app/(marketing)/products/erp-upgrade/erp-upgrade-content-v2.tsx",
|
||||
];
|
||||
|
||||
/**
|
||||
* R23 的**构型登记表**(2026-12-01 裁定 D1/D2,同日影像被否后改判「内容图」)。
|
||||
*
|
||||
* 判「型」而不是判「有没有图」的理由仍然成立:只数密度,最省力的达标方式是所有页插同一块东西。
|
||||
*
|
||||
* 但**「图」的载体换过一次**,必须写在这里而不是留在提交信息里:
|
||||
* 影像(EditorialFigure)→ 被否。三次题材(抽象几何 / 建筑混凝土 / 技术静物)都证明了
|
||||
* 同一件事:照片不承担语义,「实施流程」「解决方案」这类说的是关系与阶段,静物给不了语义。
|
||||
* 现在两类载体都是**页面自己的内容**:
|
||||
* t-a 分栏 → `<StageIndex>`:把该区块的条目按序号排成脊线(标题 + 说明取自真实数据)
|
||||
* t-b 满幅带 → `<BandIndex>`:把该页的条目横排成索引带(行业 / 新闻 / 案例)
|
||||
* t-c 偏移板 → **已退役**:原先三个偏移位(/products、/services、/insights)所在的区块
|
||||
* 没有可承载的条目,硬放一件只会与下方列表重复,故三个位一并撤除。
|
||||
*
|
||||
* 判据形态没变:每页必须命中**它该用的那一种**,缺型或错型都判红。
|
||||
* **递减棘轮**:每落地一批把 COMPOSITION_UNMET_CEILING 下调到新的实测值,归零后锁死。
|
||||
*/
|
||||
const COMPOSITION_FILES = {
|
||||
"src/app/(marketing)/solutions/solutions-content-v3.tsx": { type: "t-b", marker: "<BandIndex" },
|
||||
// /cases 不进登记表:案例表为空时文字带整条不渲染(零编造,不造客户),
|
||||
// 让它出现在表里就等于「判据被代码满足、页面什么也没有」的假锚。
|
||||
"src/app/(marketing)/news/news-content-v3.tsx": { type: "t-b", marker: "<BandIndex" },
|
||||
"src/app/(marketing)/products/product-detail-content-v3.tsx": { type: "t-a", marker: "<StageIndex" },
|
||||
"src/app/(marketing)/solutions/solution-detail-content-v3.tsx": { type: "t-a", marker: "<StageIndex" },
|
||||
"src/app/(marketing)/services/service-detail-content-v4.tsx": { type: "t-a", marker: "<StageIndex" },
|
||||
};
|
||||
// 2026-12-01 影像方向被否后重铺(建筑 → 技术题材),九页一次落地 ⇒ 上限归零锁死。
|
||||
// 同日这个常量走过 3(B2 收尾)→ 9(影像被否、落地回滚)→ 0(重铺成立):
|
||||
// 棘轮在「落地被撤」时允许回升,一旦落地重新成立必须落到实测值,不能停在宽松位。
|
||||
const COMPOSITION_UNMET_CEILING = 0;
|
||||
|
||||
/**
|
||||
* R24 的滚动驱动 API 白名单。
|
||||
*
|
||||
* 只禁**滚动驱动**(useScroll / useTransform / useMotionValueEvent),不禁 whileInView ——
|
||||
* 后者是视口触发器,本仓 26 个文件在用,禁掉等于要求一次全站重构,那不是收尾。
|
||||
*
|
||||
* 白名单里三处都是既有实现,不是新建:
|
||||
* ui/image-module.tsx …… 本轮要复活的影像原语(视差 8% / Ken Burns 一次播完 / reduce 短路)
|
||||
* sections/story-stage.tsx · sections/case-detail-page.tsx …… 存量编排,未纳入本轮改造
|
||||
* 新增第四处必须在这里登记并写理由,否则 R24 判红。
|
||||
*/
|
||||
const SCROLL_API_FILES = new Set([
|
||||
"src/components/ui/image-module.tsx",
|
||||
"src/components/sections/story-stage.tsx",
|
||||
"src/components/sections/case-detail-page.tsx",
|
||||
]);
|
||||
|
||||
/**
|
||||
* R25 的递减棘轮:登记页里仍**裸写** text-6xl / text-7xl 的文件数。
|
||||
* 2026-12-01 影像改判后登记表从 9 页缩到 6 页(三个偏移位退役),实测 **5/5 全部裸写**(/cases 零数据退出登记后由 6 页变 5 页)。
|
||||
* 上限跟着落到 6 —— 原来的 8 在 6 页分母下已经高于上限可能值,等于恒真。
|
||||
* 页级断言应走 `ui/display-statement.tsx`(有实现有测试,却只有 1 个消费者);
|
||||
* 原始尺寸不改(6xl 在 1024 起 ≈81px,已对齐对标 80px 档),只统一表达方式。
|
||||
*/
|
||||
const RAW_STATEMENT_CEILING = 5;
|
||||
|
||||
|
||||
/**
|
||||
* R12 的「测量值 ↔ 声明值」对账表。
|
||||
* 出处:2026-11-02 对 Porsche Consulting 中国站首页逐个 <img> 的 getBoundingClientRect 实测
|
||||
@@ -513,8 +571,8 @@ function checkGrammar(rawText, rawFiles, twConfig = "", opts = {}) {
|
||||
* 两侧都取不到数 = 判据失去目标,按「未能度量」处理(分母 0)。
|
||||
*/
|
||||
const aspectCss = new Map([...text.matchAll(/^\s*--aspect-([a-z0-9-]+)\s*:\s*([\d.]+)\s*;/gm)].map((m) => [m[1], m[2]]));
|
||||
const aspectJs = new Map([...String(opts.jsSources?.[IMAGE_RATIOS_TS] ?? "").matchAll(/(HERO_WIDE|EDITORIAL|SQUARE|TILE):\s*([\d.]+)/g)]
|
||||
.map((m) => [({ HERO_WIDE: "hero-wide", EDITORIAL: "editorial", SQUARE: "square", TILE: "tile" })[m[1]], m[2]]));
|
||||
const aspectJs = new Map([...String(opts.jsSources?.[IMAGE_RATIOS_TS] ?? "").matchAll(/(HERO_WIDE|EDITORIAL|SQUARE|TILE|PORTRAIT):\s*([\d.]+)/g)]
|
||||
.map((m) => [({ HERO_WIDE: "hero-wide", EDITORIAL: "editorial", SQUARE: "square", TILE: "tile", PORTRAIT: "portrait" })[m[1]], m[2]]));
|
||||
const r12Red = [];
|
||||
for (const [key, measured] of Object.entries(ASPECT_MEASURED)) {
|
||||
const cssV = aspectCss.get(key);
|
||||
@@ -652,33 +710,110 @@ function checkGrammar(rawText, rawFiles, twConfig = "", opts = {}) {
|
||||
note: `扫描 ${r21Den} 处自定义类名 · 命名空间 ${CUSTOM_CLASS_PREFIXES.join("/")} + ${[...CUSTOM_CLASS_EXACT].join("/")}` });
|
||||
|
||||
/**
|
||||
* R22 hub 六页首屏必须有构图支点(ADR-0011 §5 判据①)。
|
||||
* R22 营销页首屏**零影像**(2026-12-01 判据掉头,理由必须留在这里)。
|
||||
*
|
||||
* 判「有」的两种形态:`<HeroPlate`(A 类影像片,2026-12-01 起的路线)或 `<Image`(页面自带的影像)。
|
||||
* 两条都算,是因为 ADR 只禁止 C/D 类,没有禁止页面自己接一张图。
|
||||
* 历史:本条最初守的是 B 类矢量原语 `<SpanField`;该形态因「灰阶堆叠读成骨架屏」
|
||||
* 被用户否决并撤除,判据随之改为守影像片 —— 闸要守的是「首屏有构图支点」,不是某一种实现。
|
||||
* 这条闸的方向反了两次,每次都是被同一个东西逼的 —— **照片不承担语义**:
|
||||
* 1. 最初守 `<SpanField`(B 类矢量原语)⇒「灰阶堆叠读成骨架屏」,用户否决,原语撤除;
|
||||
* 2. 改守 `<HeroPlate>` / `<Image`(A 类影像片)⇒「我们是一家 IT 技术咨询公司,
|
||||
* 怎么全是钢筋混凝土」,首屏四张建筑影像同批撤除,组件与图库一并删除;
|
||||
* 3. 现在守**零影像**:这 16 个首屏文件里出现 `<HeroPlate` 或 `<Image` 即判红。
|
||||
*
|
||||
* 为什么必须先剥注释:本仓踩过——`constants.ts` 注释里的示例 import 骗过了
|
||||
* `export { … } from` 正则。这里同理:一段被注释掉的 `<HeroPlate>` 不该算作构图支点。
|
||||
* 它已不再回答「首屏有没有支点」,只回答「影像有没有偷偷回来」。
|
||||
* 首屏的支点改为排版本身(大字号断言 + eyebrow 规则 + 双轨 CTA),
|
||||
* 这一层没有机器可判的形态,由视觉基线与人工评审兜 —— note 里明写,不假装自动。
|
||||
*
|
||||
* 为什么分母按「找到几页」而不是恒定 6:路径改名时若照常除以 6,一条红都不会出,
|
||||
* 判据就变成了空转。缺页本身判红,与 R13 的 `MARKETING_FLOOR` 同一纪律。
|
||||
* 为什么必须先剥注释:本仓踩过 —— `constants.ts` 注释里的示例 import 骗过了
|
||||
* `export { … } from` 正则。这里同理:注释里写一句 `<HeroPlate />` 不算数。
|
||||
*
|
||||
* 为什么分母按「找到几页」而不是恒定 16:路径改名时若照常除以 16,一条红都不会出,
|
||||
* 判据就空转了;缺页本身判红(同 R13 的 `MARKETING_FLOOR` 纪律)。
|
||||
*/
|
||||
const hubFloor = opts.hubFloor ?? HUB_HERO_FILES.length;
|
||||
const hubPresent = HUB_HERO_FILES.filter((rel) => files.has(rel));
|
||||
const r22Red = [];
|
||||
for (const rel of hubPresent) {
|
||||
const src = stripComments(files.get(rel) ?? "", { line: true });
|
||||
if (!/<HeroPlate\b|<Image\b/.test(src)) {
|
||||
r22Red.push(`${rel}:首屏既无 <HeroPlate> 也无 <Image> —— 该页退回「白底文字块」,构图支点缺失`);
|
||||
if (/<HeroPlate\b|<Image\b/.test(src)) {
|
||||
r22Red.push(`${rel}:首屏又出现影像位(<HeroPlate> / <Image>)—— 影像已整批退役,改回排版支点`);
|
||||
}
|
||||
}
|
||||
if (hubPresent.length < hubFloor) {
|
||||
r22Red.push(`营销页首屏只找到 ${hubPresent.length}/${hubFloor} 页 —— 路径改名或文件被移动,本条对缺的那几页空转`);
|
||||
}
|
||||
rule({ id: "R22", name: "营销页首屏必须有构图支点(影像片)", denominator: hubPresent.length, red: r22Red,
|
||||
note: `找到 ${hubPresent.length}/${HUB_HERO_FILES.length} 页 · 判据 = 非注释行内出现 <HeroPlate 或 <Image` });
|
||||
rule({ id: "R22", name: "营销页首屏零影像(禁止回潮)", denominator: hubPresent.length, red: r22Red,
|
||||
note: `找到 ${hubPresent.length}/${HUB_HERO_FILES.length} 页 · 判据 = 非注释行内**不得**出现 <HeroPlate 或 <Image · 排版支点本身没有机器可判形态,由视觉基线与人工评审兜` });
|
||||
|
||||
/**
|
||||
* R23 正文构型:每页必须命中登记过的那一件(表见 COMPOSITION_FILES 注释)。
|
||||
*
|
||||
* 判「命中」的方式换了两次,两次都是为了让判据认的是**内容**而不是文件名:
|
||||
* 第一版按 `<EditorialFigure>` 切段看 variant(防邻页写法互相带过);
|
||||
* 影像被否后改为按**载体标记**(`<StageIndex` / `<BandIndex`)判,
|
||||
* 且必须出现在非注释行 —— 注释里写一句 `<StageIndex />` 不算数(R22 同款假绿)。
|
||||
*/
|
||||
const compEntries = Object.entries(COMPOSITION_FILES);
|
||||
const r23Unmet = [];
|
||||
for (const [rel, spec] of compEntries) {
|
||||
const src = files.get(rel);
|
||||
if (!src) {
|
||||
r23Unmet.push(`${rel}:文件不存在 —— 路径改名或页面被移动,R23 对这一页空转`);
|
||||
continue;
|
||||
}
|
||||
const live = src
|
||||
.split('\n')
|
||||
.filter((line) => !/^\s*(\/\/|\*|\/\*)/.test(line))
|
||||
.join('\n');
|
||||
if (!live.includes(spec.marker)) {
|
||||
r23Unmet.push(`${rel}:未见 ${spec.marker} —— 正文构型(${spec.type})缺失或换了载体`);
|
||||
}
|
||||
}
|
||||
const compCeiling = opts.compositionUnmetCeiling ?? COMPOSITION_UNMET_CEILING;
|
||||
rule({
|
||||
id: "R23",
|
||||
name: "正文构型必须用登记的那一件(t-a 阶段脊线 / t-b 文字索引带)",
|
||||
denominator: compEntries.length,
|
||||
red: r23Unmet.length > compCeiling
|
||||
? [`未达 ${r23Unmet.length} 页 > 上限 ${compCeiling}(${r23Unmet.map((m) => m.split(":")[0]).join(", ")})`]
|
||||
: [],
|
||||
note: `未达 ${r23Unmet.length}/${compEntries.length} 页 · 上限 ${compCeiling}${r23Unmet.length < compCeiling ? " ⇒ 请把上限下调" : ""}`,
|
||||
});
|
||||
|
||||
/**
|
||||
* R24 滚动驱动 API 白名单(见 SCROLL_API_FILES 注释)。
|
||||
* 只禁滚动驱动,不禁 whileInView —— 后者是视口触发器,26 个文件在用。
|
||||
* 白名单外出现即判红,不给棘轮:新增第四处必须先登记理由。
|
||||
*/
|
||||
const SCROLL_API_RE = /\b(?:useScroll|useTransform|useMotionValueEvent)\s*\(/;
|
||||
const scrollUsers = [...files.entries()].filter(([, src]) => SCROLL_API_RE.test(src)).map(([rel]) => rel);
|
||||
const r24Red = scrollUsers
|
||||
.filter((rel) => !SCROLL_API_FILES.has(rel))
|
||||
.map((rel) => `${rel}:滚动驱动 API 不在白名单 —— 编排请走 ui/image-module,或先在 SCROLL_API_FILES 登记理由`);
|
||||
rule({
|
||||
id: "R24",
|
||||
name: "滚动驱动 API 只出现在登记的编排原语里",
|
||||
denominator: Math.max(scrollUsers.length, 1),
|
||||
red: r24Red,
|
||||
note: `${scrollUsers.length} 个文件使用滚动 API · 白名单 ${SCROLL_API_FILES.size} 处`,
|
||||
});
|
||||
|
||||
/**
|
||||
* R25 页级断言统一走 DisplayStatement(递减棘轮,见 RAW_STATEMENT_CEILING)。
|
||||
* 只改表达方式,不改尺寸:6xl 在 1024 起 ≈81px,已对齐对标 80px 档。
|
||||
*/
|
||||
const RAW_STATEMENT_RE = /\btext-(?:6xl|7xl)\b/;
|
||||
const rawStatementFiles = compEntries
|
||||
.map(([rel]) => rel)
|
||||
.filter((rel) => RAW_STATEMENT_RE.test(files.get(rel) ?? ""));
|
||||
const rawCeiling = opts.rawStatementCeiling ?? RAW_STATEMENT_CEILING;
|
||||
rule({
|
||||
id: "R25",
|
||||
name: "目标页页级断言不走裸 text-6xl/7xl(改 DisplayStatement)",
|
||||
denominator: compEntries.length,
|
||||
red: rawStatementFiles.length > rawCeiling
|
||||
? [`裸写高档字阶 ${rawStatementFiles.length} 文件 > 上限 ${rawCeiling}(${rawStatementFiles.join(", ")})`]
|
||||
: [],
|
||||
note: `裸写 ${rawStatementFiles.length}/${compEntries.length} 文件 · 上限 ${rawCeiling}${rawStatementFiles.length < rawCeiling ? " ⇒ 请把上限下调" : ""}`,
|
||||
});
|
||||
|
||||
return results;
|
||||
}
|
||||
@@ -695,15 +830,25 @@ function selftest() {
|
||||
["src/app/(marketing)/x.tsx", 'className="shadow-brand-hover"'],
|
||||
// R21:自定义命名空间类名写了但 CSS 里没有定义(container-wide 那族的再现)
|
||||
["src/app/error.tsx", 'className="container-wide container-x"'],
|
||||
// R23/R25 的负例:**必须是仍在登记表里的页面**,否则两条都抓不到(2026-12-01 踩过:
|
||||
// /products 退出登记后,负例还留在它身上,自证直接报「R25 未被抓到」)。
|
||||
["src/app/(marketing)/news/news-content-v3.tsx", 'className="text-6xl font-bold"'],
|
||||
// R24 的负例:白名单外的文件用了滚动驱动 API
|
||||
["src/components/sections/rogue-stage.tsx", "const { scrollYProgress } = useScroll({ target: ref });"],
|
||||
]);
|
||||
// 第三参数是 tailwind.config 文本:给一份「引用全部已声明、且带齐外部所有者豁免」的,
|
||||
// 避免 R11 的红因混进 R1–R9 的读数里(R11 有自己的两侧自证,见下)。
|
||||
const RADIX_REF = `keyframes: { refs: { ${EXTERNAL_OWNED.map((v) => `x: 'var(${v})'`).join(", ")} } }`;
|
||||
const r = checkGrammar(bad, files, `${RADIX_REF}\nboxShadow: { brand: 'var(--shadow-brand)' }`);
|
||||
// 第四参数把两条棘轮上限压到 0:棘轮默认值等于「当前实测未达数」,
|
||||
// 夹具里不足 9 页,用默认值会正好落在「等于上限 ⇒ 不判红」,测到的就是恒真。
|
||||
const r = checkGrammar(bad, files, `${RADIX_REF}\nboxShadow: { brand: 'var(--shadow-brand)' }`, {
|
||||
compositionUnmetCeiling: 0,
|
||||
rawStatementCeiling: 0,
|
||||
});
|
||||
const redIds = r.filter((x) => x.red.length > 0).map((x) => x.id);
|
||||
// R21 在同一个夹具里:`container-wide` 必须判红,而同行的 `container-x`
|
||||
// (CSS 夹具里确实定义了 .container-x)不得被牵连 —— 否则闸会逼人删掉正确的类名。
|
||||
const expect = ["R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R21"];
|
||||
const expect = ["R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R21", "R23", "R24", "R25"];
|
||||
const missing = expect.filter((id) => !redIds.includes(id));
|
||||
console.log("自证(负例必须全部被抓红):");
|
||||
console.log(` 被抓红 ${redIds.join(",") || "(无)"}`);
|
||||
@@ -747,36 +892,43 @@ function selftest() {
|
||||
* 第三维单独测「注释掉的 <HeroPlate> 不算数」—— 这是本仓踩过的同一类坑
|
||||
* (`constants.ts` 注释里的示例 import 曾骗过再导出正则)。
|
||||
*/
|
||||
const hubSrc = 'export function Hero(){ return (<div><HeroPlate variant="facade" /></div>); }';
|
||||
const hubBare = "export function Hero(){ return (<div>纯白底文字块</div>); }";
|
||||
// 「文件在、原语没了」= 单页判红;「文件本身缺了」= 分母缩水,靠 hubFloor 判。
|
||||
// 两种失败形态分开测,否则一条闸看起来只防住了其中一半。
|
||||
const hubMapWithHole = (hole) =>
|
||||
new Map(HUB_HERO_FILES.map((rel) => [rel, rel === hole ? hubBare : hubSrc]));
|
||||
const hubDirty = 'export function Hero(){ return (<div><HeroPlate variant="facade" /></div>); }';
|
||||
const hubImage = 'export function Hero(){ return (<div><Image src="/x.webp" alt="" fill /></div>); }';
|
||||
const hubClean = 'export function Hero(){ return (<div className="text-6xl">纯排版首屏</div>); }';
|
||||
// 新语义下两种失败形态:①影像回来了(判红到那一页)②文件本身缺了(靠 hubFloor 判)。
|
||||
const hubMapWithDirty = (dirtyRel) =>
|
||||
new Map(HUB_HERO_FILES.map((rel) => [rel, rel === dirtyRel ? hubDirty : hubClean]));
|
||||
const r22RedFor = (map, opts) =>
|
||||
checkGrammar(bad, map, "", { floor: 0, ...opts }).find((x) => x.id === "R22").red;
|
||||
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 ? '// <HeroPlate variant="facade" />' : hubSrc])),
|
||||
const r22Clean = r22RedFor(hubMapWithDirty(null), { hubFloor: 0 });
|
||||
const r22Plate = r22RedFor(hubMapWithDirty(HUB_HERO_FILES[0]), { hubFloor: 0 });
|
||||
const r22Img = r22RedFor(
|
||||
new Map(HUB_HERO_FILES.map((rel, i) => [rel, i === 0 ? hubImage : hubClean])),
|
||||
{ hubFloor: 0 },
|
||||
);
|
||||
// 只给 5 页、地板仍是 6 ⇒ 必须判「对缺的那页空转」
|
||||
// 注释里写一句影像不算数:整页保持干净才不判红
|
||||
const r22Commented = r22RedFor(
|
||||
new Map(HUB_HERO_FILES.map((rel, i) => [rel, i === 0 ? '// <HeroPlate variant="facade" />' : hubClean])),
|
||||
{ hubFloor: 0 },
|
||||
);
|
||||
// 只给一半页、地板仍是全量 ⇒ 必须判「对缺的那几页空转」
|
||||
const half = Math.floor(HUB_HERO_FILES.length / 2);
|
||||
const r22Short = r22RedFor(
|
||||
new Map(HUB_HERO_FILES.slice(0, 5).map((rel) => [rel, hubSrc])),
|
||||
new Map(HUB_HERO_FILES.slice(0, half).map((rel) => [rel, hubClean])),
|
||||
{ hubFloor: HUB_HERO_FILES.length },
|
||||
);
|
||||
const r22Catches = r22Hole.length === 1 && r22Hole[0].includes(HUB_HERO_FILES[0]);
|
||||
const r22Catches = r22Plate.length === 1 && r22Plate[0].includes(HUB_HERO_FILES[0]);
|
||||
const r22CatchesImage = r22Img.length === 1 && r22Img[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/${HUB_HERO_FILES.length}`);
|
||||
if (!r22Catches || !r22Ignores || !r22StripsComments || !r22Floor) {
|
||||
const r22StripsComments = r22Commented.length === 0;
|
||||
const r22Floor = r22Short.length === 1 && r22Short[0].includes(`${half}/${HUB_HERO_FILES.length}`);
|
||||
if (!r22Catches || !r22CatchesImage || !r22Ignores || !r22StripsComments || !r22Floor) {
|
||||
console.log(
|
||||
` ✗ R22 不自证:缺影像判红 ${r22Catches}、齐全不误报 ${r22Ignores}、注释不算数 ${r22StripsComments}、缺页判红 ${r22Floor} ⇒ 这条闸没有约束力`,
|
||||
` ✗ R22 不自证:影像回潮判红 ${r22Catches}、<Image> 回潮判红 ${r22CatchesImage}、干净不误报 ${r22Ignores}、注释不算数 ${r22StripsComments}、缺页判红 ${r22Floor} ⇒ 这条闸没有约束力`,
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
console.log(" ✓ R22 四向:缺影像判红、全页齐全不误报、注释不算数、缺页按分母缩水判红");
|
||||
console.log(" ✓ R22 五向:<HeroPlate>/<Image> 回潮判红、干净页不误报、注释不算数、缺页按分母缩水判红");
|
||||
|
||||
// R10 单独两侧自证:它是存量棘轮,判据是「数量 > 上限」,所以负例要按数量构造。
|
||||
// 用真实 globals.css 做底,避免其它规则的红因混进来干扰这一维的读数。
|
||||
@@ -844,7 +996,16 @@ function selftest() {
|
||||
* 只测抓漂移那一侧的话,一条「见 css 就报」的坏判据也能拿满分。
|
||||
*/
|
||||
const aspectFix = (pairs) => `:root {\n${pairs.map(([k, v]) => ` --aspect-${k}: ${v};`).join("\n")}\n}`;
|
||||
const jsFix = (vals) => `export const IMAGE_RATIOS = { HERO_WIDE: ${vals[0]}, EDITORIAL: ${vals[1]}, SQUARE: ${vals[2]}, TILE: ${vals[3]} } as const;`;
|
||||
/**
|
||||
* JS 夹具的键必须**从 ASPECT_MEASURED 派生**,不能手抄。
|
||||
* 2026-12-01 新增 `portrait` 令牌时这里仍写死四个键(HERO_WIDE/EDITORIAL/SQUARE/TILE),
|
||||
* 于是「两侧等值」那一维把「JS 侧缺 portrait」当成漂移报红 —— 自证恒红,
|
||||
* 而 R12 真判据其实是对的。夹具手抄真源 = 一种假红,和被它守护的假绿同样有害。
|
||||
*/
|
||||
const jsFix = (vals) =>
|
||||
`export const IMAGE_RATIOS = { ${Object.keys(ASPECT_MEASURED)
|
||||
.map((k, i) => `${k.toUpperCase().replace(/-/g, "_")}: ${vals[i]}`)
|
||||
.join(", ")} } as const;`;
|
||||
const measuredArr = Object.values(ASPECT_MEASURED);
|
||||
const drifted = [...measuredArr]; drifted[0] = "9.99";
|
||||
const r12RedFor = (cssPairs, jsVals) =>
|
||||
|
||||
@@ -5,7 +5,6 @@ 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,
|
||||
@@ -54,7 +53,7 @@ function HeroSection({ data }: { data: AboutData }) {
|
||||
return (
|
||||
<section className="relative min-h-[60vh] flex items-center overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-24 sm:py-32 lg:py-40 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -116,9 +115,7 @@ function HeroSection({ data }: { data: AboutData }) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="facade" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type CaseStudy,
|
||||
} from '@/lib/constants/cases';
|
||||
import { EARLY_ACCESS } from '@/lib/constants/company';
|
||||
import { HeroPlate } from '@/components/ui/hero-plate';
|
||||
import { BandIndex } from '@/components/ui/band-index';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const EASE_OUT = [0.22, 1, 0.36, 1] as const;
|
||||
@@ -130,7 +130,7 @@ export default function CasesContentV3({
|
||||
{/* Hero Section */}
|
||||
<section className="relative min-h-[70vh] flex items-center overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-28 sm:py-36 md:py-40 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -198,9 +198,7 @@ export default function CasesContentV3({
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="truss" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -349,6 +347,14 @@ export default function CasesContentV3({
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 正文构型 t-b:满幅**文字索引带**(R23 / ADR-0011 §8.6)。
|
||||
案例表为空时整条带子不渲染(零编造,不造客户与指标),因此本页也不进 R23 登记表 ——
|
||||
登记一个零渲染的页面等于给判据一个假锚。 */}
|
||||
<BandIndex
|
||||
label={`CASES · ${String((casesProp ?? []).length).padStart(2, '0')}`}
|
||||
items={(casesProp ?? []).slice(0, 6).map((c) => ({ title: c.title, meta: c.industry }))}
|
||||
/>
|
||||
|
||||
{/* CTA Section */}
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-bg-secondary">
|
||||
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
|
||||
|
||||
@@ -24,7 +24,6 @@ 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;
|
||||
|
||||
@@ -244,7 +243,7 @@ function ContactFormContent({ data }: { data: ContactData }) {
|
||||
转化页按 DESIGN.md 紧凑档处理:无 min-h、py 收窄,表单回到首屏视野。 */}
|
||||
<section className="relative flex items-center overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-16 sm:py-20 lg:py-28 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
{data.heroSubtitle && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
@@ -299,9 +298,7 @@ function ContactFormContent({ data }: { data: ContactData }) {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="glass" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ 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 { HeroPlate } from '@/components/ui/hero-plate';
|
||||
import { ArrowRight } from 'lucide-react';
|
||||
|
||||
export type InsightKind = 'methodology' | 'case' | 'writing';
|
||||
@@ -78,7 +77,7 @@ export default function InsightsContent({ entries }: { entries: InsightEntry[] }
|
||||
{/* L1 —— 结论式主张,不是口号 */}
|
||||
<section className="bg-bg-primary border-b border-border-primary" data-testid="hero-section">
|
||||
<div className="container-x py-16 md:py-24 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-10 md:gap-12">
|
||||
<div className="lg:col-span-7">
|
||||
<div className="lg:col-span-12">
|
||||
<ScrollReveal>
|
||||
<p className="text-sm font-medium text-brand-ink tracking-wider mb-4">洞察</p>
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-text-primary leading-tight max-w-4xl">
|
||||
@@ -93,9 +92,7 @@ export default function InsightsContent({ entries }: { entries: InsightEntry[] }
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="glass" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ 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 {
|
||||
@@ -32,7 +31,7 @@ export function MethodologyContent({ data }: MethodologyContentProps) {
|
||||
{/* Hero:品牌化定位,轻量 CTA */}
|
||||
<section className="relative min-h-[60vh] flex items-center overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-24 sm:py-28 lg:py-32 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -59,9 +58,7 @@ export function MethodologyContent({ data }: MethodologyContentProps) {
|
||||
</motion.p>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="truss" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -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 { HeroPlate } from '@/components/ui/hero-plate';
|
||||
import { BandIndex } from '@/components/ui/band-index';
|
||||
|
||||
const categories = ['全部', '公司新闻', '研发动态'];
|
||||
const ITEMS_PER_PAGE = 9;
|
||||
@@ -125,7 +125,7 @@ export default function NewsContentV3({ news, pageCopy }: { news?: NewsItem[]; p
|
||||
{/* Hero Section */}
|
||||
<section className="relative min-h-[75vh] flex items-center overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-28 sm:py-36 md:py-44 lg:py-56 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<ScrollReveal>
|
||||
<SectionLabel>{heroEyebrow}</SectionLabel>
|
||||
</ScrollReveal>
|
||||
@@ -147,9 +147,7 @@ export default function NewsContentV3({ news, pageCopy }: { news?: NewsItem[]; p
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="truss" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -243,6 +241,12 @@ export default function NewsContentV3({ news, pageCopy }: { news?: NewsItem[]; p
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 正文构型 t-b:满幅**文字索引带**(R23 / ADR-0011 §8.6),承载最新六条新闻标题 */}
|
||||
<BandIndex
|
||||
label={`NEWS · ${String(NEWS.length).padStart(2, '0')}`}
|
||||
items={NEWS.slice(0, 6).map((n) => ({ title: n.title, meta: n.date }))}
|
||||
/>
|
||||
|
||||
{/* CTA Section */}
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-bg-primary">
|
||||
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
|
||||
|
||||
@@ -10,7 +10,6 @@ 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 (
|
||||
@@ -104,9 +103,7 @@ export default function NewsDetailContentV3({ news, relatedNews = [] }: NewsDeta
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="truss" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -17,7 +17,6 @@ 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;
|
||||
@@ -130,7 +129,7 @@ export default function ErpUpgradeContentV2({ item }: ErpUpgradeContentV2Props)
|
||||
{/* Hero Section */}
|
||||
<section className="relative pt-32 pb-32 lg:pt-40 lg:pb-40 overflow-hidden">
|
||||
<div className="max-w-container mx-auto px-6 lg:px-10 relative z-10 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="lg:col-span-7">
|
||||
<div className="lg:col-span-12">
|
||||
<ScrollReveal>
|
||||
<Badge variant="outline" className="mb-8 border-brand/30 text-brand-ink text-sm px-4 py-2">
|
||||
企业数字化升级专题
|
||||
@@ -164,9 +163,7 @@ export default function ErpUpgradeContentV2({ item }: ErpUpgradeContentV2Props)
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="facade" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -10,7 +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';
|
||||
import { StageIndex } from '@/components/ui/stage-index';
|
||||
|
||||
const PRODUCT_ICONS: Record<string, React.ReactNode> = {
|
||||
'睿新ERP管理系统': <Package className="w-8 h-8" />,
|
||||
@@ -31,7 +31,7 @@ function DetailHero({ product }: DetailHeroProps) {
|
||||
return (
|
||||
<section className="relative min-h-[80vh] flex items-center overflow-hidden bg-bg-primary pt-24">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-20 sm:py-24 md:py-28 lg:py-32 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="lg:col-span-7">
|
||||
<div className="lg:col-span-12">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -102,9 +102,7 @@ function DetailHero({ product }: DetailHeroProps) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="facade" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
@@ -216,41 +214,30 @@ function ProcessSection({ process }: ProcessSectionProps) {
|
||||
<div className="absolute bottom-0 left-0 right-0 h-px bg-border-primary" />
|
||||
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10">
|
||||
<ScrollReveal className="text-center max-w-3xl mx-auto mb-16 sm:mb-20 md:mb-20">
|
||||
<SectionLabel className="justify-center">
|
||||
<div className="flex items-center gap-5">
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
<span className="text-[11px] tracking-[0.4em] uppercase font-bold text-brand-ink">
|
||||
实施流程
|
||||
</span>
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
</div>
|
||||
</SectionLabel>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-tight">
|
||||
实施流程
|
||||
</h2>
|
||||
<p className="text-text-secondary text-lg mt-6 leading-relaxed">
|
||||
标准化的实施流程,确保项目按时高质量交付
|
||||
</p>
|
||||
</ScrollReveal>
|
||||
|
||||
<div className="relative">
|
||||
<div>
|
||||
<StaggerReveal staggerDelay={0.05} delayChildren={0.05} className="grid md:grid-cols-2 lg:grid-cols-4 gap-px bg-border-primary">
|
||||
{process.map((step, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className="group relative text-center p-8 bg-bg-primary hover:bg-bg-secondary transition-colors duration-hover"
|
||||
>
|
||||
<div className="relative z-10 w-20 h-20 bg-bg-secondary border border-border-primary group-hover:border-brand/50 flex items-center justify-center mx-auto mb-8 transition-colors duration-hover">
|
||||
<span className="text-3xl font-bold text-brand-ink">{idx + 1}</span>
|
||||
</div>
|
||||
|
||||
<p className="text-lg text-ink font-medium leading-relaxed">{step}</p>
|
||||
</div>
|
||||
))}
|
||||
</StaggerReveal>
|
||||
</div>
|
||||
{/* 正文构型 t-a(R23 / ADR-0011 §8.6):右侧不放照片,而是**本区块自己的六个阶段**
|
||||
排成一条脊线(标题 + 一句说明,全部来自 product.process)。
|
||||
原先这里是影像 + 下方宫格卡片:图与文案无关,且同一份流程被讲了两遍。 */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 items-start">
|
||||
<ScrollReveal className="lg:col-span-5">
|
||||
<SectionLabel>
|
||||
<div className="flex items-center gap-5">
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
<span className="text-[11px] tracking-[0.4em] uppercase font-bold text-brand-ink">
|
||||
实施流程
|
||||
</span>
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
</div>
|
||||
</SectionLabel>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-tight">
|
||||
实施流程
|
||||
</h2>
|
||||
<p className="text-text-secondary text-lg mt-6 leading-relaxed">
|
||||
标准化的实施流程,确保项目按时高质量交付
|
||||
</p>
|
||||
</ScrollReveal>
|
||||
<ScrollReveal className="lg:col-span-7">
|
||||
<StageIndex items={process} withDetail />
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -6,7 +6,6 @@ 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 { 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';
|
||||
@@ -40,7 +39,7 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-16 sm:py-20 lg:py-28 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.h1
|
||||
initial={{ opacity: 0, y: 70 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -92,9 +91,7 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="facade" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -15,7 +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";
|
||||
import { StageIndex } from "@/components/ui/stage-index";
|
||||
|
||||
const EASE_OUT = [0.22, 1, 0.36, 1] as const;
|
||||
|
||||
@@ -36,7 +36,7 @@ function DetailHero({ service }: { service: Service }) {
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-16 sm:py-20 lg:py-28 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.h1
|
||||
initial={{ opacity: 0, y: 40 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -92,9 +92,7 @@ function DetailHero({ service }: { service: Service }) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="hall" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
@@ -212,20 +210,32 @@ function ProcessSection({ service }: { service: Service }) {
|
||||
<div className="absolute bottom-0 left-0 right-0 h-px bg-border-primary" />
|
||||
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: "-80px" }}
|
||||
transition={{ duration: 0.28, ease: EASE_OUT }}
|
||||
className="max-w-3xl mb-16 sm:mb-20 md:mb-24"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
服务流程
|
||||
</h2>
|
||||
<p className="mt-6 text-lg text-text-secondary leading-relaxed">
|
||||
标准化流程,确保每个项目可控、可预期
|
||||
</p>
|
||||
</motion.div>
|
||||
{/* 正文构型 t-a(R23 / ADR-0011 §8.6):右侧内容图 = 本页步骤(service.process) */}
|
||||
<div className="mb-16 sm:mb-20 md:mb-24 grid grid-cols-1 lg:grid-cols-12 gap-10 items-start">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: "-80px" }}
|
||||
transition={{ duration: 0.28, ease: EASE_OUT }}
|
||||
className="lg:col-span-5"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
服务流程
|
||||
</h2>
|
||||
<p className="mt-6 text-lg text-text-secondary leading-relaxed">
|
||||
标准化流程,确保每个项目可控、可预期
|
||||
</p>
|
||||
</motion.div>
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: "-80px" }}
|
||||
transition={{ duration: 0.28, delay: 0.1, ease: EASE_OUT }}
|
||||
className="lg:col-span-7"
|
||||
>
|
||||
<StageIndex items={service.process ?? []} withDetail />
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-5 gap-px bg-border-primary">
|
||||
{service.process.slice(0, 5).map((step, index) => {
|
||||
|
||||
@@ -8,7 +8,6 @@ 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 { HeroPlate } from '@/components/ui/hero-plate';
|
||||
|
||||
const EASE_OUT = [0.22, 1, 0.36, 1] as const;
|
||||
|
||||
@@ -87,7 +86,7 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-16 sm:py-20 lg:py-28 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.h1
|
||||
initial={{ opacity: 0, y: 40 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -140,9 +139,7 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="hall" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -10,7 +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';
|
||||
import { StageIndex } from '@/components/ui/stage-index';
|
||||
|
||||
/** 共创阶段的可验证事实 —— 与首页同一份语义,不冒充案例 */
|
||||
const CO_CREATION_STEPS = [
|
||||
@@ -59,7 +59,7 @@ function DetailHero({ solution }: DetailHeroProps) {
|
||||
本身重复(它已含 width/max-width/margin/padding),两套 gutter 同时在线是
|
||||
计划 §6.5 点名的病。 */}
|
||||
<div className="container-x relative z-10 w-full py-14 md:py-20 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="lg:col-span-7">
|
||||
<div className="lg:col-span-12">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -110,9 +110,7 @@ function DetailHero({ solution }: DetailHeroProps) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="glass" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
@@ -172,22 +170,28 @@ function SolutionsSection({ solutions }: SolutionsSectionProps) {
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-32 lg:py-40 overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10">
|
||||
<ScrollReveal className="text-center max-w-3xl mx-auto mb-16 sm:mb-20 md:mb-20">
|
||||
<SectionLabel className="justify-center">
|
||||
<div className="flex items-center gap-5">
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
{/* tracking-[0.4em] 是记档外的裸字面量(--letter-spacing-widest = 0.12em);
|
||||
近单色对标的按钮/eyebrow 实测 letterSpacing: normal。收到记档里。 */}
|
||||
<span className="text-xs tracking-widest uppercase font-bold text-brand-ink">
|
||||
Solutions
|
||||
</span>
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
</div>
|
||||
</SectionLabel>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-tight">
|
||||
解决方案
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
{/* 正文构型 t-a(R23 / ADR-0011 §8.6):右侧内容图 = 本页方案条目(solution.solutions) */}
|
||||
<div className="mb-16 sm:mb-20 md:mb-20 grid grid-cols-1 lg:grid-cols-12 gap-10 items-start">
|
||||
<ScrollReveal className="lg:col-span-5">
|
||||
<SectionLabel>
|
||||
<div className="flex items-center gap-5">
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
{/* tracking-[0.4em] 是记档外的裸字面量(--letter-spacing-widest = 0.12em);
|
||||
近单色对标的按钮/eyebrow 实测 letterSpacing: normal。收到记档里。 */}
|
||||
<span className="text-xs tracking-widest uppercase font-bold text-brand-ink">
|
||||
Solutions
|
||||
</span>
|
||||
<div className="w-14 h-px bg-brand" />
|
||||
</div>
|
||||
</SectionLabel>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-tight">
|
||||
解决方案
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
<ScrollReveal className="lg:col-span-7">
|
||||
<StageIndex items={solutions} withDetail />
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<StaggerReveal staggerDelay={0.05} delayChildren={0.05} className="grid md:grid-cols-2 gap-px bg-border-primary">
|
||||
|
||||
@@ -7,7 +7,8 @@ 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 { HeroPlate } from '@/components/ui/hero-plate';
|
||||
import { BandIndex } from '@/components/ui/band-index';
|
||||
|
||||
import { type Solution } from '@/lib/constants/solutions';
|
||||
import type { Product } from '@/lib/constants/products';
|
||||
|
||||
@@ -35,7 +36,7 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-16 sm:py-20 lg:py-28 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
<motion.h1
|
||||
initial={{ opacity: 0, y: 40 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -88,9 +89,7 @@ function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="glass" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
@@ -239,6 +238,14 @@ export default function SolutionsContentV3({ solutions: solutionsProp, products,
|
||||
<div className="bg-bg-primary text-ink">
|
||||
<HeroSection pageCopy={pageCopy} />
|
||||
<SolutionsGridSection solutions={solutions} products={products} pageCopy={pageCopy} />
|
||||
{/* 正文构型 t-b:满幅**文字索引带**(R23 / ADR-0011 §8.6)。
|
||||
影像版被否后,这条带子改为承载本页六条行业方案 —— 序号与标题都来自数据;
|
||||
meta 取 subtitle 而不是 industry(行业名已在下方卡片 h3 出现,同屏再列一遍=把列表抄一遍)。 */}
|
||||
<BandIndex
|
||||
label={`SOLUTIONS · ${String(solutions.length).padStart(2, '0')}`}
|
||||
items={solutions.slice(0, 6).map((s) => ({ title: s.title, meta: s.subtitle }))}
|
||||
/>
|
||||
|
||||
<CTASection pageCopy={pageCopy} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6,7 +6,6 @@ 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 */
|
||||
@@ -144,7 +143,7 @@ export default function TeamContentV3({ data }: { data: Record<string, unknown>
|
||||
{/* ============ L1: Hero 团队情感入口 ============ */}
|
||||
<section className="relative min-h-[60vh] flex items-center overflow-hidden bg-bg-primary">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-24 sm:py-32 lg:py-40 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="max-w-4xl lg:col-span-7">
|
||||
<div className="max-w-4xl lg:col-span-12">
|
||||
{/* 眉标 Badge */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
@@ -228,9 +227,7 @@ export default function TeamContentV3({ data }: { data: Record<string, unknown>
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="hall" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CTAButton } from '@/components/ui/cta-button';
|
||||
import { HeroPlate } from '@/components/ui/hero-plate';
|
||||
import type { HeroTheme } from '@/lib/constants/hero-themes';
|
||||
|
||||
/**
|
||||
@@ -54,7 +53,7 @@ export function DetailPageHero({
|
||||
return (
|
||||
<section className="bg-bg-primary" data-testid={`${testIdPrefix}-section`}>
|
||||
<div className="container-x py-16 sm:py-20 lg:py-28 grid grid-cols-1 lg:grid-cols-12 lg:items-center gap-12 lg:gap-10">
|
||||
<div className="lg:col-span-7">
|
||||
<div className="lg:col-span-12">
|
||||
<div className="flex items-center gap-3">
|
||||
{/* 产品线视觉身份的唯一落点:3px × 24px 短线。
|
||||
色值来自真源(hero-themes.ts),此处只做透传 —— check:accents 判据 B 登记在此。 */}
|
||||
@@ -98,9 +97,7 @@ export function DetailPageHero({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 首屏影像片(A 类,ADR-0011 §4.1):本页的构图支点。
|
||||
移动端是文字下方的一条带,桌面占右 5 列;任何断点都不隐藏。 */}
|
||||
<HeroPlate variant="facade" className="h-40 w-full sm:h-56 lg:col-span-5 lg:h-[30rem]" />
|
||||
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { BandIndex } from './band-index';
|
||||
|
||||
/**
|
||||
* BandIndex 的法律地位:它占的是原「影像贯穿带」的位置,但内容必须全是页面条目。
|
||||
* 断言因此只问三件事:条目渲染、空输入不渲染、标签与归属透传。
|
||||
*/
|
||||
describe('BandIndex', () => {
|
||||
const items = [
|
||||
{ title: '制造业数字化转型方案', meta: '制造业' },
|
||||
{ title: '零售业全渠道方案', meta: '零售业' },
|
||||
];
|
||||
|
||||
it('渲染条目与归属', () => {
|
||||
render(<BandIndex items={items} label="SOLUTIONS · 02" />);
|
||||
expect(screen.getAllByRole('listitem')).toHaveLength(2);
|
||||
expect(screen.getByText('制造业数字化转型方案')).toBeInTheDocument();
|
||||
expect(screen.getByText('制造业')).toBeInTheDocument();
|
||||
expect(screen.getByText('SOLUTIONS · 02')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('空数组整条带子不渲染(内容未就绪 ≠ 版式缺失)', () => {
|
||||
const { container } = render(<BandIndex items={[]} label="CASES · 00" />);
|
||||
expect(container).toBeEmptyDOMElement();
|
||||
});
|
||||
|
||||
it('不做静默截断:调用方给几条就渲染几条', () => {
|
||||
const many = Array.from({ length: 6 }, (_, i) => ({ title: `条目 ${i + 1}` }));
|
||||
render(<BandIndex items={many} />);
|
||||
expect(screen.getAllByRole('listitem')).toHaveLength(6);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,65 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
/**
|
||||
* BandIndex —— 满幅**文字索引带**(2026-12-01,ADR-0011 §8.6)。
|
||||
*
|
||||
* 它占的是原来的「t-b 影像贯穿带」位置:那条带当初的作用是打断容器节奏,
|
||||
* 但影像被否之后,这个位置没有任何内容可装 —— 于是改成把**该页的条目**横排成一条带:
|
||||
* 序号 + 条目名 + 归属,全部来自页面自己的数据(方案行业 / 新闻标题 / 案例客户)。
|
||||
*
|
||||
* 与影像版的区别(这是这张带子成立的前提):
|
||||
* - 影像带是「氛围」,文字带是「索引」—— 后者即便被读,也是在读真实条目;
|
||||
* - 只横排,不滚动、不轮播、无动效(`check:motion` 的禁止项一条不碰);
|
||||
* - 条目数 ≤ 6(`slice(0, 6)` 由调用方决定取舍,组件不做静默截断)。
|
||||
*
|
||||
* 视觉上仍是「满幅打断」:上下各一道 hairline,内容贴 `container-x`,
|
||||
* 大字号(lg 20px)+ 竖分隔 hairline,读起来是版式而不是图。
|
||||
*/
|
||||
export function BandIndex({
|
||||
items,
|
||||
label,
|
||||
className,
|
||||
}: {
|
||||
items: { title: string; meta?: string }[];
|
||||
/** 带子左上的 mono 标签,如 "SOLUTIONS · 06";省略时只渲染条目 */
|
||||
label?: string;
|
||||
className?: string;
|
||||
}) {
|
||||
if (items.length === 0) return null;
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
|
||||
return (
|
||||
<section
|
||||
aria-label={label}
|
||||
className={cn('relative w-full border-y border-border-primary bg-bg-secondary', className)}
|
||||
>
|
||||
<div className="container-x py-10 lg:py-14">
|
||||
{label && (
|
||||
<div className="mb-8 flex items-center gap-4">
|
||||
<span className="font-mono text-caption tracking-[0.2em] text-text-tertiary">{label}</span>
|
||||
<span className="h-px flex-1 bg-border-secondary" />
|
||||
</div>
|
||||
)}
|
||||
{/* 用「每条一道上边线」而不是 gap-px + 容器底色:
|
||||
后者在条目不足一行时(例:新闻只有 2 条)会露出容器底色的空格子,
|
||||
截图里读成一个坏掉的块。边上线条则随条目数自然收束。 */}
|
||||
<ul className="grid grid-cols-1 gap-x-10 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{items.map((item, i) => (
|
||||
<li
|
||||
key={`${i}-${item.title}`}
|
||||
className="flex items-baseline gap-4 border-t border-border-primary py-5 pr-6"
|
||||
>
|
||||
<span className="font-mono text-caption tabular-nums text-text-tertiary">{pad(i + 1)}</span>
|
||||
<span className="flex-1">
|
||||
<span className="block text-base leading-snug text-ink lg:text-lg">{item.title}</span>
|
||||
{item.meta && (
|
||||
<span className="mt-1 block text-caption text-text-tertiary">{item.meta}</span>
|
||||
)}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
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(<HeroPlate />);
|
||||
const el = container.firstElementChild as HTMLElement;
|
||||
expect(el).toHaveAttribute('aria-hidden', 'true');
|
||||
expect(el.className).toContain('pointer-events-none');
|
||||
});
|
||||
|
||||
it('图片是空的 alt(装饰位),并且指向登记过的本地资产', () => {
|
||||
const { container } = render(<HeroPlate variant="glass" />);
|
||||
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(<HeroPlate variant={variant} />).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(<HeroPlate className="h-40 w-full" />);
|
||||
expect((container.firstElementChild as HTMLElement).className).toContain('h-40 w-full');
|
||||
});
|
||||
});
|
||||
@@ -1,62 +0,0 @@
|
||||
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 (
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className={cn('pointer-events-none relative overflow-hidden bg-bg-secondary', className)}
|
||||
>
|
||||
<Image
|
||||
src={PLATES[variant]}
|
||||
alt=""
|
||||
fill
|
||||
sizes="(min-width: 1024px) 40vw, 100vw"
|
||||
className="object-cover"
|
||||
priority={priority}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { StageIndex } from './stage-index';
|
||||
|
||||
/**
|
||||
* 这份测试盯的是**内容契约**,不是像素:
|
||||
* StageIndex 的合法性来自「每一行都对应页面真实条目」,所以断言集中在
|
||||
* ①条目数 = 渲染行数 ②「标题:说明」被拆成两段 ③空输入不产出空壳。
|
||||
* 版式(脊线、节点、字号)不进断言 —— 那属于视觉基线。
|
||||
*/
|
||||
describe('StageIndex', () => {
|
||||
const items = [
|
||||
'需求调研:深入了解企业业务流程和管理需求',
|
||||
'环境评估:评估服务器环境与网络架构',
|
||||
'方案设计:制定部署方案与数据迁移策略',
|
||||
];
|
||||
|
||||
it('按条目数渲染行,并给出 01—0N 的索引', () => {
|
||||
render(<StageIndex items={items} />);
|
||||
expect(screen.getAllByRole('listitem', { hidden: true })).toHaveLength(3);
|
||||
expect(screen.getByText('01 — 03')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('withDetail 时把「标题:说明」拆成两段,两段都在', () => {
|
||||
render(<StageIndex items={items} withDetail />);
|
||||
expect(screen.getByText('需求调研')).toBeInTheDocument();
|
||||
expect(screen.getByText('深入了解企业业务流程和管理需求')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('默认(无 withDetail)只渲染标题,不把说明也塞进来', () => {
|
||||
render(<StageIndex items={items} />);
|
||||
expect(screen.getByText('需求调研')).toBeInTheDocument();
|
||||
expect(screen.queryByText('深入了解企业业务流程和管理需求')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('空数组不产出空壳(没有条目就没有这一件)', () => {
|
||||
const { container } = render(<StageIndex items={[]} />);
|
||||
expect(container).toBeEmptyDOMElement();
|
||||
});
|
||||
|
||||
it('整块 aria-hidden:它是索引,不承担第二份朗读', () => {
|
||||
const { container } = render(<StageIndex items={items} />);
|
||||
expect(container.firstElementChild).toHaveAttribute('aria-hidden', 'true');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,108 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
/**
|
||||
* StageIndex —— 正文区的**内容图**(2026-12-01,ADR-0011 §8.6)。
|
||||
*
|
||||
* 为什么不是影像:本轮试过三种影像题材(抽象几何 / 建筑混凝土 / 技术静物),
|
||||
* 每次的问题都不是「题材选得不好」,而是**照片不承担语义** ——
|
||||
* 「实施流程」「企业套装」「解决方案」这些区块说的是关系与阶段,
|
||||
* 而材质静物只能提供气氛,读起来与文案无关。
|
||||
*
|
||||
* 这一件的立场:**图 = 该区块自己的内容**,把条目按阶段/序号排成一条脊线,
|
||||
* 序号、条目名、终止点全部来自真实数据(`product.process` / `service.process` /
|
||||
* 套件清单),不改写、不补写、不编造任何一格。
|
||||
*
|
||||
* 边界:
|
||||
* - 只吃**已经渲染在页面上**的条目(本件是索引,不是第二份内容源),因此整块 `aria-hidden`,
|
||||
* 屏幕阅读器不会被同一份文字读两遍,也不进 heading 层级(`check:headings` 分母不动)。
|
||||
* - 纯 token:脊线与分隔线走 `--color-border-primary`,序号走 mono,终止点用 `text-brand-ink`
|
||||
* (文字色,不铺红面,R16 不触发);无圆角、无阴影、无 hover、无动效。
|
||||
* - 条目数 3–8;超出由调用方截取,组件不做静默截断 —— 少一条也是内容变更。
|
||||
*/
|
||||
export function StageIndex({
|
||||
items,
|
||||
index,
|
||||
caption,
|
||||
withDetail = false,
|
||||
className,
|
||||
}: {
|
||||
/** 真实条目,允许「标题:说明」形态;组件只取冒号前的标题,说明留在下方正文里 */
|
||||
items: string[];
|
||||
/** 左上角 mono 索引,如 "01 — 06";省略时按条目数生成 */
|
||||
index?: string;
|
||||
/** 底部一行注记,描述这些条目是什么(如「六阶段交付」) */
|
||||
caption?: string;
|
||||
/** 为 true 时把「标题:说明」两段都渲染出来,用于本件**替代**卡片网格的场景 */
|
||||
withDetail?: boolean;
|
||||
className?: string;
|
||||
}) {
|
||||
const parsed = items
|
||||
.map((raw) => {
|
||||
const [title, ...rest] = raw.split(/[::]/);
|
||||
return { title: (title ?? '').trim(), detail: rest.join(':').trim() };
|
||||
})
|
||||
.filter((s) => s.title);
|
||||
const total = parsed.length;
|
||||
if (total === 0) return null;
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
|
||||
return (
|
||||
<div aria-hidden="true" className={cn('w-full', className)}>
|
||||
<div className="flex items-center gap-4">
|
||||
<span className="font-mono text-caption tracking-[0.2em] text-text-tertiary">
|
||||
{index ?? `${pad(1)} — ${pad(total)}`}
|
||||
</span>
|
||||
<span className="h-px flex-1 bg-border-primary" />
|
||||
</div>
|
||||
|
||||
{/* list-none + p-0:`<ol>` 默认有 40px 的 padding-inline-start,
|
||||
不清掉时节点会整体右移 40px,脊线留在原地 —— 第一版截图里「线和方块分家」就是这个。
|
||||
不引 reset,只在本件上认领这 40px。 */}
|
||||
<ol className="relative mt-5 list-none p-0">
|
||||
{/* 脊线:从第一枚节点连到最后一枚,止于末节点中心。
|
||||
颜色必须走 `--color-border-secondary`(#C3BDB1)—— 第一版用 border-primary
|
||||
(#F7F4EF)在奶油底上等于没画,截图里只剩一排悬空方块,读不出「一条线串起来」。 */}
|
||||
<span className="absolute left-[3px] top-2 bottom-2 w-px bg-border-secondary" />
|
||||
{parsed.map(({ title, detail }, i) => {
|
||||
const last = i === total - 1;
|
||||
return (
|
||||
<li
|
||||
key={`${i}-${title}`}
|
||||
className={cn(
|
||||
'relative flex gap-5 pl-0',
|
||||
withDetail ? 'items-start py-4' : 'items-baseline py-3.5',
|
||||
withDetail && i > 0 && 'border-t border-border-primary',
|
||||
)}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
'relative z-10 mt-1.5 h-2 w-2 shrink-0',
|
||||
last ? 'bg-brand-ink' : 'border border-border-secondary bg-bg-primary',
|
||||
)}
|
||||
/>
|
||||
<span className="mt-0.5 font-mono text-caption tabular-nums text-text-tertiary">
|
||||
{pad(i + 1)}
|
||||
</span>
|
||||
{withDetail ? (
|
||||
<span className="flex-1">
|
||||
<span className="block text-lg font-medium leading-snug text-ink">{title}</span>
|
||||
{detail && (
|
||||
<span className="mt-1.5 block text-sm leading-relaxed text-text-muted">
|
||||
{detail}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
) : (
|
||||
<span className={cn('text-base leading-snug', last ? 'text-ink' : 'text-text-secondary')}>
|
||||
{title}
|
||||
</span>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ol>
|
||||
|
||||
{caption && <p className="mt-4 text-caption text-text-tertiary">{caption}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user