about summary refs log tree commit diff stats
path: root/frontend/templates/blocks/search.gotmpl
blob: b03410c503529b7a1119990d84a4a6aae2afabcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{- template "main" . }}
{{- template "js" . }}

{{- define "main" }}
  <form id="search" action="/options/{{ .Source }}/results">
    <label for="query">{{ sourceName .Source }} option search</label>
    <fieldset>
      <input id="query" name="query" type="search" value="{{ .Query }}" />
      <button>Search</button>
    </fieldset>
  </form>
  {{- with .Results }}
    {{ block "results" . }}{{ end }}
  {{- end }}
{{- end }}

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