about summary refs log tree commit diff stats
path: root/internal/components/combined.templ
diff options
context:
space:
mode:
Diffstat (limited to 'internal/components/combined.templ')
-rw-r--r--internal/components/combined.templ47
1 files changed, 0 insertions, 47 deletions
diff --git a/internal/components/combined.templ b/internal/components/combined.templ
deleted file mode 100644
index 3beddcd..0000000
--- a/internal/components/combined.templ
+++ /dev/null
@@ -1,47 +0,0 @@
-package components
-
-import (
-	"go.alanpearce.eu/searchix/internal/config"
-	"go.alanpearce.eu/searchix/internal/index"
-	"go.alanpearce.eu/searchix/internal/nix"
-)
-
-templ Combined(result *index.Result) {
-	<table>
-		<thead>
-			<tr>
-				<th scope="col">Attribute</th>
-				<th scope="col">Description</th>
-				if config.DevMode {
-					<th scope="col">Score</th>
-				}
-			</tr>
-		</thead>
-		<tbody>
-			for _, hit := range result.Hits {
-				<tr>
-					<td>
-						@openCombinedDialogLink(nix.GetKey(hit.Data))
-					</td>
-					<td>
-						switch hit.Data.(type) {
-							case nix.Option:
-								if o := convertMatch[nix.Option](hit.Data); o != nil {
-									@markdown(firstSentence(o.Description))
-								}
-							case nix.Package:
-								if o := convertMatch[nix.Package](hit.Data); o != nil {
-									{ firstSentence(o.Description) }
-								}
-						}
-					</td>
-					if config.DevMode {
-						<td>
-							@score(hit)
-						</td>
-					}
-				</tr>
-			}
-		</tbody>
-	</table>
-}