Add result truncation

This commit is contained in:
Elnu 2023-07-21 12:17:54 -07:00
parent 36710478f2
commit b6d3b703c9
2 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,5 @@
{{- define "search" -}}
<p><i>{{ if eq .Count 0 }}No results{{ else }}{{ .Count }} result{{ if ne .Count 1}}s{{ end }}{{ end }}.</i></p>
<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 -}}
{{- template "word" . -}}
{{- end }}