Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add search feature to the blog thanks to pagefind
- Loading branch information
Showing
10 changed files
with
117 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source: dist | ||
bundle_dir: _pagefind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import Layout from '../layouts/layout.astro'; | ||
import PageTitle from '../components/page-title.astro'; | ||
--- | ||
|
||
<Layout title="Einenlum - Search" description="Search articles." includeSearch={true}> | ||
<div class="mb-8"> | ||
<PageTitle>Search for articles</PageTitle> | ||
</div> | ||
|
||
<div id="search"></div> | ||
<script> | ||
window.addEventListener('DOMContentLoaded', (event) => { | ||
new PagefindUI({ element: "#search", showImages: false }); | ||
}); | ||
</script> | ||
|
||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
.pagefind-ui--reset mark, mark { | ||
@apply bg-indigo-200 !important; | ||
} | ||
|
||
.pagefind-ui__result-tag { | ||
@apply text-black; | ||
} | ||
|
||
.pagefind-ui__result, .pagefind-ui__result-title, .pagefind-ui__result-link { | ||
@apply dark:text-amber-50 !important; | ||
} | ||
|
||
.pagefind-ui__message { | ||
@apply text-black dark:text-amber-50 !important; | ||
@apply font-normal !important; | ||
} | ||
|
||
.pagefind-ui__result-link { | ||
@apply text-pink-900 !important; | ||
@apply hover:text-pink-700 !important; | ||
@apply dark:text-indigo-200 !important; | ||
@apply transition !important; | ||
@apply ease-in-out !important; | ||
@apply delay-150 !important; | ||
text-decoration: none !important; | ||
} | ||
|
||
.pagefind-ui__search-input { | ||
@apply border border-pink-900 dark:border-indigo-200 !important; | ||
@apply font-normal !important; | ||
@apply font-sans !important; | ||
} | ||
|
||
.pagefind-ui__search-input:focus, .pagefind-ui__search-input:active, .pagefind-ui__search-input:focus-visible { | ||
/* @apply border-pink-900 dark:border-indigo-200 !important; */ | ||
outline: unset !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f80333d
There was a problem hiding this comment.
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:
blog – ./
blog-git-master-einenlum.vercel.app
blog-ecru-alpha.vercel.app
blog-einenlum.vercel.app
einenlum.com
www.fromphptopython.com
fromphptopython.com
www.fromphptopython.io
fromphptopython.io
www.einenlum.com