同步工作区剩余变更,主要包括: - 营销页面组件与布局持续优化(about/news/services/solutions/team 等) - 详情页四层叙事组件、布局组件、UI 组件调整 - CMS 数据模型、API 路由、权限、工作流、站内通知、媒体管理扩展 - 新增/补充单元测试与 E2E 测试(cms-workflow.spec.ts 等) - ESLint 9 迁移、jest/tsconfig 配置更新、依赖调整 - 新增 ADR、CMS 评估文档、Release Review / Acceptance 报告 - 移除水墨装饰组件与大体积未使用字体文件
159 lines
3.8 KiB
TypeScript
159 lines
3.8 KiB
TypeScript
export type HeroLayout = 'left' | 'center' | 'wide' | 'icon-left';
|
|
|
|
export interface HeroTexture {
|
|
type: 'grid' | 'data-flow' | 'layers' | 'shield-hex' | 'circuit' | 'none';
|
|
opacity: number;
|
|
color?: string;
|
|
}
|
|
|
|
export interface HeroTheme {
|
|
id: string;
|
|
name: string;
|
|
gradientFrom: string;
|
|
gradientTo: string;
|
|
gradientAngle: number;
|
|
accentColor: string;
|
|
accentBg: string;
|
|
texture: HeroTexture;
|
|
layout: HeroLayout;
|
|
badge?: string;
|
|
}
|
|
|
|
export const HERO_THEMES: Record<string, HeroTheme> = {
|
|
erp: {
|
|
id: 'erp',
|
|
name: 'ERP',
|
|
gradientFrom: '#f8f6f3',
|
|
gradientTo: '#f0ebe4',
|
|
gradientAngle: 135,
|
|
accentColor: '#1e3a5f',
|
|
accentBg: 'rgba(30, 58, 95, 0.06)',
|
|
texture: { type: 'grid', opacity: 0.03 },
|
|
layout: 'left',
|
|
badge: '企业套装',
|
|
},
|
|
crm: {
|
|
id: 'crm',
|
|
name: 'CRM',
|
|
gradientFrom: '#f7f5f2',
|
|
gradientTo: '#eee9e2',
|
|
gradientAngle: 120,
|
|
accentColor: '#1e40af',
|
|
accentBg: 'rgba(30, 64, 175, 0.06)',
|
|
texture: { type: 'layers', opacity: 0.03 },
|
|
layout: 'left',
|
|
badge: '企业套装',
|
|
},
|
|
bi: {
|
|
id: 'bi',
|
|
name: 'BI',
|
|
gradientFrom: '#f6f8fa',
|
|
gradientTo: '#eef1f5',
|
|
gradientAngle: 145,
|
|
accentColor: '#0c4a6e',
|
|
accentBg: 'rgba(12, 74, 110, 0.06)',
|
|
texture: { type: 'data-flow', opacity: 0.03 },
|
|
layout: 'left',
|
|
badge: '企业套装',
|
|
},
|
|
cms: {
|
|
id: 'cms',
|
|
name: 'CMS',
|
|
gradientFrom: '#f5f8f5',
|
|
gradientTo: '#eaf0ea',
|
|
gradientAngle: 130,
|
|
accentColor: '#14532d',
|
|
accentBg: 'rgba(20, 83, 45, 0.06)',
|
|
texture: { type: 'layers', opacity: 0.03 },
|
|
layout: 'left',
|
|
badge: '企业套装',
|
|
},
|
|
sds: {
|
|
id: 'sds',
|
|
name: 'SDS',
|
|
gradientFrom: '#faf7f4',
|
|
gradientTo: '#f3ede5',
|
|
gradientAngle: 140,
|
|
accentColor: '#78350f',
|
|
accentBg: 'rgba(120, 53, 15, 0.06)',
|
|
texture: { type: 'data-flow', opacity: 0.03 },
|
|
layout: 'left',
|
|
badge: '企业套装',
|
|
},
|
|
oa: {
|
|
id: 'oa',
|
|
name: 'OA',
|
|
gradientFrom: '#f7f5fa',
|
|
gradientTo: '#efeaf5',
|
|
gradientAngle: 125,
|
|
accentColor: '#4c1d95',
|
|
accentBg: 'rgba(76, 29, 149, 0.06)',
|
|
texture: { type: 'grid', opacity: 0.03 },
|
|
layout: 'left',
|
|
badge: '企业套装',
|
|
},
|
|
novavis: {
|
|
id: 'novavis',
|
|
name: 'NovaVis',
|
|
gradientFrom: '#f4fafa',
|
|
gradientTo: '#e8f3f3',
|
|
gradientAngle: 150,
|
|
accentColor: '#0f3d3e',
|
|
accentBg: 'rgba(15, 61, 62, 0.06)',
|
|
texture: { type: 'data-flow', opacity: 0.04 },
|
|
layout: 'wide',
|
|
badge: '专业产品',
|
|
},
|
|
solution: {
|
|
id: 'solution',
|
|
name: '解决方案',
|
|
gradientFrom: '#f8f6f3',
|
|
gradientTo: '#f0ebe4',
|
|
gradientAngle: 150,
|
|
accentColor: '#C41E3A',
|
|
accentBg: 'rgba(196, 30, 58, 0.06)',
|
|
texture: { type: 'circuit', opacity: 0.02 },
|
|
layout: 'center',
|
|
},
|
|
service: {
|
|
id: 'service',
|
|
name: '服务',
|
|
gradientFrom: '#f7f5f2',
|
|
gradientTo: '#eee9e2',
|
|
gradientAngle: 135,
|
|
accentColor: '#C41E3A',
|
|
accentBg: 'rgba(196, 30, 58, 0.06)',
|
|
texture: { type: 'none', opacity: 0 },
|
|
layout: 'icon-left',
|
|
},
|
|
security: {
|
|
id: 'security',
|
|
name: '安全产品',
|
|
gradientFrom: '#faf5f5',
|
|
gradientTo: '#f5eded',
|
|
gradientAngle: 135,
|
|
accentColor: '#991b1b',
|
|
accentBg: 'rgba(153, 27, 27, 0.06)',
|
|
texture: { type: 'shield-hex', opacity: 0.03 },
|
|
layout: 'wide',
|
|
badge: '安全合规',
|
|
},
|
|
default: {
|
|
id: 'default',
|
|
name: '默认',
|
|
gradientFrom: '#f8f6f3',
|
|
gradientTo: '#f0ebe4',
|
|
gradientAngle: 140,
|
|
accentColor: '#C41E3A',
|
|
accentBg: 'rgba(196, 30, 58, 0.06)',
|
|
texture: { type: 'none', opacity: 0 },
|
|
layout: 'left',
|
|
},
|
|
};
|
|
|
|
export function getHeroTheme(id: string): HeroTheme {
|
|
const theme = HERO_THEMES[id];
|
|
if (theme) return theme;
|
|
return HERO_THEMES['default']!;
|
|
}
|