feat(ui): overhaul reel, use-cases, pipeline, and app handoff sections

This commit is contained in:
2026-11-03 13:02:29 +05:30
parent 7aa031f6db
commit 7cc2e3dd25
6 changed files with 141 additions and 132 deletions
+32 -32
View File
@@ -2,7 +2,7 @@
import React, { useState, useMemo } from 'react';
import Link from 'next/link';
import { Search, Sparkles, ArrowRight, Wand2, Scissors, Smile, Palette, RefreshCcw, Eye } from 'lucide-react';
import { Search, ArrowRight, Wand2, Scissors, Smile, Palette, RefreshCcw } from 'lucide-react';
import { ToolItem, CategoryItem, AppItem, resolveLocalised } from '@/types';
interface ToolGridSectionProps {
@@ -56,31 +56,31 @@ export function ToolGridSection({
const getCategoryIcon = (catId: string) => {
switch (catId) {
case 'portrait-retouch':
return <Smile className="w-4 h-4 text-rose-500" />;
return <Smile className="w-4 h-4 text-cyan-400" />;
case 'restoration':
return <RefreshCcw className="w-4 h-4 text-amber-500" />;
return <RefreshCcw className="w-4 h-4 text-purple-400" />;
case 'background-cutout':
return <Scissors className="w-4 h-4 text-emerald-500" />;
return <Scissors className="w-4 h-4 text-emerald-400" />;
case 'creative-art':
return <Palette className="w-4 h-4 text-purple-500" />;
return <Palette className="w-4 h-4 text-pink-400" />;
default:
return <Wand2 className="w-4 h-4 text-blue-500" />;
return <Wand2 className="w-4 h-4 text-cyan-400" />;
}
};
return (
<section className="py-12 sm:py-16 lg:py-20">
<section className="py-16 sm:py-20 lg:py-24 bg-[#05070B] border-t border-white/[0.08]">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
{/* Section Heading */}
{(title || subtitle) && (
<div className="text-center max-w-3xl mx-auto mb-10 space-y-3">
<div className="text-center max-w-3xl mx-auto mb-12 space-y-3">
{title && (
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-black text-slate-900 dark:text-white tracking-tight">
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-display font-black text-white tracking-tight">
{resolveLocalised(title, locale)}
</h2>
)}
{subtitle && (
<p className="text-sm sm:text-base text-slate-600 dark:text-slate-400">
<p className="text-sm sm:text-base text-slate-400">
{resolveLocalised(subtitle, locale)}
</p>
)}
@@ -96,8 +96,8 @@ export function ToolGridSection({
onClick={() => setSelectedCategory('all')}
className={`px-4 py-2 rounded-xl text-xs font-bold transition-all duration-200 ${
selectedCategory === 'all'
? 'bg-blue-600 text-white shadow-md shadow-blue-500/25 scale-105'
: 'bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-700'
? 'bg-cyan-500 text-black shadow-lg shadow-cyan-500/25 scale-105'
: 'bg-white/[0.04] text-slate-300 border border-white/[0.08] hover:bg-white/[0.08]'
}`}
>
All Tools
@@ -106,10 +106,10 @@ export function ToolGridSection({
<button
key={cat.id}
onClick={() => setSelectedCategory(cat.id)}
className={`flex items-center space-x-1.5 px-3.5 py-2 rounded-xl text-xs font-bold transition-all duration-200 ${
className={`flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-xs font-bold transition-all duration-200 ${
selectedCategory === cat.id
? 'bg-blue-600 text-white shadow-md shadow-blue-500/25 scale-105'
: 'bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-700'
? 'bg-cyan-500 text-black shadow-lg shadow-cyan-500/25 scale-105'
: 'bg-white/[0.04] text-slate-300 border border-white/[0.08] hover:bg-white/[0.08]'
}`}
>
<span>{getCategoryIcon(cat.id)}</span>
@@ -127,7 +127,7 @@ export function ToolGridSection({
placeholder="Search AI photo tools..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-full pl-10 pr-4 py-2.5 rounded-2xl text-xs sm:text-sm border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 text-slate-900 dark:text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500 shadow-sm"
className="w-full pl-10 pr-4 py-2.5 rounded-2xl text-xs sm:text-sm border border-white/[0.1] bg-[#0B0F17] text-white placeholder-slate-400 focus:outline-none focus:border-cyan-400 focus:ring-1 focus:ring-cyan-400 shadow-sm"
/>
</div>
)}
@@ -143,12 +143,12 @@ export function ToolGridSection({
return (
<div
key={tool.id}
className="group relative bg-white dark:bg-slate-900/95 rounded-3xl p-5 sm:p-6 border border-slate-200/80 dark:border-slate-800/80 shadow-md hover:shadow-2xl hover:shadow-blue-500/10 hover:border-blue-500/40 hover:-translate-y-1.5 transition-all duration-300 flex flex-col justify-between"
className="group relative glass-card rounded-3xl p-5 sm:p-6 border border-white/[0.08] hover:border-cyan-500/30 transition-all duration-300 flex flex-col justify-between"
>
<div>
{/* Visual Before/After Preview Card */}
{example ? (
<div className="relative aspect-[16/10] rounded-2xl overflow-hidden mb-4 bg-slate-950 shadow-inner group/thumb">
<div className="relative aspect-[16/10] rounded-2xl overflow-hidden mb-4 bg-[#05070B] border border-white/[0.08] shadow-inner group/thumb">
<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 */}
@@ -158,7 +158,7 @@ export function ToolGridSection({
loading="lazy"
className="h-full w-full object-cover"
/>
<span className="absolute bottom-1.5 left-1.5 bg-black/75 backdrop-blur-md px-1.5 py-0.5 rounded text-[9px] font-bold text-white">
<span className="absolute bottom-1.5 left-1.5 bg-black/80 backdrop-blur-md px-1.5 py-0.5 rounded text-[8.5px] font-mono font-bold text-slate-300 border border-white/10">
Before
</span>
</div>
@@ -168,10 +168,10 @@ export function ToolGridSection({
src={example.after}
alt="After preview"
loading="lazy"
className="h-full w-full object-cover group-hover:scale-105 transition-transform duration-300"
className="h-full w-full object-cover group-hover:scale-105 transition-transform duration-500"
/>
<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 className="absolute bottom-1.5 right-1.5 bg-gradient-to-r from-cyan-500 to-purple-600 backdrop-blur-md px-1.5 py-0.5 rounded text-[8.5px] font-mono font-bold text-white shadow-sm border border-white/20">
CRE AI
</span>
</div>
</div>
@@ -180,28 +180,28 @@ export function ToolGridSection({
{/* Category Tag & Icon */}
<div className="flex items-center justify-between mb-3">
<span className="text-[11px] font-bold tracking-wider uppercase text-blue-600 dark:text-cyan-400 bg-blue-50 dark:bg-blue-950/60 px-3 py-1 rounded-lg border border-blue-100 dark:border-blue-900/40">
<span className="text-[10.5px] font-mono font-bold uppercase tracking-wider text-cyan-400 bg-cyan-950/60 px-2.5 py-0.5 rounded-lg border border-cyan-500/30">
{tool.category}
</span>
<div className="w-8 h-8 rounded-xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-600 dark:text-slate-300 group-hover:scale-110 group-hover:bg-blue-50 dark:group-hover:bg-blue-950 group-hover:text-blue-600 transition-all duration-200">
<div className="w-8 h-8 rounded-xl bg-white/[0.04] border border-white/[0.08] flex items-center justify-center text-slate-300 group-hover:scale-110 group-hover:border-cyan-500/30 transition-all duration-200">
{getCategoryIcon(tool.category)}
</div>
</div>
<h3 className="text-lg font-bold text-slate-900 dark:text-white group-hover:text-blue-600 dark:group-hover:text-cyan-400 transition-colors">
<h3 className="text-lg font-display font-bold text-white group-hover:text-cyan-300 transition-colors">
{resolveLocalised(tool.name, locale)}
</h3>
<p className="mt-2 text-xs text-slate-600 dark:text-slate-400 line-clamp-2 leading-relaxed">
<p className="mt-2 text-xs text-slate-400 line-clamp-2 leading-relaxed">
{resolveLocalised(tool.summary, locale)}
</p>
</div>
<div className="mt-5 pt-4 border-t border-slate-100 dark:border-slate-800/80 space-y-3">
<div className="mt-5 pt-4 border-t border-white/[0.08] space-y-3">
{homeApp && (
<div className="text-[11px] text-slate-500 dark:text-slate-400 flex items-center justify-between">
<span className="font-medium">Home App:</span>
<span className="font-bold text-slate-700 dark:text-slate-300 truncate max-w-[140px]">
<div className="text-[11px] font-mono text-slate-400 flex items-center justify-between">
<span>Home App:</span>
<span className="font-bold text-slate-300 truncate max-w-[140px]">
{resolveLocalised(homeApp.name, locale)}
</span>
</div>
@@ -209,7 +209,7 @@ export function ToolGridSection({
<Link
href={`/tools/${tool.slug}`}
className="w-full inline-flex items-center justify-center space-x-2 py-3 rounded-2xl text-xs font-bold text-blue-600 dark:text-cyan-400 bg-blue-50 dark:bg-blue-950/40 hover:bg-blue-600 hover:text-white dark:hover:bg-blue-600 dark:hover:text-white transition-all duration-200 shadow-sm group-hover:shadow-md"
className="w-full inline-flex items-center justify-center gap-2 py-3 rounded-2xl text-xs font-bold text-black bg-gradient-to-r from-cyan-400 to-teal-300 hover:from-cyan-300 hover:to-teal-200 shadow-md transition-all duration-200"
>
<span>Try Free Online</span>
<ArrowRight className="w-3.5 h-3.5 group-hover:translate-x-1 transition-transform" />
@@ -221,7 +221,7 @@ export function ToolGridSection({
</div>
{filteredTools.length === 0 && (
<div className="text-center py-16 text-slate-500 dark:text-slate-400 space-y-2">
<div className="text-center py-16 text-slate-400 space-y-2 font-mono">
<p className="font-bold">No photo tools found matching &quot;{searchQuery}&quot;</p>
<p className="text-xs">Try searching for &quot;blemish&quot;, &quot;background&quot;, &quot;photo&quot;, or clear filters.</p>
</div>