fix: resolve homepage and tools hero inversion, remove acne references, restore centered directory heroes across all routes
This commit is contained in:
@@ -41,6 +41,7 @@ export function HeroSection({
|
||||
subtitle,
|
||||
primaryCta,
|
||||
secondaryCta,
|
||||
variant = 'frontpage',
|
||||
tool,
|
||||
homeApp,
|
||||
variants = [],
|
||||
@@ -54,8 +55,8 @@ export function HeroSection({
|
||||
const secondaryCtaLabel = resolveLocalised(secondaryCta?.label, locale, 'Mobile App Studio');
|
||||
const secondaryCtaHref = secondaryCta?.href || '#recommended-apps';
|
||||
|
||||
// Dedicated Tool Detail Page Hero (when viewing a specific tool page like /tools/[slug])
|
||||
if (tool) {
|
||||
// 1. Dedicated Tool Detail Page Hero (when viewing /tools/[slug] with variant='toolHero')
|
||||
if (variant === 'toolHero' && tool) {
|
||||
const appName = homeApp ? resolveLocalised(homeApp.name, locale) : 'Mobile App';
|
||||
const toolMedia = (tool as any).media;
|
||||
const primaryExample = tool.content?.examples?.[0] || {
|
||||
@@ -207,8 +208,56 @@ export function HeroSection({
|
||||
);
|
||||
}
|
||||
|
||||
// 2. Centered Directory & Info Page Hero (for /tools, /apps, /pricing, /trust, /privacy, /terms)
|
||||
if (variant === 'centered') {
|
||||
const resolvedTitle = resolveLocalised(title, locale) || 'Creative Studio';
|
||||
const resolvedSubtitle = resolveLocalised(subtitle, locale);
|
||||
|
||||
return (
|
||||
<section className="relative overflow-hidden pt-28 pb-16 sm:pt-36 sm:pb-20 text-center bg-[#FAF8F5] border-b border-slate-900/[0.07]">
|
||||
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-96 bg-gradient-to-b from-blue-500/[0.04] to-transparent blur-3xl pointer-events-none -z-10" />
|
||||
|
||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6 relative z-10">
|
||||
{resolvedBadge && (
|
||||
<div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-blue-50 border border-blue-200 text-xs font-mono font-semibold text-blue-700 shadow-sm">
|
||||
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
|
||||
<span>{resolvedBadge}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-display font-black text-slate-900 tracking-tight leading-tight">
|
||||
{resolvedTitle}
|
||||
</h1>
|
||||
|
||||
{resolvedSubtitle && (
|
||||
<p className="text-base sm:text-lg text-slate-600 max-w-2xl mx-auto leading-relaxed font-sans">
|
||||
{resolvedSubtitle}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="flex flex-wrap items-center justify-center gap-4 pt-3">
|
||||
<Link
|
||||
href="/#our-tools"
|
||||
className="inline-flex items-center gap-2 px-6 py-3 rounded-full font-bold text-xs sm:text-sm text-white bg-slate-950 hover:bg-blue-600 shadow-sm transition-all hover:scale-105 active:scale-95"
|
||||
>
|
||||
<span>Explore Studio Suite</span>
|
||||
<ArrowRight className="w-4 h-4" />
|
||||
</Link>
|
||||
<Link
|
||||
href="/apps"
|
||||
className="inline-flex items-center gap-2 px-6 py-3 rounded-full font-bold text-xs sm:text-sm text-slate-700 bg-white border border-slate-200 hover:bg-slate-50 transition-colors shadow-sm"
|
||||
>
|
||||
<Smartphone className="w-4 h-4 text-blue-600" />
|
||||
<span>Mobile Apps Suite</span>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Pure Front Page Hero View:
|
||||
// 3. Pure Front Page Hero View (for homepage /):
|
||||
// ONLY Animated Text, 3D WebGL Prism, Particles, Radiant Colors & Effects
|
||||
// Zero tool names, zero tool selection, zero feature lists
|
||||
// -------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user