fix(hero+tools+navbar): uncrop complete image, dial down white gradient, vertical mobile tools list, and opaque solid mobile navbar

This commit is contained in:
2026-11-05 18:14:27 +05:30
parent d225e7ab6e
commit f8f7a737dc
4 changed files with 82 additions and 35 deletions
+7 -9
View File
@@ -270,7 +270,7 @@ export function HeroSection({
// ------------------------------------------------------------- // -------------------------------------------------------------
return ( return (
<section id="hero-section" className="relative min-h-[92vh] sm:min-h-screen flex items-center overflow-hidden bg-[#FAF8F5] pt-20 sm:pt-24 pb-14 sm:pb-20"> <section id="hero-section" className="relative min-h-[92vh] sm:min-h-screen flex items-center overflow-hidden bg-[#FAF8F5] pt-20 sm:pt-24 pb-14 sm:pb-20">
{/* 1. Background Image with Responsive Ultra-Fast Loading & Subtle Dimming */} {/* 1. Background Image with Responsive Ultra-Fast Loading */}
<div className="absolute inset-0 z-0 overflow-hidden"> <div className="absolute inset-0 z-0 overflow-hidden">
<picture> <picture>
<source media="(max-width: 768px)" srcSet="/management/pages/home/hero_mobile.webp" type="image/webp" /> <source media="(max-width: 768px)" srcSet="/management/pages/home/hero_mobile.webp" type="image/webp" />
@@ -279,18 +279,16 @@ export function HeroSection({
<img <img
src="/management/pages/home/hero_desktop.jpg" src="/management/pages/home/hero_desktop.jpg"
alt="CRE AI Photo Magic" alt="CRE AI Photo Magic"
className="w-full h-full object-cover object-[75%_center] sm:object-right-top select-none pointer-events-none opacity-72 brightness-[0.82] contrast-[0.98]" className="w-full h-full object-cover object-[75%_center] sm:object-right select-none pointer-events-none opacity-90 brightness-[0.95]"
loading="eager" loading="eager"
fetchPriority="high" fetchPriority="high"
decoding="async" decoding="async"
/> />
</picture> </picture>
{/* White / Cream Gradient Overlay: Extended towards the right (~88%) for smooth, balanced contrast */} {/* White / Cream Gradient Overlay: Restrained to left text side (~55%) so complete image stays vibrant & visible */}
<div className="absolute inset-0 bg-gradient-to-r from-[#FAF8F5] from-30% via-[#FAF8F5]/90 via-55% via-[#FAF8F5]/50 via-75% to-transparent to-90% pointer-events-none" /> <div className="absolute inset-0 bg-gradient-to-r from-[#FAF8F5] via-[#FAF8F5]/65 via-30% to-transparent to-55% pointer-events-none" />
{/* Mobile vertical soft overlay to keep text completely readable on small screens */} {/* Soft Bottom Fade: Seamlessly blends into #our-tools without covering her necklace or shoulder */}
<div className="absolute inset-0 bg-gradient-to-b from-[#FAF8F5]/80 via-[#FAF8F5]/60 via-40% to-[#FAF8F5] sm:hidden pointer-events-none" /> <div className="absolute inset-x-0 bottom-0 h-24 sm:h-32 lg:h-36 bg-gradient-to-t from-[#FAF8F5] via-[#FAF8F5]/85 via-40% to-transparent pointer-events-none" />
{/* Perfect Bottom Fade: Seamlessly blends with upcoming scroll content (#our-tools) */}
<div className="absolute inset-x-0 bottom-0 h-44 sm:h-64 lg:h-80 bg-gradient-to-t from-[#FAF8F5] from-20% via-[#FAF8F5]/95 via-50% via-[#FAF8F5]/50 via-80% to-transparent pointer-events-none" />
</div> </div>
{/* Hero End Sentinel for exact scroll position detection */} {/* Hero End Sentinel for exact scroll position detection */}
@@ -310,7 +308,7 @@ export function HeroSection({
</h1> </h1>
{/* Subtitle */} {/* Subtitle */}
<p className="mt-5 sm:mt-7 text-sm sm:text-base md:text-lg text-slate-600 max-w-xl text-left font-sans leading-relaxed"> <p className="mt-5 sm:mt-7 text-sm sm:text-base md:text-lg text-slate-800 sm:text-slate-600 max-w-xl text-left font-sans leading-relaxed font-medium">
Turn ordinary moments into extraordinary visual art, Instant, effortless, and private photo magic right in your browser. Turn ordinary moments into extraordinary visual art, Instant, effortless, and private photo magic right in your browser.
</p> </p>
@@ -134,12 +134,17 @@ export function ShiftableToolsGridSection({
</p> </p>
</div> </div>
{/* 2-Row Shiftable Grid Container (Slow, Calm, Pure Horizontal Expansion with Locked Height) */} {/* Desktop View (md and up): 2-Row Shiftable Expansion Grid */}
<div className="space-y-6 sm:space-y-8"> <div className="hidden md:block space-y-8">
<ShiftableRow items={row1} /> <ShiftableRow items={row1} />
<ShiftableRow items={row2} /> <ShiftableRow items={row2} />
</div> </div>
{/* Mobile / Phone View (<md): Pure Vertical Stack (NOT placed horizontally) */}
<div className="block md:hidden">
<MobileVerticalToolsList items={displayItems} />
</div>
{/* See More Section Button Redirecting to /tools */} {/* See More Section Button Redirecting to /tools */}
<div className="pt-6 text-center"> <div className="pt-6 text-center">
<Link <Link
@@ -155,11 +160,55 @@ export function ShiftableToolsGridSection({
); );
} }
function MobileVerticalToolsList({ items }: { items: ToolMediaItem[] }) {
return (
<div className="flex flex-col gap-6 w-full">
{items.map((item) => (
<div key={item.id} className="w-full flex flex-col">
{item.mediaType === 'comparison' ? (
<div
style={{ borderRadius: '24px' }}
className="group block relative w-full h-[240px] rounded-[24px] overflow-hidden isolate bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm"
>
<ToolWindowMedia item={item} isHovered={false} />
<Link
href={`/tools/${item.slug}`}
className="absolute top-3 right-3 z-30 inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full text-[10px] font-mono font-bold tracking-wider uppercase bg-slate-950/90 text-white border border-white/20 hover:bg-blue-600 transition-colors shadow-sm cursor-pointer"
aria-label={`Open ${item.title}`}
>
<span>TRY TOOL</span>
<ArrowRight className="w-2.5 h-2.5" />
</Link>
</div>
) : (
<Link
href={`/tools/${item.slug}`}
style={{ borderRadius: '24px' }}
className="group block relative w-full h-[240px] rounded-[24px] overflow-hidden isolate bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm cursor-pointer"
>
<ToolWindowMedia item={item} isHovered={false} />
</Link>
)}
{/* Title Below Window */}
<Link
href={`/tools/${item.slug}`}
className="mt-2.5 px-1 flex items-center justify-between text-sm font-display font-bold text-slate-900 hover:text-blue-600 transition-colors"
>
<span>{item.title}</span>
<ArrowRight className="w-4 h-4 text-slate-400 group-hover:text-blue-600 group-hover:translate-x-0.5 transition-transform" />
</Link>
</div>
))}
</div>
);
}
function ShiftableRow({ items }: { items: ToolMediaItem[] }) { function ShiftableRow({ items }: { items: ToolMediaItem[] }) {
const [hoveredId, setHoveredId] = useState<string | null>(null); const [hoveredId, setHoveredId] = useState<string | null>(null);
return ( return (
<div className="flex flex-row md:flex-row gap-4 sm:gap-6 w-full items-start overflow-x-auto md:overflow-visible pb-2 no-scrollbar scroll-smooth snap-x snap-mandatory touch-pan-x -mx-4 px-4 md:mx-0 md:px-0"> <div className="flex flex-row gap-6 w-full items-start overflow-visible">
{items.map((item) => { {items.map((item) => {
const isHovered = hoveredId === item.id; const isHovered = hoveredId === item.id;
const hasOtherHovered = hoveredId !== null && !isHovered; const hasOtherHovered = hoveredId !== null && !isHovered;
+3 -3
View File
@@ -170,14 +170,14 @@ export function BrandLogo({
{showWordmark && ( {showWordmark && (
<div className="flex flex-col"> <div className="flex flex-col">
<div className="flex items-center tracking-tight leading-none"> <div className="flex items-center tracking-tight leading-none">
<span className={`font-display font-black text-transparent bg-clip-text bg-gradient-to-r from-blue-400 via-indigo-300 to-cyan-400 tracking-[0.1em] text-3d-gradient ${iconDimensions.textScale}`}> <span className={`font-display font-black text-blue-600 tracking-[0.08em] ${iconDimensions.textScale}`}>
CRE CRE
</span> </span>
<span className={`font-display font-bold ${isDark ? 'text-white' : 'text-slate-900'} tracking-[0.16em] ml-1.5 transition-colors duration-200 ${iconDimensions.textScale}`}> <span className={`font-display font-black ${isDark ? 'text-white' : 'text-slate-950'} tracking-[0.14em] ml-1.5 transition-colors duration-200 ${iconDimensions.textScale}`}>
INNOVATIONS INNOVATIONS
</span> </span>
</div> </div>
<span className={`font-mono ${isDark ? 'text-blue-400' : 'text-blue-600'} tracking-[0.25em] uppercase font-semibold mt-0.5 transition-colors duration-200 ${iconDimensions.subText}`}> <span className={`font-mono ${isDark ? 'text-blue-400' : 'text-blue-700'} tracking-[0.22em] uppercase font-bold mt-0.5 transition-colors duration-200 ${iconDimensions.subText}`}>
Neural Vision Studio Neural Vision Studio
</span> </span>
</div> </div>
+20 -20
View File
@@ -77,7 +77,7 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
? 'bg-[#FAF8F5] border-b border-slate-200/90 shadow-2xs py-2.5 sm:py-3' ? 'bg-[#FAF8F5] border-b border-slate-200/90 shadow-2xs py-2.5 sm:py-3'
: isTextOnlyMode : isTextOnlyMode
? 'bg-transparent border-b border-transparent py-3 sm:py-4' ? 'bg-transparent border-b border-transparent py-3 sm:py-4'
: 'bg-[#FAF8F5]/96 backdrop-blur-sm border-b border-slate-200/90 shadow-2xs py-2 sm:py-2.5' : 'bg-[#FAF8F5] md:bg-[#FAF8F5]/98 md:backdrop-blur-md border-b border-slate-200/90 shadow-2xs py-2 sm:py-2.5'
}`} }`}
> >
<div className="max-w-[1640px] mx-auto px-4 sm:px-6 lg:px-10 flex items-center justify-between"> <div className="max-w-[1640px] mx-auto px-4 sm:px-6 lg:px-10 flex items-center justify-between">
@@ -86,14 +86,14 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
<BrandLogo size="md" /> <BrandLogo size="md" />
</div> </div>
{/* Center Navigation Links: Clean text buttons matching site.config.json */} {/* Center Navigation Links: Clean, high-contrast text buttons */}
<nav className="hidden md:flex items-center gap-6 lg:gap-8 relative z-20"> <nav className="hidden md:flex items-center gap-6 lg:gap-8 relative z-20">
<Link <Link
href="/" href="/"
className={`text-sm font-semibold transition-colors ${ className={`text-sm font-bold tracking-tight transition-colors ${
pathname === '/' pathname === '/'
? 'text-blue-600 font-bold' ? 'text-blue-600'
: 'text-slate-800 hover:text-blue-600' : 'text-slate-900 hover:text-blue-600'
}`} }`}
> >
Home Home
@@ -101,10 +101,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
<Link <Link
href="/tools" href="/tools"
className={`text-sm font-semibold transition-colors ${ className={`text-sm font-bold tracking-tight transition-colors ${
pathname.startsWith('/tools') pathname.startsWith('/tools')
? 'text-blue-600 font-bold' ? 'text-blue-600'
: 'text-slate-800 hover:text-blue-600' : 'text-slate-900 hover:text-blue-600'
}`} }`}
> >
Tools Tools
@@ -112,10 +112,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
<Link <Link
href="/apps" href="/apps"
className={`text-sm font-semibold transition-colors ${ className={`text-sm font-bold tracking-tight transition-colors ${
pathname.startsWith('/apps') pathname.startsWith('/apps')
? 'text-blue-600 font-bold' ? 'text-blue-600'
: 'text-slate-800 hover:text-blue-600' : 'text-slate-900 hover:text-blue-600'
}`} }`}
> >
Apps Apps
@@ -123,10 +123,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
<Link <Link
href="/pricing" href="/pricing"
className={`text-sm font-semibold transition-colors ${ className={`text-sm font-bold tracking-tight transition-colors ${
pathname.startsWith('/pricing') pathname.startsWith('/pricing')
? 'text-blue-600 font-bold' ? 'text-blue-600'
: 'text-slate-800 hover:text-blue-600' : 'text-slate-900 hover:text-blue-600'
}`} }`}
> >
Pricing Pricing
@@ -134,10 +134,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
<Link <Link
href="/trust" href="/trust"
className={`text-sm font-semibold transition-colors ${ className={`text-sm font-bold tracking-tight transition-colors ${
pathname.startsWith('/trust') pathname.startsWith('/trust')
? 'text-blue-600 font-bold' ? 'text-blue-600'
: 'text-slate-800 hover:text-blue-600' : 'text-slate-900 hover:text-blue-600'
}`} }`}
> >
Trust & Privacy Trust & Privacy
@@ -160,13 +160,13 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
onClick={() => setMobileMenuOpen(!mobileMenuOpen)} onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
className={`transition-all duration-300 active:scale-95 ${ className={`transition-all duration-300 active:scale-95 ${
isTextOnlyMode && !mobileMenuOpen isTextOnlyMode && !mobileMenuOpen
? 'p-2 text-slate-800 hover:text-blue-600 bg-transparent border-transparent' ? 'p-2 text-slate-900 hover:text-blue-600 bg-transparent border-transparent'
: 'p-2.5 rounded-xl border text-slate-800 bg-white hover:bg-slate-50 border-slate-200/90 shadow-2xs' : 'p-2.5 rounded-xl border text-slate-900 bg-white hover:bg-slate-50 border-slate-200/90 shadow-2xs'
}`} }`}
aria-label={mobileMenuOpen ? 'Close navigation menu' : 'Open navigation menu'} aria-label={mobileMenuOpen ? 'Close navigation menu' : 'Open navigation menu'}
aria-expanded={mobileMenuOpen} aria-expanded={mobileMenuOpen}
> >
{mobileMenuOpen ? <X className="w-5 h-5 text-blue-600" /> : <Menu className="w-5 h-5" />} {mobileMenuOpen ? <X className="w-5 h-5 text-blue-600" /> : <Menu className="w-5 h-5 text-slate-900" />}
</button> </button>
</div> </div>
</div> </div>