about summary refs log tree commit diff stats
path: root/frontend/templates/blocks/packages.gotmpl
diff options
context:
space:
mode:
authorAlan Pearce2024-05-17 17:37:57 +0200
committerAlan Pearce2024-05-17 17:37:57 +0200
commit8df293c0ad8b8be9f43f2d5dc1334b8546d6f470 (patch)
tree2b2d983c1ab21b43971e91eb1f95f61e445b41b5 /frontend/templates/blocks/packages.gotmpl
parent2edf3f098dd1bb79fd97a8f30fe28938cbde9f3c (diff)
downloadsearchix-8df293c0ad8b8be9f43f2d5dc1334b8546d6f470.tar.lz
searchix-8df293c0ad8b8be9f43f2d5dc1334b8546d6f470.tar.zst
searchix-8df293c0ad8b8be9f43f2d5dc1334b8546d6f470.zip
feat: display more information about packages
Diffstat (limited to 'frontend/templates/blocks/packages.gotmpl')
-rw-r--r--frontend/templates/blocks/packages.gotmpl49
1 files changed, 47 insertions, 2 deletions
diff --git a/frontend/templates/blocks/packages.gotmpl b/frontend/templates/blocks/packages.gotmpl
index 68f9246..472b86e 100644
--- a/frontend/templates/blocks/packages.gotmpl
+++ b/frontend/templates/blocks/packages.gotmpl
@@ -4,15 +4,60 @@
       <details id="{{ .Name }}">
         <summary>
           <h3>
-            {{ .Name }}
+            {{- if .Broken }}
+              <del>{{ .Name }}</del>
+            {{- else }}
+              {{ .Name }}
+            {{- end }}
           </h3>
         </summary>
-        {{ .Description }}
+        <p>{{ or .LongDescription .Description }}</p>
         <dl>
+          {{- with .MainProgram }}
+            <dt>Main Program</dt>
+            <dd>
+              <code>{{ . }}</code>
+            </dd>
+          {{- end }}
+          {{- with .Homepages }}
+            <dt>Homepage</dt>
+            <dd>
+              {{- range . }}
+                <a href="{{ . }}">{{ . }}</a>
+              {{- end }}
+            </dd>
+          {{- end }}
           {{- with .Version }}
             <dt>Version</dt>
             <dd>{{ . }}</dd>
           {{- end }}
+          {{- with .Licenses }}
+            <dt>License</dt>
+            <dd>
+              {{- range . }}
+                {{- if .URL }}
+                  <a href="{{ .URL }}">{{ or .FullName .Name }}</a>
+                {{- else }}
+                  {{ or .FullName .Name }}
+                {{- end }}
+                {{- with .AppendixURL }}
+                  <a href="{{ . }}">Appendix</a>
+                {{- end }}
+              {{- end }}
+            </dd>
+          {{- end }}
+          {{- with .Maintainers }}
+            <dt>Maintainer{{ if gt (len .) 1 }}s{{ end }}</dt>
+            <dd>
+              {{- range . }}
+                {{- if .Github }}
+                  <a href="https://github.com/{{ .Github }}">{{ .Name }}</a>
+                {{- else }}
+                  {{ .Name }}
+                {{- end }}
+              {{- end }}
+            </dd>
+          {{- end }}
           {{- with .Definition }}
             <dt>Defined</dt>
             <dd>