Better API handling

This commit is contained in:
Elnu 2023-07-21 17:13:07 -07:00
parent 61c1ce5502
commit f558d7f0c1
4 changed files with 62 additions and 52 deletions

View file

@ -1,9 +1,9 @@
{{- define "search" -}}
<p><i>{{ if .Truncated }}Truncated results, showing first {{ .Count }}{{ else }}{{ if eq .Count 0 }}No results{{ else }}{{ .Count }} result{{ if ne .Count 1}}s{{ end }}{{ end }}{{ end }}.</i></p>
{{- range .ExactResults -}}
{{ range .ExactResults -}}
{{- template "word" . -}}
{{- end }}
<hr>
{{ if and (ne (len .ExactResults) 0) (ne (len .OtherResults) 0) }}<hr>{{ end }}
{{ range .OtherResults -}}
{{ template "word" . }}
{{- end -}}