perf(smoothness): eliminate scroll lag via responsive WebP hero, native 120Hz smooth scroll, intersection observer navbar, and removing 50+ backdrop-filter blur bottlenecks

This commit is contained in:
2026-11-05 17:15:36 +05:30
parent 44cb60ecfe
commit d13008b334
11 changed files with 73 additions and 174 deletions
+6 -6
View File
@@ -230,7 +230,7 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
style={{ left: `${splitPos}%`, transform: 'translateX(-50%)' }}
>
{/* Sleek handle pill */}
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-white/95 backdrop-blur-sm text-slate-800 shadow-md flex items-center justify-center border border-slate-300">
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-white text-slate-800 shadow-md flex items-center justify-center border border-slate-300">
<div className="flex items-center gap-[2px]">
<div className="w-0 h-0 border-y-[2.5px] sm:border-y-[3px] border-y-transparent border-r-[3px] sm:border-r-[4px] border-r-slate-700" />
<div className="w-0 h-0 border-y-[2.5px] sm:border-y-[3px] border-y-transparent border-l-[3px] sm:border-l-[4px] border-l-slate-700" />
@@ -238,14 +238,14 @@ function ToolCardImage({ tool, toolName }: { tool: ToolItem; toolName: string })
</div>
</div>
{/* Floating badges */}
<span className="absolute bottom-2 sm:bottom-2.5 left-2 sm:left-2.5 bg-black/60 backdrop-blur-md text-[8px] sm:text-[9px] font-mono font-bold uppercase tracking-wider text-white px-1.5 sm:px-2 py-0.5 rounded-md border border-white/10 pointer-events-none shadow-sm">
{/* Floating badges (Hardware-accelerated, 0% CPU blur overhead) */}
<span className="absolute bottom-2 sm:bottom-2.5 left-2 sm:left-2.5 bg-black/80 text-[8px] sm:text-[9px] font-mono font-bold uppercase tracking-wider text-white px-1.5 sm:px-2 py-0.5 rounded-md border border-white/10 pointer-events-none shadow-sm">
Before
</span>
<span className="absolute bottom-2 sm:bottom-2.5 right-2 sm:right-2.5 bg-blue-600/90 backdrop-blur-md text-[8px] sm:text-[9px] font-mono font-bold uppercase tracking-wider text-white px-1.5 sm:px-2 py-0.5 rounded-md border border-white/20 pointer-events-none shadow-sm">
<span className="absolute bottom-2 sm:bottom-2.5 right-2 sm:right-2.5 bg-blue-600 text-[8px] sm:text-[9px] font-mono font-bold uppercase tracking-wider text-white px-1.5 sm:px-2 py-0.5 rounded-md border border-white/20 pointer-events-none shadow-sm">
CRE AI
</span>
<span className="hidden sm:inline-block absolute top-2.5 right-2.5 bg-white/90 backdrop-blur-md text-[9.5px] font-mono font-bold text-slate-800 px-2.5 py-0.5 rounded-full border border-slate-200 pointer-events-none shadow-sm opacity-0 group-hover:opacity-100 transition-opacity duration-200">
<span className="hidden sm:inline-block absolute top-2.5 right-2.5 bg-white text-[9.5px] font-mono font-bold text-slate-800 px-2.5 py-0.5 rounded-full border border-slate-200 pointer-events-none shadow-sm opacity-0 group-hover:opacity-100 transition-opacity duration-150">
Try Tool ↗
</span>
</div>
@@ -361,7 +361,7 @@ export function ToolGridSection({
{/* Persistent Sticky Search & Category Hub - Never disappears when scrolling */}
{(showCategoryFilter || showSearch) && (
<div className="sticky top-[52px] sm:top-[58px] z-30 -mx-4 sm:-mx-6 lg:-mx-8 px-4 sm:px-6 lg:px-8 py-2.5 sm:py-3 bg-[#FAF8F5]/95 backdrop-blur-md border-b border-slate-200/80 shadow-xs mb-8 sm:mb-12 transition-all">
<div className="sticky top-[52px] sm:top-[58px] z-30 -mx-4 sm:-mx-6 lg:-mx-8 px-4 sm:px-6 lg:px-8 py-2.5 sm:py-3 bg-[#FAF8F5]/98 border-b border-slate-200/90 shadow-2xs mb-8 sm:mb-12 will-change-transform">
<div className="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-2.5 sm:gap-4">
{/* Category Navigation Pills */}
{showCategoryFilter && (