all repos — searchix @ b682ed936d8185e91331e9f66fc0e13072f8b545

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: show metadata in grid

Alan Pearce
commit

b682ed936d8185e91331e9f66fc0e13072f8b545

parent

5b9e67fd5129dec75169a1a070c70f910dff6da2

1 file changed, 34 insertions(+), 11 deletions(-)

changed files
M frontend/templates/blocks/options.gotmplfrontend/templates/blocks/options.gotmpl
@@ -1,13 +1,36 @@
{{ define "results" }} - {{ range $opt, $data := .Results }} - <details> - <summary> - {{ $opt }} - </summary> - <p> - {{ $data.Description }} - </p> - </details> - {{ end }} -</div> + {{- range $opt, $data := .Results }} + <details> + <summary> + {{ $opt }} + </summary> + <p> + {{ $data.Description }} + </p> + <dl> + {{- with $data.Type }} + <dt>Type</dt> + <dd>{{ . }}</dd> + {{- end }} + {{- with $data.Default }} + <dt>Default</dt> + <dd><code>{{ .Text }}</code></dd> + {{- end }} + {{- with $data.Example }} + {{- if .Text }} + <dt>Example</dt> + <dd><code>{{ .Text }}</code></dd> + {{- end }} + {{- end }} + {{- with $data.Declarations }} + <dt>Declared</dt> + {{- range . }} + <dd> + <a href="file://{{ . }}">{{ . }}</a> + </dd> + {{- end }} + {{- end }} + </dl> + </details> + {{- end }} {{ end }}