about summary refs log tree commit diff stats
path: root/internal/components/dev.templ
blob: a03eb4b62113de774c8e1b133fea4b5107fb67e9 (plain)
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>
}