Skip to content

Commit

Permalink
style(header_nav): 🩹 try fix dropdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Interstellar750 committed Nov 15, 2023
1 parent 316919f commit 3f91e9c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/components/header_nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<a class:font-bold={link === path} href={link}>{text}</a>
</li>
{:else if children}
<li tabindex="0">
<li tabindex="0" class="dropdown dropdown-right">
<span class:font-bold={children.some(({ link }) => link === path)} class="justify-between gap-1 max-w-[13rem]">
{text}
<span class="i-heroicons-solid-chevron-right mr-2" />
</span>
<ul class="bg-base-100 text-base-content shadow-lg p-2">
<ul class="dropdown-content rounded-box bg-base-100 text-base-content shadow-lg p-2">
{#each children as { text, link }}
<li>
<a class:font-bold={link === path} href={link}>{text}</a>
<a class:font-bold={link === path} class="w-36" href={link}>{text}</a>
</li>
{/each}
</ul>
Expand All @@ -55,16 +55,16 @@
<a class="!rounded-btn" class:font-bold={link === path} href={link}>{text}</a>
</li>
{:else if children}
<li >
<li class="dropdown dropdown-hover">
<span class:font-bold={children.some(({ link }) => link === path)} class="!rounded-btn gap-1">
{text}
<span class="i-heroicons-solid-chevron-down -mr-1" />
</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<ul tabindex="0" class="menu rounded-box bg-base-100 text-base-content shadow-lg p-2">
<ul tabindex="0" class="dropdown-content menu rounded-box bg-base-100 text-base-content shadow-lg p-2">
{#each children as { text, link }}
<li>
<a class:font-bold={link === path} href={link}>{text}</a>
<a class:font-bold={link === path} class="w-36" href={link}>{text}</a>
</li>
{/each}
</ul>
Expand Down

1 comment on commit 3f91e9c

@vercel
Copy link

@vercel vercel bot commented on 3f91e9c Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hexo-s – ./

hexo-s-interstellar750.vercel.app
hexo-s-git-urara-interstellar750.vercel.app
trle5.xyz

Please sign in to comment.