perf: eliminate scroll lag with single-pass gradient blur navbar and add framer-motion constant grain diffusion with minimal tags
This commit is contained in:
@@ -36,64 +36,21 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
|
||||
|
||||
return (
|
||||
<header className="fixed top-0 left-0 right-0 w-full z-50 pointer-events-none transition-all duration-300">
|
||||
{/* 1. Progressive Multi-Tier Gradient Blur Canopy (Extends 120px down from the top) */}
|
||||
<div className="absolute top-0 inset-x-0 h-[120px] sm:h-[135px] pointer-events-none overflow-hidden select-none">
|
||||
{/* Tier 1: Deep subtle blur (softest edge at the bottom) */}
|
||||
{/* 1. Ultra-Smooth High-Performance Gradient Blur Canopy (Zero lag, locks at 60/120fps) */}
|
||||
<div className="absolute top-0 inset-x-0 h-28 sm:h-32 pointer-events-none overflow-hidden select-none">
|
||||
{/* Single hardware-accelerated progressive blur */}
|
||||
<div
|
||||
className="absolute inset-0 backdrop-blur-[2px]"
|
||||
className="absolute inset-0 backdrop-blur-md"
|
||||
style={{
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%)',
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%)',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Tier 2: Low-mid progressive blur */}
|
||||
{/* Seamless Color Melt into warm canvas background (#FAF8F5) */}
|
||||
<div
|
||||
className="absolute inset-0 backdrop-blur-[6px]"
|
||||
style={{
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 80%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 80%)',
|
||||
}}
|
||||
className="absolute inset-0 bg-gradient-to-b from-[#FAF8F5] via-[#FAF8F5]/85 to-transparent pointer-events-none"
|
||||
/>
|
||||
|
||||
{/* Tier 3: Medium progressive blur */}
|
||||
<div
|
||||
className="absolute inset-0 backdrop-blur-[12px]"
|
||||
style={{
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 22%, rgba(0,0,0,0) 65%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 22%, rgba(0,0,0,0) 65%)',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Tier 4: Strong progressive blur */}
|
||||
<div
|
||||
className="absolute inset-0 backdrop-blur-[24px]"
|
||||
style={{
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 50%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 50%)',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Tier 5: Ultra dense frosted blur under the main header */}
|
||||
<div
|
||||
className="absolute inset-0 backdrop-blur-[40px]"
|
||||
style={{
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 40%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 40%)',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Progressive Color Tint: Melts scrolling content softly into the warm page canvas background (#FAF8F5) */}
|
||||
<div
|
||||
className="absolute inset-0 bg-gradient-to-b from-[#FAF8F5] via-[#FAF8F5]/92 to-transparent pointer-events-none"
|
||||
style={{
|
||||
maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 95%)',
|
||||
WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 95%)',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Soft feather at bottom */}
|
||||
<div className="absolute bottom-0 inset-x-0 h-6 bg-gradient-to-b from-transparent to-[#FAF8F5]/0 pointer-events-none" />
|
||||
</div>
|
||||
|
||||
{/* 2. Top Prismatic Micro-Highlight */}
|
||||
|
||||
Reference in New Issue
Block a user