From 4c06f763f471f51a655b8437f9529149512e5507 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 May 2024 17:11:28 +0200 Subject: refactor: enable access to bleve DocumentMatch structs --- frontend/templates/blocks/options.gotmpl | 98 ++++++++++++++++---------------- 1 file changed, 50 insertions(+), 48 deletions(-) (limited to 'frontend/templates') diff --git a/frontend/templates/blocks/options.gotmpl b/frontend/templates/blocks/options.gotmpl index 88553b2..a9c2a1b 100644 --- a/frontend/templates/blocks/options.gotmpl +++ b/frontend/templates/blocks/options.gotmpl @@ -2,57 +2,59 @@ {{- define "results" }} {{- if gt .Results.Total 0 }}
- {{- range .Results.Results }} -
- - {{ .Option }} - -

- {{ markdown .Description }} -

-
- {{- with .Type }} -
Type
-
{{ . }}
- {{- end }} - {{- with .Default }} - {{- if or .Text .Markdown }} -
Default
-
- {{- if .Markdown }} - {{ markdown .Markdown }} - {{- else }} -
{{ .Text }}
- {{- end }} -
+ {{- range .Results.Hits }} + {{- with .Data }} +
+ + {{ .Option }} + +

+ {{ markdown .Description }} +

+
+ {{- with .Type }} +
Type
+
{{ . }}
{{- end }} - {{- end }} - {{- with .Example }} - {{- if or .Text .Markdown }} -
Example
-
- {{- if .Markdown }} - {{ markdown .Markdown }} - {{- else }} -
{{ .Text }}
- {{- end }} -
+ {{- with .Default }} + {{- if or .Text .Markdown }} +
Default
+
+ {{- if .Markdown }} + {{ markdown .Markdown }} + {{- else }} +
{{ .Text }}
+ {{- end }} +
+ {{- end }} {{- end }} - {{- end }} - {{- with .RelatedPackages }} -
Related Packages
-
{{ . }}
- {{- end }} - {{- with .Declarations }} -
Declared
- {{- range . }} -
- {{ .Name }} -
+ {{- with .Example }} + {{- if or .Text .Markdown }} +
Example
+
+ {{- if .Markdown }} + {{ markdown .Markdown }} + {{- else }} +
{{ .Text }}
+ {{- end }} +
+ {{- end }} {{- end }} - {{- end }} -
-
+ {{- with .RelatedPackages }} +
Related Packages
+
{{ . }}
+ {{- end }} + {{- with .Declarations }} +
Declared
+ {{- range . }} +
+ {{ .Name }} +
+ {{- end }} + {{- end }} +
+
+ {{- end }} {{- end }}