navbar transparente

This commit is contained in:
2026-11-23 11:07:22 +02:00
parent ffe58e124f
commit 55af32d270
2 changed files with 100 additions and 55 deletions
@@ -88,11 +88,18 @@ export function PortalGroupedMenu() {
const currentItem = currentNavigationItem(groups, url);
const [loggingOut, setLoggingOut] = useState(false);
const [expanded, setExpanded] = useState(false);
const [scrolled, setScrolled] = useState(false);
const navigationId = useId();
const toolsId = useId();
const interestId = useId();
const toggle = useRef<HTMLButtonElement>(null);
useEffect(() => router.on('navigate', () => setExpanded(false)), []);
useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 8);
onScroll();
window.addEventListener('scroll', onScroll, { passive: true });
return () => window.removeEventListener('scroll', onScroll);
}, []);
const items = (children: PortalNavItem[]) =>
children.map((item) =>
item.children ? (
@@ -156,6 +163,7 @@ export function PortalGroupedMenu() {
className="tempo-header"
lang={language}
data-expanded={expanded || undefined}
data-scrolled={scrolled || undefined}
onKeyDown={(event) => {
if (
event.key === 'Escape' &&