diff --git a/web/icons.templ b/web/icons.templ new file mode 100644 index 0000000..2d76673 --- /dev/null +++ b/web/icons.templ @@ -0,0 +1,13 @@ +package web + +templ SheildCheck() { + +} + +templ Speech() { + +} + +templ ApproxEqual() { + +} diff --git a/web/results.templ b/web/results.templ index bc30cb7..ce382b4 100644 --- a/web/results.templ +++ b/web/results.templ @@ -15,19 +15,6 @@ func DomainOnly(u string) string { } -func translateSource(s search.Source) string { - switch s { - case search.FTS: - return "Direct Match" - case search.Embedding: - return "Meaning Match" - case search.PartialFTS: - return "Partial Word Match" - default: - return "" - } -} - templ ResultsPage(markHostname string, query string, results []search.Result) { @Page() { @Head(query + " - mark: " + markHostname) @@ -58,8 +45,25 @@ templ ResultsPage(markHostname string, query string, results []search.Result) {
{ result.Title }
- { DomainOnly(result.Url) } - { translateSource(result.Source) }({ fmt.Sprintf("%.4f", result.Rank) }) + + { DomainOnly(result.Url) } + + switch result.Source { + case search.FTS: + @SheildCheck() + Direct Match + case search.Embedding: + @Speech() + Meaning Match + case search.PartialFTS: + @ApproxEqual() + Parital Match + default: + @ApproxEqual() + } + ({ fmt.Sprintf("%.4f", result.Rank) }) + +

{ result.Description }

} diff --git a/web/static/style.css b/web/static/style.css index 1732c9a..53d734c 100644 --- a/web/static/style.css +++ b/web/static/style.css @@ -125,6 +125,11 @@ a:visited { .title { font-size: 1.5rem; } + .pills { + display: flex; + flex-direction: row; + gap: 1em; + } .domain { color: #D3C6AA; background: #3D484D; @@ -148,6 +153,8 @@ a:visited { margin-top: 0.5em; margin-bottom: 0.5em; display: inline-flex; + align-items: center; + gap: 0.4em; } p { color: #C4C0B9;