Skip to content

Commit

Permalink
fix: search initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
therobrob committed Feb 8, 2025
1 parent fd57c97 commit 1e3f459
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions themes/fiptheme/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
<link rel="stylesheet" href="{{ $style.RelPermalink }}" media="screen" />
<link rel="stylesheet" href="/pagefind/pagefind-ui.css">
<script src="/pagefind/pagefind-ui.js"></script>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search", highlightParam: "highlight", showSubResults: true });
});
</script>
<!-- include the highlight script -->
<script type="module">
await import('/pagefind/pagefind-highlight.js');
new PagefindHighlight({ highlightParam: "highlight" });
</script>

<!-- include a favicon for your site if you have it, else omit the line below
Location of favicon can be in mytheme/static/favicon.ico -->
Expand Down
11 changes: 11 additions & 0 deletions themes/fiptheme/layouts/partials/stage.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search", highlightParam: "highlight", showSubResults: true });
});
</script>
<!-- include the highlight script -->
<script type="module">
await import('/pagefind/pagefind-highlight.js');
new PagefindHighlight({ highlightParam: "highlight" });
</script>

<section class="o-stage container-fluid">
{{ $image := resources.Get "images/startpage.webp" }}
{{ partial "image.html" $image }}
Expand Down

0 comments on commit 1e3f459

Please sign in to comment.