about summary refs log tree commit diff stats
path: root/frontend/templates/blocks/options.gotmpl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/templates/blocks/options.gotmpl')
-rw-r--r--frontend/templates/blocks/options.gotmpl75
1 files changed, 23 insertions, 52 deletions
diff --git a/frontend/templates/blocks/options.gotmpl b/frontend/templates/blocks/options.gotmpl
index de31696..5a08bae 100644
--- a/frontend/templates/blocks/options.gotmpl
+++ b/frontend/templates/blocks/options.gotmpl
@@ -1,54 +1,25 @@
 {{- define "hits" }}
-  {{- range . }}
-    {{- with .Data }}
-      <details id="{{ .Name }}">
-        <summary>
-          <h3>{{ .Name }}</h3>
-        </summary>
-        {{ markdown .Description }}
-        <dl>
-          {{- with .Type }}
-            <dt>Type</dt>
-            <dd><code>{{ . }}</code></dd>
-          {{- end }}
-          {{- with .Default }}
-            {{- if or .Text .Markdown }}
-              <dt>Default</dt>
-              <dd>
-                {{- if .Markdown }}
-                  {{ markdown .Markdown }}
-                {{- else }}
-                  <pre><code>{{ .Text }}</code></pre>
-                {{- end }}
-              </dd>
-            {{- end }}
-          {{- end }}
-          {{- with .Example }}
-            {{- if or .Text .Markdown }}
-              <dt>Example</dt>
-              <dd>
-                {{- if .Markdown }}
-                  {{ markdown .Markdown }}
-                {{- else }}
-                  <pre><code>{{ .Text }}</code></pre>
-                {{- end }}
-              </dd>
-            {{- end }}
-          {{- end }}
-          {{- with .RelatedPackages }}
-            <dt>Related Packages</dt>
-            <dd>{{ . }}</dd>
-          {{- end }}
-          {{- with .Declarations }}
-            <dt>Declared</dt>
-            {{- range . }}
-              <dd>
-                <a href="{{ .URL }}">{{ .Name }}</a>
-              </dd>
-            {{- end }}
-          {{- end }}
-        </dl>
-      </details>
-    {{- end }}
-  {{- end }}
+  <table>
+    <thead>
+      <tr>
+        <th scope="col">Title</th>
+        <th scope="col">Description</th>
+      </tr>
+    </thead>
+    <tbody>
+      {{- range . }}
+        {{- with .Data }}
+          <tr>
+            <td>
+              <a href="{{ .Name }}" class="open-dialog">{{ .Name }}</a>
+            </td>
+            <td>
+              {{ markdown (firstSentence .Description) }}
+              <dialog id="{{ .Name }}"></dialog>
+            </td>
+          </tr>
+        {{- end }}
+      {{- end }}
+    </tbody>
+  </table>
 {{- end }}