fix: streamline tool page to single upload and single compare, make vertical-horizontal transitions fluid and seamless

This commit is contained in:
2026-11-04 12:00:17 +05:30
parent 378f5c40a9
commit 6a0bb61c05
5 changed files with 102 additions and 172 deletions
+33 -57
View File
@@ -90,18 +90,17 @@ export function HeroSection({
// Dedicated Tool Landing Hero (for Google Search / Direct Traffic SEO)
if (variant === 'toolHero' && tool) {
const example = tool.content?.examples?.[0];
const categoryName = tool.category?.replace('-', ' ').toUpperCase() || 'AI TOOL';
const appName = homeApp ? resolveLocalised(homeApp.name, locale) : 'Mobile App';
return (
<section className="relative isolate overflow-hidden pt-28 pb-16 sm:pt-36 sm:pb-20 lg:pt-40 lg:pb-24 bg-[#FAF8F5] border-b border-slate-900/[0.07]">
<section className="relative isolate overflow-hidden pt-28 pb-16 sm:pt-36 sm:pb-20 lg:pt-36 lg:pb-24 bg-[#FAF8F5] border-b border-slate-900/[0.07]">
{/* Ambient subtle warm gradient */}
<div className="absolute inset-x-0 top-0 h-[640px] bg-[radial-gradient(ellipse_at_75%_20%,rgba(87,132,220,0.12),transparent_50%),radial-gradient(ellipse_at_15%_0%,rgba(208,182,142,0.15),transparent_40%)] pointer-events-none" />
<div className="relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="relative z-10 max-w-5xl mx-auto px-4 sm:px-6 lg:px-8">
{/* Breadcrumb Navigation */}
<nav aria-label="Breadcrumb" className="mb-6 flex items-center gap-2 text-xs font-medium text-slate-500">
<nav aria-label="Breadcrumb" className="mb-6 flex items-center justify-center gap-2 text-xs font-medium text-slate-500">
<Link href="/" className="hover:text-blue-700 transition-colors">Home</Link>
<span>/</span>
<Link href="/tools" className="hover:text-blue-700 transition-colors">Tools</Link>
@@ -109,63 +108,40 @@ export function HeroSection({
<span className="text-slate-900 font-semibold">{resolvedTitle}</span>
</nav>
<div className="grid lg:grid-cols-[1fr_1.1fr] gap-10 xl:gap-14 items-center">
{/* Left Column: Value Proposition & Actions */}
<div className="max-w-xl">
<div className="inline-flex items-center gap-2 rounded-full border border-blue-200/80 bg-white/80 px-3.5 py-1.5 text-[11px] font-semibold tracking-[0.14em] uppercase text-blue-800 shadow-sm backdrop-blur">
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
<span>{categoryName} • NEURAL MODEL</span>
</div>
<h1 className="mt-5 text-3xl sm:text-4xl lg:text-5xl font-display font-black tracking-tight text-slate-900 leading-[1.08]">
{resolvedTitle}
</h1>
<p className="mt-4 text-base sm:text-lg leading-relaxed text-slate-600">
{resolvedSubtitle}
</p>
{/* Key Feature Specs */}
<div className="mt-6 flex flex-wrap gap-2.5">
<span className="inline-flex items-center gap-1.5 rounded-lg border border-slate-900/10 bg-white px-3 py-1.5 text-xs font-semibold text-slate-700 shadow-sm">
<Check className="h-3.5 w-3.5 text-blue-700" /> Lossless 4K Output
</span>
<span className="inline-flex items-center gap-1.5 rounded-lg border border-slate-900/10 bg-white px-3 py-1.5 text-xs font-semibold text-slate-700 shadow-sm">
<Zap className="h-3.5 w-3.5 text-amber-600" /> Instant Processing
</span>
<span className="inline-flex items-center gap-1.5 rounded-lg border border-slate-900/10 bg-white px-3 py-1.5 text-xs font-semibold text-slate-700 shadow-sm">
<ShieldCheck className="h-3.5 w-3.5 text-emerald-600" /> 100% Free Online
</span>
</div>
{/* App Availability */}
{homeApp && (
<div className="mt-7">
<Link
href={`/apps/${homeApp.slug}`}
className="inline-flex items-center gap-2 rounded-full border border-slate-300/80 bg-white/80 px-5 py-3 text-xs sm:text-sm font-semibold text-slate-800 shadow-sm transition-all hover:-translate-y-0.5 hover:border-slate-400 hover:bg-white"
>
<Smartphone className="h-4 w-4 text-blue-700" /> Available in {appName} for iOS & Android
</Link>
</div>
)}
{/* Trust Badges */}
<div className="mt-8 flex flex-wrap gap-x-5 gap-y-2 text-xs font-medium text-slate-500">
<span className="inline-flex items-center gap-1.5"><ShieldCheck className="h-4 w-4 text-emerald-600" /> No account needed</span>
<span className="inline-flex items-center gap-1.5"><LockKeyhole className="h-4 w-4 text-emerald-600" /> Photos never stored</span>
<span className="inline-flex items-center gap-1.5"><ImagePlus className="h-4 w-4 text-emerald-600" /> Instant preview</span>
</div>
{/* Centered Tool Header */}
<div className="text-center max-w-3xl mx-auto">
<div className="inline-flex items-center gap-2 rounded-full border border-blue-200/80 bg-white/80 px-3.5 py-1.5 text-[11px] font-semibold tracking-[0.14em] uppercase text-blue-800 shadow-sm backdrop-blur">
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
<span>{categoryName} • AI NEURAL TOOL</span>
</div>
{/* Right Column: Front Screen ONLY Upload Image Option (No before/after) */}
<div className="relative min-w-0" id="tool-tryit">
<div className="absolute -inset-4 rounded-[2.5rem] bg-gradient-to-br from-blue-200/40 via-white/30 to-amber-100/50 blur-2xl pointer-events-none" />
<div className="relative rounded-[2rem] border border-slate-900/[0.1] bg-white p-1 sm:p-2 shadow-cinematic-3d">
<TryItWidget tool={tool} homeApp={homeApp} variants={variants} locale={locale} />
</div>
<h1 className="mt-4 text-3xl sm:text-5xl lg:text-6xl font-display font-black tracking-tight text-slate-900 leading-[1.08]">
{resolvedTitle}
</h1>
<p className="mt-4 text-base sm:text-lg leading-relaxed text-slate-600 max-w-2xl mx-auto">
{resolvedSubtitle}
</p>
</div>
{/* Single Big Upload Image Option */}
<div className="mt-8 sm:mt-10 max-w-3xl mx-auto" id="tool-tryit">
<div className="relative rounded-[2rem] border border-slate-900/[0.1] bg-white p-1 sm:p-2 shadow-cinematic-3d">
<TryItWidget tool={tool} homeApp={homeApp} variants={variants} locale={locale} />
</div>
</div>
{/* Clean Trust Indicators */}
<div className="mt-6 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-xs font-medium text-slate-500">
<span className="inline-flex items-center gap-1.5"><ShieldCheck className="h-4 w-4 text-emerald-600" /> No account required</span>
<span className="inline-flex items-center gap-1.5"><LockKeyhole className="h-4 w-4 text-emerald-600" /> Photos never stored</span>
<span className="inline-flex items-center gap-1.5"><Check className="h-4 w-4 text-blue-600" /> High-res output</span>
{homeApp && (
<Link href={`/apps/${homeApp.slug}`} className="inline-flex items-center gap-1.5 text-blue-700 hover:underline font-semibold">
<Smartphone className="h-4 w-4" /> Also in {appName} App
</Link>
)}
</div>
</div>
</section>
);