Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/components/core/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { navData, rightMenu } = Astro.props;
function toggleMenu() {
menuButtonIconHam.toggleAttribute('hidden');
menuButtonIconClose.toggleAttribute('hidden');

if (navHeader.hasAttribute('mobile-menu-open', true)) {
menuButton.title = "Open Main Menu"
// unlock scroll position
Expand All @@ -34,26 +34,26 @@ const { navData, rightMenu } = Astro.props;
bodyElement.style.top = `-${scrollPosition}px`;
bodyElement.style.width = '100%';
}

navHeader.toggleAttribute('mobile-menu-open');
}
</script>
</script>

<header id="odysseyNavHeader" class={`${rightMenu ? "header--right" : ``.trim()}`}>
<div class="header-logo-menu__container">
<button id="menuButton" title="Open Main Menu">
<span id="menuButtonIconHam">
<Icon name="ic:baseline-menu" width="24px" height="24px" />
<Icon name="ic:baseline-menu" widths="24px" x-height="24px" />
</span>
<span id="menuButtonIconClose" hidden>
<Icon name="ic:baseline-close" width="24px" height="24px" />
<Icon name="ic:baseline-close" widths="24px" x-height="24px" />
</span>
</button>
<a class="header-logo__link" href="/">
<slot name="logo">
</slot>
</a>
</div>
<!-- to edit navbar, find '../config/nav.js' and edit there -->
<div class="header-nav__container">
<slot name="nav">
{navData && <nav>
Expand Down Expand Up @@ -130,7 +130,7 @@ const { navData, rightMenu } = Astro.props;
}
@media(max-width: 600px) {
#menuButton {
display: block;
display: block;
z-index: 100;
}
.header-nav__container {
Expand All @@ -152,9 +152,9 @@ const { navData, rightMenu } = Astro.props;
align-items: center;
flex-direction: column;
}
header[mobile-menu-open] nav ul li {
font-size: var(--font-size-lg);
margin-bottom: 1rem;
}
header[mobile-menu-open] nav ul li {
font-size: var(--font-size-lg);
margin-bottom: 1rem;
}
}
</style>