feat: search

This commit is contained in:
Evan Buss
2024-07-13 17:16:38 +00:00
parent 4f3948943a
commit 9094e780d0
8 changed files with 122 additions and 85 deletions

View File

@@ -2,30 +2,7 @@
<nav class="navigation">
{{if .Search }}
<div class="search">
<a
href="{{.Search}}"
tabindex="-1"
hx-get="?q={{.Search}}&partial=search.html"
>
<svg
width="30"
height="30"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
/>
</svg>
</a>
</div>
{{template "search" .}}
{{end}}
<div class="nav-controls">
@@ -45,11 +22,13 @@
{{end}}
<div class="info">
<p>{{.Title}}</p>
{{if empty .Author | not }}
<p>{{.Author}}</p>
{{end}}
</div>
</a>
</li>
{{end}}
</ul>
{{end}}
{{end}}