blob: 93ae545d5a938d8574d756336665a6077628435a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
{{- define "main" }}
<form id="search" role="search">
<fieldset>
<legend id="legend">
<h2>{{ sourceNameAndType .Source }} search</h2>
</legend>
<input
id="query"
aria-labelledby="legend"
name="query"
type="search"
value="{{ .Query }}"
autofocus
spellcheck="false"
/>
<button>Search</button>
</fieldset>
</form>
<section id="results" role="list" aria-label="search results">
{{- if .Results }}
{{ block "results" . }}{{ end }}
{{- end }}
</section>
<dialog id="dialog">
<button autofocus>Close</button>
</dialog>
{{- end }}
{{- define "head" }}
{{- with (index .Assets.Scripts "static/search.js") }}
<script
src="{{ .URL }}"
defer
integrity="sha256-{{ .Base64SHA256 }}"
></script>
{{- end }}
{{- end }}
|