Skip to content

Commit a45a531

Browse files
committed
hotfix: cannot click on nav panel
1 parent f44a9c5 commit a45a531

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

src/components/Header.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ const { focus } = Astro.props;
7777
<HamburgerButton client:visible {links} />
7878
</div>
7979
</div>
80-
<div id="menu-popover-slot" class="absolute w-full"></div>
8180
</header>
8281

8382
<style>

src/islands/svelte/hamburger-button.svelte

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,23 @@
1313
</Popover.Trigger>
1414

1515
<Popover.Content align="end" side="bottom" strategy="fixed">
16-
<Popover.Portal to="#menu-popover-slot">
17-
<div
18-
transition:fade|global={{ duration: 70 }}
19-
class="w-full bg-gray-50/70 backdrop-blur-md lg:hidden"
20-
>
21-
<ul>
22-
{#each links as link}
23-
<li class="hover:bg-gray-100">
24-
<a
25-
href={link.href}
26-
class="block px-4 py-2"
27-
data-astro-prefetch="viewport"
28-
>
29-
{link.title}
30-
</a>
31-
</li>
32-
{/each}
33-
</ul>
34-
</div>
35-
</Popover.Portal>
16+
<div
17+
transition:fade|global={{ duration: 70 }}
18+
class="absolute right-0 w-[100vw] bg-gray-50/70 lg:hidden"
19+
>
20+
<ul>
21+
{#each links as link}
22+
<li class="hover:bg-gray-100">
23+
<a
24+
href={link.href}
25+
class="block px-8 py-2"
26+
data-astro-prefetch="viewport"
27+
>
28+
{link.title}
29+
</a>
30+
</li>
31+
{/each}
32+
</ul>
33+
</div>
3634
</Popover.Content>
3735
</Popover.Root>

0 commit comments

Comments
 (0)