feat(ui): complete vertical layout overhaul, dynamic JSON banners, and animate-ui text motion graphics

This commit is contained in:
2026-11-03 18:06:20 +05:30
parent 8cec9692dc
commit b47b033ab7
24 changed files with 1419 additions and 608 deletions
+10 -9
View File
@@ -15,9 +15,9 @@ interface NavbarProps {
export function Navbar({ config, currentLocale }: NavbarProps) {
const [isScrolled, setIsScrolled] = useState(false);
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const [mousePos, setMousePos] = useState({ x: 50, y: 50, active: false });
const pathname = usePathname();
const navRef = useRef<HTMLDivElement>(null);
const glintRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const handleScroll = () => {
@@ -28,14 +28,18 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
}, []);
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
if (!glintRef.current) return;
const rect = e.currentTarget.getBoundingClientRect();
const x = ((e.clientX - rect.left) / rect.width) * 100;
const y = ((e.clientY - rect.top) / rect.height) * 100;
setMousePos({ x, y, active: true });
glintRef.current.style.opacity = '0.6';
glintRef.current.style.background = `radial-gradient(ellipse 260px 80px at ${x.toFixed(1)}% ${y.toFixed(1)}%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 70%)`;
};
const handleMouseLeave = () => {
setMousePos((prev) => ({ ...prev, active: false }));
if (glintRef.current) {
glintRef.current.style.opacity = '0';
}
};
return (
@@ -51,13 +55,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
{/* Optical Glass Caustic Reflection Sheen */}
<div className="liquid-caustic-refraction" aria-hidden="true" />
{/* Dynamic Specular Caustic Glint - Subtle gloss on cursor interaction */}
{/* Dynamic Specular Caustic Glint - Direct DOM, 0 React re-renders */}
<div
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-[2]"
style={{
opacity: mousePos.active ? 0.6 : 0,
background: `radial-gradient(ellipse 260px 80px at ${mousePos.x}% ${mousePos.y}%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 70%)`,
}}
ref={glintRef}
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-[2] opacity-0"
/>
{/* Foreground Content: 100% Crisp, High-Contrast, Rock-Solid Static (Zero Wobble) */}