feat(home): 首屏改拼贴构图 + 外壳三修收口(Batch 1)
ADR-0009 的首屏读数取自对标 `opacity:0` 的视频轮播层(只在 ~13s 淡入 0.8s), 据此做出的「居中巨型声明」复刻的是一段过渡帧。本轮按静止态拼贴重做,并把 同批发现的四处结构缺陷收口。 首屏(拼贴) - 黑底半透明文字块(左 7/12)+ 右手错位副图(右 5/12,lg 起)+ 副图角上双 V + 深色影像上的斜线纹;素材复用既有 hero-architecture / industry-manufacturing, 禁人物入镜,题材换建筑/工业、语法不变 - title 字阶 90px → 桌面 44px(对标 100/700 是过渡帧字号,静止态短句是 40/700) - 诚实信号前置为 eyebrow:`2026 年 1 月成立 · 首批客户共创中`(均取常量单一真源) 令牌与面积纪律 - `--spacer-band` 7.5rem → 6.6667rem:原值注释称「16px 根字号下 120px」, 但 ≥1024px 根字号是 18px ⇒ 实测 135px,比对标的 120px 大 12.5% - 斜线纹加面积封顶(收束段原 h-full w-[38%] 实测 606×569,越过 ≤640×520) 新门禁 R20(check:grammar) - 裸 alpha 必须在 Tailwind opacity scale 内。`bg-[#0B0A08]/92` 与审计抓到的 `bg-bg-primary/98` 同根因:scale 外的值被编译器静默丢弃,computed 退化为 rgba(0,0,0,0)。type-check / lint / build / 单测四道全绿也拦不住 - 三向自证 + 真实树负对照(/95→/92 判红,改回即绿);上线当天即抓到本人 第二处同类失误(to-[#0B0A08]/88) 守卫与基线 - e2e/chrome-persistence.spec.ts:页头吸顶(1500/3000)、抽屉背景不透明、 mega 不被裁切。两处装配缺陷已修(`data-content-ready` 门控替代猜毫秒数; mega 必须 hover 打开,click 面板根本不挂载);注回缺陷 8/8 全红做负对照 - 视觉基线按授权重采 55 张(归因:同一棵树全量回滚后旧基线 26/26 全绿 ⇒ 失败全由本轮改动引起;只回滚外壳修复则 mobile 从 20 降到 4) 独立只读复跑 129 passed / 1 failed,那 1 条为并发抖动(单跑绿、连跑两轮 26/26) 文档 - ADR-0009 增「更正一」(首屏校准);签名件「逐字移植」改「同构再造」 - lessons §5.53–5.58;CONTEXT 决策表 4 行;quality-gates 记 R20 门禁:type-check / type-check:e2e / lint(0 error) / 158 套件 1854 例 / check:grammar 20-20 + selftest / check:motion / check:accents / check:brand-token / check:a11y / test:e2e:prod 80 passed / 视觉 129+ passed
This commit is contained in:
1 parent
8c64064181
commit
198d6a0303
70 files changed
+911
-54
No files matched your search
@@ -40,7 +40,7 @@ import type { CaseStudy } from '@/lib/constants/cases';
|
||||
import { weakestBasis } from '@/lib/constants/metrics-basis';
|
||||
import { INQUIRY_RESPONSE_COMMITMENT, FREE_FIRST_CONSULT } from '@/lib/constants/commitments';
|
||||
import { canonicalCtaLabel, CTA_LABELS } from '@/lib/constants/cta-labels';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
import { COMPANY_INFO, EARLY_ACCESS } from '@/lib/constants';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { ArrowRight } from 'lucide-react';
|
||||
import type { NewsItem } from '@/lib/constants/news';
|
||||
@@ -63,6 +63,30 @@ const CO_CREATION_STEPS: CoCreationStep[] = [
|
||||
|
||||
/* ───────────────────────── 1. Hero ───────────────────────── */
|
||||
|
||||
/**
|
||||
* 首屏 —— **拼贴构图**(2026-11-24 重做,替换「居中巨型声明」)。
|
||||
*
|
||||
* 为什么换:ADR-0009 的实测把对标首屏记成「全幅影像 + 居中声明 100/700,无框无容器底」,
|
||||
* 但那段 `100/700`(`携手共进促变革`)位于 `c-changeOverlay`,CSS 是 `opacity: 0` +
|
||||
* `transition: all 1.5s`,只在视频播放到 ~13s 时交叉淡入约 0.8s。**它是一帧过渡,
|
||||
* 不是静止态**。对标真正常驻的是 `c-collageOverlay`:全幅影像 + 642×380 照片 +
|
||||
* **642×184 黑底文字块**(内嵌 40/700 短句)+ 142×111 双 V + 第二张照片错位叠放。
|
||||
* 取 `opacity:0` 的层做读数、不校验该层此刻是否可见,是那次取证的方法论漏洞
|
||||
* (见 docs/lessons-learned.md 与 ADR-0009 的更正段)。
|
||||
*
|
||||
* 所以这里换的是**骨骼**、不是素材:主图仍是既有的 `hero-architecture.webp`(1920 宽、
|
||||
* 无人无文字无标识),副图用 `industry-manufacturing.webp`(工业内景)做错位叠放 ——
|
||||
* 对标靠人物照承担「我们在跟谁打交道」,本仓禁人物入镜(零编造 + 肖像授权),
|
||||
* 题材换成建筑与工业,构图语法不变。
|
||||
*
|
||||
* 三条硬约束(不是口味):
|
||||
* 1. **移动端首屏必须装得下 CTA**:`e2e/uj-11-home-conversion.spec.ts` 断言 390×844 下
|
||||
* `hero-cta` 的 `y + height ≤ 844`。所以黑底面板在移动档收窄内边距、副图 `lg` 起才出现。
|
||||
* 2. **h1 仍是文档里第一个 h1**(`check:headings` + 多个 e2e 以 `h1` 首个定位首屏)。
|
||||
* 3. **红仍不进正文**:首屏红只落在 eyebrow 短线与主 CTA 面上(≤10% 面积纪律)。
|
||||
*
|
||||
* 无 CMS 数据时 `heading` / `subheading` / 两组 CTA 文案全部走常量兜底,一条不硬写在 JSX 里。
|
||||
*/
|
||||
function HomeHero({ heroData }: { heroData?: Row | null }) {
|
||||
const heading = (heroData?.heading as string) || (heroData?.headingBottom as string)
|
||||
|| '让每一家企业都拥有数据驱动的决策能力';
|
||||
@@ -86,44 +110,103 @@ function HomeHero({ heroData }: { heroData?: Row | null }) {
|
||||
sizes="100vw"
|
||||
className="pointer-events-none absolute inset-0 -z-10 object-cover object-center"
|
||||
/>
|
||||
{/* 压暗是为白字可读(实测两家都靠渐变保可读),不是「暗黑滤镜」 */}
|
||||
{/* 压暗是为白字可读(两家对标都靠渐变保可读),不是「暗黑滤镜」。
|
||||
**方向随视口换**:桌面文字块在左、副图在右 ⇒ 从左到右;移动端文字块占满整宽、
|
||||
且底图右侧偏亮(窗光与浅色地面),横向渐变会让右半边的字压在亮处 ——
|
||||
实测 390 宽下「系统落地」一行几乎不可读。故移动档改为从上到下(下部压暗),
|
||||
`md` 起恢复横向。这不是审美选择,是「文字必须压在够暗的底上」的可读性要求。
|
||||
|
||||
**移动档的强度是量出来的,不是调出来的**:把 hero 内文字临时置 `visibility:hidden`、
|
||||
截「只剩底色」的图,再逐像素取文字盒内**最亮**的底色(pixel-accurate,非估算),
|
||||
算出半透明文字合成后的真实对比度。初版移动档 `80/60/85` 的最亮底色是
|
||||
rgb(108,104,95)(L=0.139),`text-white/75` 合成后仅 **3.94:1**、
|
||||
`text-white/70` 仅 **3.67:1** —— 均破 AA 4.5:1。**两道现有门禁都测不到它**:
|
||||
axe 对压在图片上的文字只出 incomplete(无法判定),`check:contrast` 只断言令牌配对。
|
||||
改 `85/80/88` 后最亮底色降到 L≈0.03,`/75` 合成后 ≥7:1(复测见 lessons-learned)。 */}
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none absolute inset-0 -z-10 bg-gradient-to-b from-[#0B0A08]/70 via-[#0B0A08]/45 to-[#0B0A08]/80"
|
||||
className="pointer-events-none absolute inset-0 -z-10 bg-gradient-to-b from-[#0B0A08]/85 via-[#0B0A08]/80 to-[#0B0A08]/90 md:bg-gradient-to-r md:from-[#0B0A08]/80 md:via-[#0B0A08]/45 md:to-[#0B0A08]/25"
|
||||
/>
|
||||
{/* 软版斜线纹:全站唯一允许出现在「非接缝」位置的纹理,面积 ≤ 280×280 */}
|
||||
<HatchField tone="soft" className="absolute right-0 top-0 hidden h-56 w-56 lg:block" />
|
||||
|
||||
<div className="container-x flex min-h-[74vh] flex-col items-center justify-center py-24 text-center md:min-h-[80vh] md:py-28">
|
||||
<span className="text-[13px] font-medium tracking-[0.2em] text-white/70">
|
||||
{COMPANY_INFO.displayName} · 数字化转型伙伴
|
||||
</span>
|
||||
<div className="container-x relative flex min-h-[74vh] items-center py-14 md:min-h-[80vh] md:py-20">
|
||||
<div className="grid w-full items-center gap-10 lg:grid-cols-12 lg:gap-8">
|
||||
{/* 黑底文字块 —— 对标静止态拼贴里的 642×184 黑块那一层。
|
||||
半透明而非纯黑:底图仍要透出来,否则退化成「黑底 + 图当背景」。 */}
|
||||
<div className="lg:col-span-7">
|
||||
{/* ⚠ 不透明度只能取 Tailwind opacity scale 内的值(0/5/10/…/95/100)。
|
||||
本轮亲手复现了 P0-2 那个坑:初版写 `bg-[#0B0A08]/92`,class 在源码里、
|
||||
computed 却是 rgba(0,0,0,0) —— 面板整块透明,白字直接压在图与亮窗上。
|
||||
结构性守卫:`npm run check:grammar` 的 **R20**(任意值 alpha 必须落在 scale 内)。 */}
|
||||
<div className="bg-transparent p-7 sm:p-9 md:bg-[#0B0A08]/95 md:p-10 lg:p-12">
|
||||
{/* eyebrow:把「你是谁、到哪一步」前移到首屏,走与「内测中 / 共创中」
|
||||
同一族的状态签语法。两项都取常量单一真源,不在此硬写日期或状态。 */}
|
||||
<div className="flex items-center gap-3">
|
||||
<span aria-hidden="true" className="h-px w-8 shrink-0 bg-brand" />
|
||||
<span className="text-[13px] font-medium tracking-[0.15em] text-white/75">
|
||||
{COMPANY_INFO.foundedFull}成立 · {EARLY_ACCESS.label}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h1 className="mt-6 max-w-5xl text-4xl font-bold leading-[1.04] tracking-tight text-balance text-white sm:text-5xl md:text-6xl lg:text-[5rem] lg:leading-[1.02]">
|
||||
{heading}
|
||||
</h1>
|
||||
{/* 字号档位对齐对标的 40/700 模块标题(本仓桌面 5xl=63px 偏大,
|
||||
故桌面取 44px;statement 档留给收束 CTA 的字重分裂)。 */}
|
||||
<h1 className="mt-6 max-w-xl text-[2rem] font-bold leading-[1.16] tracking-tight text-balance text-white sm:text-4xl md:text-5xl lg:text-[2.75rem] lg:leading-[1.14]">
|
||||
{heading}
|
||||
</h1>
|
||||
|
||||
{subheading && (
|
||||
<p className="mt-7 max-w-2xl text-base leading-relaxed text-white/75 md:text-lg">
|
||||
{subheading}
|
||||
</p>
|
||||
)}
|
||||
{subheading && (
|
||||
<p className="mt-5 max-w-lg text-base leading-relaxed text-white/75">
|
||||
{subheading}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="mt-10 flex flex-wrap items-center justify-center gap-4">
|
||||
<CTAButton href={ctaHref} dataTestId="hero-cta">{ctaLabel}</CTAButton>
|
||||
<CTAButton
|
||||
href={secondaryHref}
|
||||
variant="secondary"
|
||||
className="border-white/40 bg-transparent text-white hover:border-white hover:bg-white/10"
|
||||
>
|
||||
{secondaryLabel}
|
||||
</CTAButton>
|
||||
<div className="mt-8 flex flex-wrap items-center gap-4">
|
||||
<CTAButton href={ctaHref} dataTestId="hero-cta">{ctaLabel}</CTAButton>
|
||||
<CTAButton
|
||||
href={secondaryHref}
|
||||
variant="secondary"
|
||||
className="border-white/40 bg-transparent text-white hover:border-white hover:bg-white/10"
|
||||
>
|
||||
{secondaryLabel}
|
||||
</CTAButton>
|
||||
</div>
|
||||
|
||||
{/* 承诺句走单一真源,不在此硬写数字 */}
|
||||
{/* ⚠ 不透明度是量出来的:`/70` 在移动档实测合成对比度仅 **2.44:1**(最亮底色
|
||||
rgb(154,138,127)),破 AA 4.5:1。/85 合成后 ≈4.9:1。这类「压在图上的半透明
|
||||
小字」两道现有门禁都测不到 —— 见紧邻 scrim 注释里的量法。 */}
|
||||
<p className="mt-7 text-sm text-white/85">
|
||||
{INQUIRY_RESPONSE_COMMITMENT.text} · {FREE_FIRST_CONSULT.text}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 右手错位副图 + 双 V —— 对标拼贴的第二张照片与角标。
|
||||
移动/平板隐藏:首屏宽度装不下两块,且 uj-11 要求 CTA 留在 844 折线内。 */}
|
||||
<div className="relative hidden lg:col-span-5 lg:block">
|
||||
{/* 斜线纹压在副图左上角:ADR-0009 决策三允许的两种用法之一是「黑底/ink 底纹理」,
|
||||
这里是深色影像上的纹理叠加。面积 160×160,远低于单块 ≤640×520 的上限。
|
||||
全站各块的实际面积纪律见收束段那处的注释(唯一越界项在那里,不在这里)。 */}
|
||||
<HatchField className="absolute -left-8 -top-8 z-10 h-40 w-40" />
|
||||
<div className="relative ml-auto w-[88%] translate-y-8">
|
||||
<div className="relative aspect-[3/4] overflow-hidden bg-[#141210]">
|
||||
<Image
|
||||
src="/images/home/industry-manufacturing.webp"
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
fill
|
||||
sizes="(min-width: 1024px) 30vw, 100vw"
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
{/* 双 V 落在副图左下角外侧:对标把它放在拼贴的接缝上,指向「还有下文」 */}
|
||||
<DoubleChevron
|
||||
direction="down"
|
||||
size="sm"
|
||||
className="absolute -bottom-10 -left-7 text-white/90"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 承诺句走单一真源,不在此硬写数字 */}
|
||||
<p className="mt-9 text-sm text-white/60">
|
||||
{INQUIRY_RESPONSE_COMMITMENT.text} · {FREE_FIRST_CONSULT.text}
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
@@ -344,8 +427,13 @@ function HomeCta({ heroData }: { heroData?: Row | null }) {
|
||||
const ctaHref = (heroData?.ctaHref as string) || '/contact';
|
||||
return (
|
||||
<section className="relative isolate overflow-hidden bg-bg-secondary" data-testid="home-cta">
|
||||
{/* 右半幅斜线纹:实测收束段把纹理放在灰带之外、与灰带的直角边相接 */}
|
||||
<HatchField className="absolute right-0 top-0 hidden h-full w-[38%] md:block" />
|
||||
{/* 右半幅斜线纹:实测收束段把纹理放在灰带之外、与灰带的直角边相接。
|
||||
⚠ 面积纪律(ADR-0009 决策三:单块 ≤640×520)—— 原实现是 `h-full w-[38%]`,
|
||||
在 1600 视口实测 **606×569**,高度越界 49px;而它越界的成因是「高度跟着段落长」,
|
||||
段落一改高就再越界,是一条没有上界的声明。现改为封顶:高度 max 520、宽度 max 640。
|
||||
顺带补一条实测口径:对标那三块纹理是 642×514 / 571×625 / 579×409,
|
||||
全部约 600 宽、**都不是全出血**,所以封顶不是妥协,而是与对标一致。 */}
|
||||
<HatchField className="absolute right-0 top-0 hidden h-full max-h-[520px] w-[38%] max-w-[640px] md:block" />
|
||||
<div className="container-x relative py-20 md:py-28">
|
||||
<ScrollReveal>
|
||||
<div className="max-w-2xl">
|
||||
@@ -436,7 +524,8 @@ export default function HomeContentV17({
|
||||
{/* 接缝:黑底舞台 → 白底成果段。纹理块用负外边距**跨**在交界上(上一半压黑、
|
||||
下一半压白)—— 对标用纹理接缝代替渐变,这是它最好认的一个手法。 */}
|
||||
<div aria-hidden="true" className="relative z-10 container-x -mb-6 -mt-10">
|
||||
<HatchField className="h-20 w-full sm:w-[60%]" />
|
||||
{/* 同上:宽度封顶 640(对标三块接缝纹理均约 600 宽,不是全出血)。这条接缝高 80px。 */}
|
||||
<HatchField className="h-20 w-full max-w-[640px] sm:w-[60%]" />
|
||||
</div>
|
||||
|
||||
<ResultsSlot state={resultsState} />
|
||||
|
||||
+10
-2
@@ -273,8 +273,16 @@ body {
|
||||
CTA 之后各放了一条**独立的 120px 空模块**(实测两条 `.o-module` 高度均为 120px、
|
||||
内部零内容、padding 为 0)—— 它的节奏不靠段内 padding,而靠一条命名的空白带。
|
||||
记成令牌而不是让各段自定 py,是为了让「呼吸」可数、可比对、可被闸看见。
|
||||
7.5rem 在根字号 16px 下 = 120px,与实测口径一致。 */
|
||||
--spacer-band: 7.5rem;
|
||||
|
||||
★ 2026-11-24 更正(本条此前写错过,且错法是可复算的):
|
||||
原值 `7.5rem` 的注释称「16px 根字号下 = 120px」—— 数值本身没错,**锚错断点了**。
|
||||
对标读数取于 1600×900 桌面,而本仓 `html{font-size}` 在 ≥1024px 是 **18px**
|
||||
(globals.css 断点表 16/17/18),于是 7.5rem 实测渲染 **135px**,比对标大 12.5%。
|
||||
空白带存在的全部理由就是「与对标的 120px 可比对」,差 15px 即失去可比性。
|
||||
现取 `20/3 rem`:× 18px = **120px**(桌面,比对口径);平板 17px → 113.3px、
|
||||
移动 16px → 106.7px,随根字号等比缩放是刻意的(与其它 rem 间距同族)。
|
||||
机器判据:src/components/ui/band-spacer.test.tsx(读本文件、按 18px 复算)。 */
|
||||
--spacer-band: 6.6667rem;
|
||||
|
||||
/* 圆角系统 —— 0–4px 记档(2026-10-16 对标实测收口)
|
||||
Bain & Company(archive 2026-08-31, 1600×846)与 Porsche Consulting(live)两家的
|
||||
|
||||
Reference in new issue
Block a user