fix: search

This commit is contained in:
Cory Dransfeldt 2023-07-04 17:17:09 -07:00
parent 1c1a058675
commit 054962b1d1
No known key found for this signature in database

View file

@ -17,7 +17,7 @@ meta:
image:
src: https://coryd.dev/assets/img/avatar.webp
---
<link href="/_pagefind/pagefind-ui.css" rel="stylesheet">
<link href="https://coryd.dev/_pagefind/pagefind-ui.css" rel="stylesheet">
<style>
:root {
--pagefind-ui-font: InterVariable, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@ -35,9 +35,11 @@ meta:
}
</style>
<div id="search" class="search"></div>
<script src="/_pagefind/pagefind-ui.js" onload="new PagefindUI({ element: '#search', showImages: false });"></script>
<script src="https://coryd.dev/_pagefind/pagefind-ui.js" onload="new PagefindUI({ element: '#search', showImages: false });"></script>
<script>
document.querySelector('#search').addEventListener('focusout', (e) => {
plausible('Search', { props: { query: e.target.value }})
})
if (plausible) {
document.querySelector('#search').addEventListener('focusout', (e) => {
plausible('Search', { props: { query: e.target.value }})
})
}
</script>