From b3ab1c438edbece0157a1a973f2f90b2e0c06459 Mon Sep 17 00:00:00 2001 From: Korbs Date: Thu, 14 Nov 2024 23:53:00 -0500 Subject: [PATCH] Add Search component --- src/components/Search.astro | 81 ++++++++++++++++++++++++++++++ src/components/global/Header.astro | 6 ++- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 src/components/Search.astro diff --git a/src/components/Search.astro b/src/components/Search.astro new file mode 100644 index 0000000..2507883 --- /dev/null +++ b/src/components/Search.astro @@ -0,0 +1,81 @@ +--- +import '@styles/search.scss' + +export interface Props { + readonly id?: string; + readonly className?: string; + readonly query?: string; + readonly uiOptions?: Record; +} + +const { id, className, query, uiOptions = {} } = Astro.props; +const bundlePath = `${import.meta.env.BASE_URL}pagefind/`; +--- + +
+
+ \ No newline at end of file diff --git a/src/components/global/Header.astro b/src/components/global/Header.astro index 42bfba1..a0635d2 100755 --- a/src/components/global/Header.astro +++ b/src/components/global/Header.astro @@ -1,14 +1,16 @@ --- // Settings import { SiteSettings, HeaderItems } from '@config' +import Search from '@components/Search.astro' ---
-
+ -
+
{HeaderItems.map((item) => ( {item.text} ))}