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
@@ -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