From d40c0e188a7fe1b36887f59c4a9958faa81b3d44 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 8 Jun 2024 20:31:47 +0200 Subject: feat: add detail pages for packages/options --- frontend/templates/blocks/option.gotmpl | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 frontend/templates/blocks/option.gotmpl (limited to 'frontend/templates/blocks/option.gotmpl') diff --git a/frontend/templates/blocks/option.gotmpl b/frontend/templates/blocks/option.gotmpl new file mode 100644 index 0000000..2248708 --- /dev/null +++ b/frontend/templates/blocks/option.gotmpl @@ -0,0 +1,48 @@ +{{- define "main" }} + {{- with .Document }} +

{{ .Name }}

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