about summary refs log tree commit diff stats
path: root/internal/components/optionDetail.templ
diff options
context:
space:
mode:
Diffstat (limited to 'internal/components/optionDetail.templ')
-rw-r--r--internal/components/optionDetail.templ58
1 files changed, 0 insertions, 58 deletions
diff --git a/internal/components/optionDetail.templ b/internal/components/optionDetail.templ
deleted file mode 100644
index 6eaafb4..0000000
--- a/internal/components/optionDetail.templ
+++ /dev/null
@@ -1,58 +0,0 @@
-package components
-
-import "go.alanpearce.eu/searchix/internal/nix"
-
-templ OptionDetail(option nix.Option) {
-	<h2>{ option.Name }</h2>
-	@markdown(option.Description)
-	<dl>
-		if option.Type != "" {
-			<dt>Type</dt>
-			<dd><code>{ option.Type }</code></dd>
-		}
-		if option.Default != nil {
-			if option.Default.Text != "" || option.Default.Markdown != "" {
-				<dt>Default</dt>
-				<dd>
-					if option.Default.Markdown != "" {
-						@markdown(option.Default.Markdown)
-					} else {
-						<pre><code>{ option.Default.Text }</code></pre>
-					}
-				</dd>
-			}
-		}
-		if option.Example != nil {
-			if option.Example.Text != "" || option.Example.Markdown != "" {
-				<dt>Example</dt>
-				<dd>
-					if option.Example.Markdown != "" {
-						@markdown(option.Example.Markdown)
-					} else {
-						<pre><code>{ option.Example.Text }</code></pre>
-					}
-				</dd>
-			}
-		}
-		if option.RelatedPackages != "" {
-			<dt>Related Packages</dt>
-			<dd>
-				@markdown(option.RelatedPackages)
-			</dd>
-		}
-		if len(option.Declarations) > 0 {
-			<dt>Declared</dt>
-			for _, d := range option.Declarations {
-				<dd>
-					<a href={ templ.SafeURL(d.URL) }>{ d.Name }</a>
-				</dd>
-			}
-		}
-	</dl>
-}
-
-templ OptionDetailPage(tdata TemplateData, option nix.Option) {
-	@Page(tdata) {
-		@OptionDetail(option)
-	}
-}