From 58643f38bdd62dc538a03865b1f81eb77d957779 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 31 Dec 2024 14:56:37 +0100 Subject: feat: show scores in results table in dev mode --- internal/components/dev.templ | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/components/dev.templ (limited to 'internal/components/dev.templ') 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) { + + { strconv.FormatFloat(h.Score, 'f', 2, 64) } + + + +
+			{ h.Expl.String() }
+		
+
+} -- cgit 1.4.1