- New CSS: complete design system with CSS variables, modern color palette - Homepage: full-viewport hero with centered search, logo, tagline - Result cards: rounded, shadowed, with favicons via Google Favicon API - Layout: sidebar + results grid, responsive - Typography: proper font stack, variable weights - Settings panel: polished popover with animations - Autocomplete: modern dropdown with keyboard nav - Dark mode: full color palette via data-theme attribute - Favicon: clean search icon SVG
82 lines
2 KiB
HTML
82 lines
2 KiB
HTML
{{define "results_inner"}}
|
|
{{if .Corrections}}
|
|
<div class="correction">{{range .Corrections}}{{.}} {{end}}</div>
|
|
{{end}}
|
|
|
|
{{if or .Answers .Infoboxes}}
|
|
<div id="answers">
|
|
{{range .Answers}}
|
|
<div class="dialog-error">{{.}}</div>
|
|
{{end}}
|
|
{{range .Infoboxes}}
|
|
<div class="infobox">
|
|
{{if .title}}<div class="title">{{.title}}</div>{{end}}
|
|
{{if .content}}<div>{{.content}}</div>{{end}}
|
|
{{if .img_src}}<img src="{{.img_src}}" alt="{{.title}}">{{end}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="results-meta">
|
|
{{if .NumberOfResults}}
|
|
<span>{{.NumberOfResults}} results</span>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div id="urls" role="main">
|
|
{{if .Results}}
|
|
{{range .Results}}
|
|
{{if eq .Template "videos"}}
|
|
{{template "video_item" .}}
|
|
{{else}}
|
|
{{template "result_item" .}}
|
|
{{end}}
|
|
{{end}}
|
|
{{else if not .Answers}}
|
|
<div class="no-results">
|
|
<div class="no-results-icon">🔍</div>
|
|
<h2>No results found</h2>
|
|
<p>Try different keywords or check your spelling.</p>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
|
|
{{if .Pageno}}
|
|
<nav class="pagination" role="navigation">
|
|
{{if gt .Pageno 1}}
|
|
<form method="GET" action="/search" class="prev-next">
|
|
<input type="hidden" name="q" value="{{.Query}}">
|
|
<input type="hidden" name="pageno" value="{{.PrevPage}}">
|
|
<button type="submit">← Prev</button>
|
|
</form>
|
|
{{end}}
|
|
|
|
{{range .PageNumbers}}
|
|
{{if .IsCurrent}}
|
|
<span class="page-current">{{.Num}}</span>
|
|
{{else}}
|
|
<form method="GET" action="/search" class="page-link">
|
|
<input type="hidden" name="q" value="{{$.Query}}">
|
|
<input type="hidden" name="pageno" value="{{.Num}}">
|
|
<button type="submit">{{.Num}}</button>
|
|
</form>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{if .HasNext}}
|
|
<form method="GET" action="/search" class="prev-next">
|
|
<input type="hidden" name="q" value="{{.Query}}">
|
|
<input type="hidden" name="pageno" value="{{.NextPage}}">
|
|
<button type="submit">Next →</button>
|
|
</form>
|
|
{{end}}
|
|
</nav>
|
|
{{end}}
|
|
|
|
<div class="back-to-top" id="backToTop">
|
|
<a href="#">↑ Back to top</a>
|
|
</div>
|
|
|
|
<div class="htmx-indicator">Searching…</div>
|
|
{{end}}
|