about summary refs log tree commit diff stats
path: root/frontend/templates/blocks/search.gotmpl
blob: 1be001a904b3840e5d61df9685e2826c9f4cff83 (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
{{- 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>
  {{- if .Results }}
    {{ block "results" . }}{{ end }}
  {{- end }}
{{- end }}

{{- define "head" }}
  <script src="/static/search.js" defer></script>
{{- end }}