all repos — searchix @ 58643f38bdd62dc538a03865b1f81eb77d957779

Search engine for NixOS, nix-darwin, home-manager and NUR users

internal/components/dev.templ (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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>
}