chore: archive 8 legacy component versions to _archive/

Archive old component versions no longer in use:
- home-content.tsx (orphan, superseded by v14)
- solution-detail-content-v1/v2 (superseded by v3)
- service-detail-content-v1/v2/v3 (superseded by v4)
- news-detail-content-v1/v2 (superseded by v3)

All pages verified to use CMS data layer:
home, products, solutions, services, cases, news, about, team, contact
Quality gates: type-check, 992 tests, coverage all passing.
This commit is contained in:
2026-07-31 21:47:47 +08:00
parent 2fdee7e2ae
commit 20550558b8
8 changed files with 0 additions and 0 deletions
@@ -1,193 +0,0 @@
'use client';
import { ScrollReveal } from '@/components/ui/scroll-reveal';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { Calendar, ArrowLeft, Newspaper, ArrowRight } from 'lucide-react';
import { NEWS } from '@/lib/constants';
import { cn } from '@/lib/utils';
function GrainOverlay() {
return (
<div
className="absolute inset-0 pointer-events-none opacity-[0.03] mix-blend-overlay"
style={{
backgroundImage:
"url(\"data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E\")",
}}
/>
);
}
function SectionLabel({ children, className = '' }: { children: React.ReactNode; className?: string }) {
return (
<div className={cn('flex items-center gap-5 mb-7', className)}>
<div className="w-14 h-px bg-brand" />
<span className="text-[11px] tracking-[0.4em] uppercase font-bold text-brand">
{children}
</span>
<div className="w-14 h-px bg-brand" />
</div>
);
}
function RelatedNewsCard({ news }: { news: typeof NEWS[0] }) {
return (
<a
href={`/news/${news.id}`}
className="group relative block border border-white/10 hover:border-brand/40 bg-ink transition-all duration-600 hover:-translate-y-2 overflow-hidden h-full"
>
<div className="absolute top-0 left-0 right-0 h-1 bg-brand scale-x-0 group-hover:scale-x-100 transition-transform duration-700 origin-left" />
<div className="aspect-video bg-ink-light overflow-hidden">
{news.image ? (
<img
src={news.image}
alt={news.title}
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"
/>
) : (
<div className="w-full h-full bg-gradient-to-br from-brand/10 to-ink-light flex items-center justify-center">
<Newspaper className="w-10 h-10 text-brand/30" />
</div>
)}
</div>
<div className="p-5">
<Badge variant="outline" className="mb-3 text-xs border-brand/30 text-brand">
{news.category}
</Badge>
<h3 className="text-base font-semibold text-white mb-2 line-clamp-2 group-hover:text-brand transition-colors duration-300 leading-snug">
{news.title}
</h3>
<p className="text-sm text-white/50 line-clamp-2 leading-relaxed">{news.excerpt}</p>
</div>
</a>
);
}
interface NewsDetailContentV1Props {
news: typeof NEWS[0];
}
export default function NewsDetailContentV1({ news }: NewsDetailContentV1Props) {
const relatedNews = NEWS
.filter((n) => n.id !== news.id && n.category === news.category)
.slice(0, 3);
return (
<div className="min-h-screen bg-ink text-white overflow-x-hidden">
{/* Hero Section */}
<section className="relative pt-32 pb-16 lg:pt-40 lg:pb-20 overflow-hidden">
<GrainOverlay />
<div className="absolute inset-0 bg-gradient-to-b from-ink-light/50 to-ink pointer-events-none" />
<div className="max-w-container mx-auto px-6 lg:px-10 relative z-10">
<ScrollReveal>
<nav className="flex items-center gap-2 text-sm text-white/50 mb-10">
<a href="/news" className="hover:text-brand transition-colors duration-300">
新闻动态
</a>
<span>/</span>
<span className="text-white/80 line-clamp-1">{news.title}</span>
</nav>
</ScrollReveal>
<ScrollReveal delay={0.1} className="max-w-4xl">
<Badge variant="outline" className="mb-6 border-brand/30 text-brand text-sm">
{news.category}
</Badge>
<h1 className="text-3xl sm:text-4xl lg:text-5xl font-bold tracking-tight leading-tight">
{news.title}
</h1>
<div className="flex items-center gap-6 mt-8 text-white/50 text-sm">
<div className="flex items-center gap-2">
<Calendar className="w-4 h-4" />
{news.date}
</div>
</div>
<div className="mt-10 h-px bg-gradient-to-r from-brand/50 via-white/10 to-transparent" />
</ScrollReveal>
</div>
</section>
{/* Article Body Section */}
<section className="relative pb-24 lg:pb-32 overflow-hidden bg-ink">
<div className="max-w-container mx-auto px-6 lg:px-10">
<ScrollReveal className="max-w-4xl mx-auto">
{/* Featured Image */}
{news.image ? (
<div className="aspect-video overflow-hidden mb-12 border border-white/10">
<img
src={news.image}
alt={news.title}
className="w-full h-full object-cover"
/>
</div>
) : (
<div className="aspect-video bg-gradient-to-br from-brand/10 to-ink-light mb-12 flex items-center justify-center border border-white/10">
<Newspaper className="w-20 h-20 text-brand/20" />
</div>
)}
{/* Excerpt */}
<div className="mb-12 p-8 border-t-2 border-brand bg-brand/[0.04]">
<p className="text-lg text-white/80 leading-relaxed italic">
{news.excerpt}
</p>
</div>
{/* Article Content */}
<div className="prose prose-invert max-w-none">
<div className="text-white/80 text-base sm:text-lg leading-[1.9] whitespace-pre-line">
{news.content}
</div>
</div>
</ScrollReveal>
{/* Related News */}
{relatedNews.length > 0 && (
<div className="mt-24 pt-20 border-t border-white/10">
<ScrollReveal className="mb-16">
<SectionLabel>Related News</SectionLabel>
<h2 className="text-3xl md:text-4xl font-bold text-white tracking-tight leading-tight">
相关新闻
</h2>
</ScrollReveal>
<ScrollReveal delay={0.1}>
<div className="grid md:grid-cols-3 gap-6 md:gap-8">
{relatedNews.map((related) => (
<RelatedNewsCard key={related.id} news={related} />
))}
</div>
</ScrollReveal>
</div>
)}
{/* Navigation */}
<ScrollReveal>
<div className="mt-20 flex flex-wrap justify-center gap-4">
<Button size="lg" variant="outline" asChild>
<a href="/news">
<ArrowLeft className="w-4 h-4 mr-2" />
返回新闻列表
</a>
</Button>
<Button size="lg" asChild>
<a href="/contact">
联系我们
<ArrowRight className="w-4 h-4 ml-2" />
</a>
</Button>
</div>
</ScrollReveal>
</div>
</section>
</div>
);
}
@@ -1,170 +0,0 @@
'use client';
import { ScrollReveal } from '@/components/ui/scroll-reveal';
import { Badge } from '@/components/ui/badge';
import { Calendar, ArrowLeft, Newspaper, ArrowRight } from 'lucide-react';
import { NEWS } from '@/lib/constants';
import { SectionLabel, EASE_OUT } from '@/components/ui/page-decoration';
import { motion } from 'framer-motion';
function RelatedNewsCard({ news, index }: { news: typeof NEWS[0]; index: number }) {
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: '-80px' }}
transition={{ duration: 0.5, delay: index * 0.1, ease: EASE_OUT }}
>
<a
href={`/news/${news.id}`}
className="group relative block border border-border-primary hover:border-brand/30 bg-white transition-all duration-500 hover:-translate-y-2 overflow-hidden h-full"
>
<div className="absolute top-0 left-0 bottom-0 w-1 bg-brand scale-y-0 group-hover:scale-y-100 transition-transform duration-500 origin-top" />
<div className="aspect-video bg-bg-secondary overflow-hidden">
{news.image ? (
<img
src={news.image}
alt={news.title}
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"
/>
) : (
<div className="w-full h-full bg-gradient-to-br from-brand/[0.08] to-bg-secondary flex items-center justify-center">
<Newspaper className="w-10 h-10 text-brand/30" />
</div>
)}
</div>
<div className="p-5 sm:p-6">
<Badge variant="outline" className="mb-3 text-xs border-brand/30 text-brand">
{news.category}
</Badge>
<h3 className="text-base font-semibold text-ink mb-2 line-clamp-2 group-hover:text-brand transition-colors duration-300 leading-snug">
{news.title}
</h3>
<p className="text-sm text-text-secondary line-clamp-2 leading-relaxed">{news.excerpt}</p>
</div>
</a>
</motion.div>
);
}
interface NewsDetailContentV2Props {
news: typeof NEWS[0];
}
export default function NewsDetailContentV2({ news }: NewsDetailContentV2Props) {
const relatedNews = NEWS
.filter((n) => n.id !== news.id && n.category === news.category)
.slice(0, 3);
return (
<div className="min-h-screen bg-white text-ink overflow-x-hidden">
{/* Hero Section */}
<section className="relative pt-28 sm:pt-32 md:pt-40 pb-16 sm:pb-20 md:pb-24 overflow-hidden">
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10">
<ScrollReveal>
<nav className="flex items-center gap-2 text-sm text-text-muted mb-8 sm:mb-10">
<a href="/news" className="hover:text-brand transition-colors duration-300">
新闻动态
</a>
<span>/</span>
<span className="text-text-secondary line-clamp-1">{news.title}</span>
</nav>
</ScrollReveal>
<ScrollReveal delay={0.1} className="max-w-4xl">
<Badge variant="outline" className="mb-6 border-brand/30 text-brand text-sm">
{news.category}
</Badge>
<h1 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight leading-tight">
{news.title}
</h1>
<div className="flex items-center gap-6 mt-8 text-text-muted text-sm">
<div className="flex items-center gap-2">
<Calendar className="w-4 h-4" />
{news.date}
</div>
</div>
<div className="mt-10 h-px bg-gradient-to-r from-brand/50 via-border-primary to-transparent" />
</ScrollReveal>
</div>
</section>
{/* Article Body Section */}
<section className="relative pb-20 sm:pb-28 md:pb-36 overflow-hidden bg-white">
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10">
<ScrollReveal className="max-w-4xl mx-auto">
{/* Featured Image */}
{news.image ? (
<div className="aspect-video overflow-hidden mb-10 sm:mb-12 border border-border-primary">
<img
src={news.image}
alt={news.title}
className="w-full h-full object-cover"
/>
</div>
) : (
<div className="aspect-video bg-gradient-to-br from-brand/[0.08] to-bg-secondary mb-10 sm:mb-12 flex items-center justify-center border border-border-primary">
<Newspaper className="w-20 h-20 text-brand/20" />
</div>
)}
{/* Excerpt */}
<div className="mb-10 sm:mb-12 p-6 sm:p-8 border-t-2 border-brand bg-brand/[0.04]">
<p className="text-base sm:text-lg text-text-secondary leading-relaxed italic">
{news.excerpt}
</p>
</div>
{/* Article Content */}
<div className="text-text-secondary text-base sm:text-lg leading-[1.9] whitespace-pre-line">
{news.content}
</div>
</ScrollReveal>
{/* Related News */}
{relatedNews.length > 0 && (
<div className="mt-20 sm:mt-24 pt-16 sm:pt-20 border-t border-border-primary">
<ScrollReveal className="mb-12 sm:mb-16">
<SectionLabel>Related News</SectionLabel>
<h2 className="text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight leading-tight">
相关新闻
</h2>
</ScrollReveal>
<div className="grid md:grid-cols-3 gap-6 sm:gap-8">
{relatedNews.map((related, idx) => (
<RelatedNewsCard key={related.id} news={related} index={idx} />
))}
</div>
</div>
)}
{/* Navigation */}
<ScrollReveal>
<div className="mt-16 sm:mt-20 flex flex-col sm:flex-row justify-center gap-4">
<a
href="/news"
className="inline-flex items-center justify-center gap-2 px-8 py-4 font-medium text-base text-ink border border-border-primary hover:border-border-secondary hover:bg-bg-secondary transition-all duration-300"
>
<ArrowLeft className="w-4 h-4" />
返回新闻列表
</a>
<a
href="/contact"
className="group inline-flex items-center justify-center gap-2 px-8 py-4 font-medium text-base bg-brand text-white transition-all duration-300 hover:bg-brand/90"
>
联系我们
<ArrowRight className="w-4 h-4 transition-transform duration-300 group-hover:translate-x-1" />
</a>
</div>
</ScrollReveal>
</div>
</section>
</div>
);
}