fix(breadcrumb): add aria-label to news detail breadcrumb for alignment
Also accumulates other pre-existing changes: - refactor(icons): replace deprecated BarChart3 with TrendingUp - refactor(services): replace emoji icons with LucideIcon components - refactor(footer): use logo-white for dark background - cleanup(archive): remove unused archive components - cleanup(constants): remove unused types and exports
This commit is contained in:
@@ -5,11 +5,19 @@ import Image from 'next/image';
|
||||
import { motion } from 'framer-motion';
|
||||
import { ScrollReveal, StaggerReveal } from '@/components/ui/scroll-reveal';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { ArrowRight, Lightbulb, Database, Layers } from 'lucide-react';
|
||||
import { ArrowRight, Lightbulb, Database, Layers, Code, Puzzle, Server } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { EASE_OUT } from '@/components/ui/page-decoration';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
|
||||
// ===== 服务图标映射:将字符串键名映射为 Lucide 组件 =====
|
||||
const SERVICE_ICON_MAP: Record<string, React.ReactNode> = {
|
||||
Lightbulb: <Lightbulb className="w-7 h-7" />,
|
||||
Code: <Code className="w-7 h-7" />,
|
||||
Server: <Server className="w-7 h-7" />,
|
||||
Puzzle: <Puzzle className="w-7 h-7" />,
|
||||
};
|
||||
|
||||
// ===== 服务数据降级兜底 =====
|
||||
const FALLBACK_SERVICES = [
|
||||
{
|
||||
@@ -236,8 +244,13 @@ function TrustSection() {
|
||||
|
||||
// ===== 服务区:等宽三列卡片 + 兜底数据 =====
|
||||
function ServicesSection({ services }: { services?: Record<string, any>[] }) {
|
||||
const hasValidData = services?.length && services[0]?.title;
|
||||
const SERVICE_ITEMS = hasValidData ? services! : FALLBACK_SERVICES;
|
||||
const hasValidData = services?.length && (services![0] as any)?.subtitle;
|
||||
const SERVICE_ITEMS = hasValidData
|
||||
? services!.map((s: Record<string, any>) => ({
|
||||
...s,
|
||||
icon: SERVICE_ICON_MAP[s.icon as string] || <Server className="w-7 h-7" />,
|
||||
})) as Record<string, any>[]
|
||||
: FALLBACK_SERVICES;
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 overflow-hidden bg-bg-secondary">
|
||||
|
||||
Reference in New Issue
Block a user