diff --git a/components/nav/mobile/footer.module.css b/components/nav/mobile/footer.module.css index 879f66fb..094d95d3 100644 --- a/components/nav/mobile/footer.module.css +++ b/components/nav/mobile/footer.module.css @@ -6,6 +6,7 @@ background-color: var(--bs-body-bg); border-top: 1px solid var(--theme-toolbarActive); z-index: 1000; + justify-content: end; } .footerPadding { diff --git a/components/nav/sticky-bar.js b/components/nav/sticky-bar.js index 98ce3d24..a0312941 100644 --- a/components/nav/sticky-bar.js +++ b/components/nav/sticky-bar.js @@ -7,51 +7,52 @@ import classNames from 'classnames' export default function StickyBar ({ prefix, sub, path, topNavKey, dropNavKey }) { const ref = useRef() - const sticky = useRef() const me = useMe() useEffect(() => { - const observer = new window.IntersectionObserver(([entry]) => { - sticky?.current?.classList.toggle(styles.hide, entry.isIntersecting) - }) - ref?.current && observer.observe(ref.current) + const stick = () => { + if (window.scrollY > 100) { + ref.current?.classList.remove(styles.hide) + } else { + ref.current?.classList.add(styles.hide) + } + } + + window.addEventListener('scroll', stick) return () => { - ref?.current && observer.unobserve(ref.current) + window.removeEventListener('scroll', stick) } - }, [ref?.current, sticky?.current]) + }, [ref?.current]) return ( - <> -
-