Files
webb/src/components/sections/TransformationReelSection.tsx
T

136 lines
5.9 KiB
TypeScript
Raw Normal View History

'use client';
import React from 'react';
import Link from 'next/link';
import { ArrowRight, Sparkles } from 'lucide-react';
interface TransformationItem {
toolSlug: string;
toolName: string;
category: string;
before: string;
after: string;
tag: string;
}
const transformations: TransformationItem[] = [
{
toolSlug: 'blemish-remover',
toolName: 'AI Blemish Remover',
category: 'Portrait Retouch',
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=400&auto=format&fit=crop&q=80',
tag: 'Skin Pore Texture Preserved',
},
{
toolSlug: 'background-remover',
toolName: 'P3M Background Cutout',
category: 'Matting',
before: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&auto=format&fit=crop&q=80',
tag: 'Sub-Pixel Hair Strands',
},
{
toolSlug: 'photo-enhancer',
toolName: 'Ultra HD 4K Enhancer',
category: 'Restoration',
before: 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&auto=format&fit=crop&q=80',
tag: 'Deblur & Iris Sharpness',
},
{
toolSlug: 'old-photo-restorer',
toolName: 'Vintage Restorer',
category: 'Archives',
before: 'https://images.unsplash.com/photo-1509198397868-475647b2a1e5?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=400&auto=format&fit=crop&q=80',
tag: 'Scratch & Tear Removal',
},
{
toolSlug: 'cartoon-avatar',
toolName: 'CartoonGAN Anime',
category: 'Creative Art',
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1578632767115-351597cf2477?w=400&auto=format&fit=crop&q=80',
tag: 'Manga Cel Animation',
},
{
toolSlug: 'colorization',
toolName: 'B&W Colorizer',
category: 'Historical Color',
before: 'https://images.unsplash.com/photo-1544717305-2782549b5136?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
tag: 'Deep Neural Palette',
},
];
export function TransformationReelSection() {
return (
<section className="py-10 bg-slate-100/50 dark:bg-slate-950/40 border-y border-slate-200/80 dark:border-slate-800/80 overflow-hidden">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-6 flex items-center justify-between">
<div className="flex items-center space-x-2">
<Sparkles className="w-4 h-4 text-cyan-500 animate-pulse" />
<h3 className="text-xs sm:text-sm font-extrabold uppercase tracking-wider text-slate-900 dark:text-white">
Live Transformations by CRE Neural Engine
</h3>
</div>
<Link
href="/tools"
className="text-xs font-bold text-blue-600 dark:text-cyan-400 hover:underline flex items-center space-x-1"
>
<span>Explore all 8+ tools</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
</div>
{/* Horizontal scrolling showcase */}
<div className="flex gap-4 sm:gap-6 overflow-x-auto pb-4 px-4 sm:px-8 no-scrollbar scroll-smooth">
{transformations.map((item, idx) => (
<Link
key={idx}
href={`/tools/${item.toolSlug}`}
className="group shrink-0 w-64 sm:w-72 bg-white dark:bg-slate-900 rounded-2xl p-3 border border-slate-200/80 dark:border-slate-800/80 shadow-sm hover:shadow-xl hover:border-blue-500/50 hover:-translate-y-1 transition-all duration-300"
>
{/* Visual side-by-side or split thumbnail */}
<div className="relative aspect-[16/10] rounded-xl overflow-hidden mb-3 bg-slate-950">
<div className="grid grid-cols-2 h-full w-full">
<div className="relative h-full overflow-hidden border-r border-white/20">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={item.before} alt="Before" className="h-full w-full object-cover" />
<span className="absolute bottom-1.5 left-1.5 bg-black/70 backdrop-blur-md px-1.5 py-0.5 rounded text-[9px] font-bold text-white">
Before
</span>
</div>
<div className="relative h-full overflow-hidden">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={item.after} alt="After" className="h-full w-full object-cover group-hover:scale-105 transition-transform duration-300" />
<span className="absolute bottom-1.5 right-1.5 bg-blue-600/90 backdrop-blur-md px-1.5 py-0.5 rounded text-[9px] font-bold text-white">
After
</span>
</div>
</div>
</div>
<div className="space-y-1">
<div className="flex items-center justify-between">
<span className="text-[10px] font-bold text-cyan-600 dark:text-cyan-400 uppercase tracking-wide">
{item.category}
</span>
<span className="text-[10px] font-medium text-slate-400">
Try Free →
</span>
</div>
<p className="font-bold text-xs sm:text-sm text-slate-900 dark:text-white truncate group-hover:text-blue-600 transition-colors">
{item.toolName}
</p>
<p className="text-[11px] text-slate-500 dark:text-slate-400 truncate">
{item.tag}
</p>
</div>
</Link>
))}
</div>
</section>
);
}