diff --git a/web/src/app/docs/layout.tsx b/web/src/app/docs/layout.tsx index 277d85b71e..df9232c06d 100644 --- a/web/src/app/docs/layout.tsx +++ b/web/src/app/docs/layout.tsx @@ -17,24 +17,9 @@ export default function DocsLayout({ const [open, setOpen] = useState(false) const [showTopFade, setShowTopFade] = useState(false) const [showBottomFade, setShowBottomFade] = useState(false) - const [isFixed, setIsFixed] = useState(false) const sidebarRef = useRef(null) - - // Track scroll position to determine if sidebar should be fixed - useEffect(() => { - const handleScroll = () => { - // The header with logo is approximately 72px tall (p-4 = 16px top/bottom + content height) - // Fix the sidebar when the user scrolls past the header - if (window.scrollY > 72) { - setIsFixed(true) - } else { - setIsFixed(false) - } - } - - window.addEventListener('scroll', handleScroll) - return () => window.removeEventListener('scroll', handleScroll) - }, []) + const containerRef = useRef(null) + const stickyTop = 64 // navbar height // Handle sidebar scroll for dynamic fade effects useEffect(() => { @@ -59,31 +44,35 @@ export default function DocsLayout({ return (
-
+
{/* Dynamic gradient fade indicators */} {showTopFade && ( -
+
)} {showBottomFade && ( -
+
)} {/* Enhanced scrollable container */}
setOpen(false)} />
-
{children}
+
+ {children} +