Skip to content

Commit

Permalink
add href to navbar home button for seo
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Mar 4, 2024
1 parent dcb2b9d commit aa071aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const base = import.meta.env.BASE_URL;
">
<div class="grid sm:grid-cols-3 max-sm:grid-cols-2 justify-center items-center">
<div class="flex flex-row justify-start items-center gap-3">
<a class="home-button">
<a class="home-button" href={base}>
<!-- <Image src={logo} alt="Globed logo" class="w-[24px] h-[24px]"/> -->
<GlobeIcon/>
<span class="font-head text-xl">Globed</span>
Expand Down Expand Up @@ -77,6 +77,7 @@ const base = import.meta.env.BASE_URL;
<script define:vars={{ base }}>
document.querySelectorAll('.home-button').forEach(btn => {
btn.addEventListener('click', e => {
e.preventDefault();
if (window.matchMedia("(max-width: 640px)").matches) {
document.querySelector('nav')?.classList.toggle('open');
}
Expand Down

0 comments on commit aa071aa

Please sign in to comment.