Files
supermarket/internal/web/templates/search.html
T
davidandClaude Opus 5.5 a81ced3503 Inventory is now the Market
Everything the user sees says Market: the sidebar, titles, breadcrumbs,
help text, messages, suggestions and the agent tool's description; the
export downloads as supermarket-market.yaml. Its pages live under
/market, and the old /inventory addresses redirect there (308, so a
form's POST stays a POST). The YAML format (inventory:), the database
and the code's names are unchanged, so exported files still import. A
breadcrumb no longer repeats the page's own title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:38:50 -07:00

30 lines
1.1 KiB
HTML

{{define "content"}}{{with .Data}}
<div class="page-head">
<h1>Search</h1>
<p class="lede">Posts, fetched items, the Market, your products and settings.</p>
</div>
<form class="search-page" action="/search" method="get" role="search">
<input type="search" name="q" value="{{.Q}}" placeholder="e.g. a company, a product, or words from a post" aria-label="Search for" autofocus>
<button type="submit">Search</button>
</form>
{{if .Q}}
{{if .Groups}}
{{$limit := .Limit}}
{{range .Groups}}
<h2>{{.Name}} <span class="muted small">{{len .Hits}}{{if ge (len .Hits) $limit}}+{{end}}</span></h2>
<ul class="results">
{{range .Hits}}
<li><a href="{{.Link}}">
<span class="title"><span>{{truncate 140 .Title}}</span>{{with .Badge}}<span class="badge {{.}}">{{.}}</span>{{end}}</span>
{{with .Detail}}<span class="detail">{{truncate 200 .}}</span>{{end}}
</a></li>
{{end}}
</ul>
{{end}}
{{else}}
<section class="card empty"><p>Nothing matches “{{.Q}}”. Every word has to appear; try fewer words.</p></section>
{{end}}
{{end}}
{{end}}{{end}}