From 27b07a80f1872205dfeb949e9b90cf85f6e43744 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 17 May 2024 09:19:12 +0200 Subject: refactor: move general results template code into results template --- frontend/templates/blocks/results.gotmpl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 frontend/templates/blocks/results.gotmpl (limited to 'frontend/templates/blocks/results.gotmpl') diff --git a/frontend/templates/blocks/results.gotmpl b/frontend/templates/blocks/results.gotmpl new file mode 100644 index 0000000..95c89ca --- /dev/null +++ b/frontend/templates/blocks/results.gotmpl @@ -0,0 +1,23 @@ +{{- define "results" }} + {{- with .Results }} + {{- if gt .Total 0 }} +
+ {{ block "hits" .Hits }} + {{ end }} + +
+ {{- else }} + Nothing found + {{- end }} + {{- end }} +{{- end }} -- cgit 1.4.1