Skip to content

Commit 8dc8d3f

Browse files
committed
fix: make search available in mobile nav menu
1 parent c33966c commit 8dc8d3f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/components/navigation/mobile-nav.astro

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Icon } from "astro-icon/components";
33
44
import { mobileNavId } from "@/components/navigation/constants";
55
import NavLink from "@/components/navigation/nav-link.astro";
6+
import Search from "@/components/search.astro";
67
import type { Navigation } from "@/lib/content/types";
78
import navigation from "~/content/navigation.json";
89
---
@@ -49,4 +50,10 @@ import navigation from "~/content/navigation.json";
4950
})
5051
}
5152
</ul>
53+
54+
<hr class="my-6" />
55+
56+
<div class="flex justify-end">
57+
<Search />
58+
</div>
5259
</div>

src/components/search.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const { t } = await createI18n(Astro.currentLocale as Locale | undefined);
2121

2222
<dialog
2323
aria-label={t("Search.search")}
24-
class="fixed mx-auto min-h-full w-full max-w-screen-md rounded-lg border bg-[#f1f1f1] backdrop:bg-[#545864a8] backdrop:backdrop-blur-sm open:grid sm:mt-[5rem] sm:max-h-[calc(100%-10rem)] sm:min-h-[16rem] sm:shadow-lg"
24+
class="fixed mx-auto min-h-full w-full max-w-screen-md border bg-[#f1f1f1] backdrop:bg-[#545864a8] backdrop:backdrop-blur-sm open:grid sm:mt-[5rem] sm:max-h-[calc(100%-10rem)] sm:min-h-[16rem] sm:rounded-lg sm:shadow-lg"
2525
>
2626
<div class="grid size-full gap-y-4 px-8 py-6" data-dialog-content>
2727
<div class="relative mt-8">

0 commit comments

Comments
 (0)