diff options
Diffstat (limited to 'frontend/templates/blocks/search.gotmpl')
-rw-r--r-- | frontend/templates/blocks/search.gotmpl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/templates/blocks/search.gotmpl b/frontend/templates/blocks/search.gotmpl new file mode 100644 index 0000000..5482e6b --- /dev/null +++ b/frontend/templates/blocks/search.gotmpl @@ -0,0 +1,17 @@ +{{- template "main" . }} +{{- template "js" . }} + +{{- define "main" }} + <label for="query">Search</label> + <form id="search" action="/options/results"> + <input id="query" name="query" type="search" value="{{ .Query }}" /> + <button>Search</button> + </form> + {{- with .Results }} + {{ block "results" . }}{{ end }} + {{- end }} +{{- end }} + +{{- define "js" }} + <script src="/static/search.js" defer></script> +{{- end }} |