about summary refs log tree commit diff stats
path: root/internal/components/dev.templ
diff options
context:
space:
mode:
Diffstat (limited to 'internal/components/dev.templ')
-rw-r--r--internal/components/dev.templ18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/components/dev.templ b/internal/components/dev.templ
new file mode 100644
index 0000000..a03eb4b
--- /dev/null
+++ b/internal/components/dev.templ
@@ -0,0 +1,18 @@
+package components
+
+import (
+	"go.alanpearce.eu/searchix/internal/index"
+	"strconv"
+)
+
+templ score(h index.DocumentMatch) {
+	<a class="open-sibling-dialog">
+		{ strconv.FormatFloat(h.Score, 'f', 2, 64) }
+	</a>
+	<dialog>
+		<button autofocus>Close</button>
+		<pre>
+			{ h.Expl.String() }
+		</pre>
+	</dialog>
+}