- Inline CSS in base.html (Inter, dark mode, sticky search, tabs, results) - Remove HTMX/JS from templates; pagination via GET links - Atmospheric side gradients + grid; wider column on large viewports - Parse ?category= for HTML tabs (fixes Images category routing) - Include bing_images, ddg_images, qwant_images in local_ported defaults - Default listen port 5355; update Docker, compose, flake, README - Favicon img uses /favicon/ proxy; preferences without inline JS Made-with: Cursor
73 lines
2 KiB
HTML
73 lines
2 KiB
HTML
{{define "results_inner"}}
|
|
{{if .Corrections}}
|
|
<div id="corrections" class="correction">{{range .Corrections}}{{.}} {{end}}</div>
|
|
{{end}}
|
|
|
|
{{if or .Answers .Infoboxes}}
|
|
<div id="answers">
|
|
{{range .Answers}}
|
|
<div class="dialog-error">{{.}}</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="results-meta" id="results-meta">
|
|
{{if .NumberOfResults}}
|
|
<span>{{.NumberOfResults}} results</span>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div id="urls" role="main">
|
|
{{if .Results}}
|
|
{{if .IsImageSearch}}
|
|
<div class="image-grid">
|
|
{{range .Results}}
|
|
{{if eq .Template "images"}}
|
|
{{template "image_item" .}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
{{range .Results}}
|
|
{{if eq .Template "videos"}}
|
|
{{template "video_item" .}}
|
|
{{else if eq .Template "images"}}
|
|
{{template "image_item" .}}
|
|
{{else}}
|
|
{{template "result_item" .}}
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
{{else if not .Answers}}
|
|
<div class="no-results">
|
|
<div class="no-results-icon" aria-hidden="true">🔍</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" aria-label="Pagination">
|
|
{{if gt .Pageno 1}}
|
|
<a class="pag-link" href="/search?q={{.Query | urlquery}}&pageno={{.PrevPage}}{{if and .ActiveCategory (ne .ActiveCategory "all")}}&category={{.ActiveCategory | urlquery}}{{end}}">← Prev</a>
|
|
{{end}}
|
|
|
|
{{range .PageNumbers}}
|
|
{{if .IsCurrent}}
|
|
<span class="page-current" aria-current="page">{{.Num}}</span>
|
|
{{else}}
|
|
<a class="pag-link" href="/search?q={{$.Query | urlquery}}&pageno={{.Num}}{{if and $.ActiveCategory (ne $.ActiveCategory "all")}}&category={{$.ActiveCategory | urlquery}}{{end}}">{{.Num}}</a>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{if .HasNext}}
|
|
<a class="pag-link" href="/search?q={{.Query | urlquery}}&pageno={{.NextPage}}{{if and .ActiveCategory (ne .ActiveCategory "all")}}&category={{.ActiveCategory | urlquery}}{{end}}">Next →</a>
|
|
{{end}}
|
|
</nav>
|
|
{{end}}
|
|
|
|
<div class="back-to-top">
|
|
<a href="#top">↑ Back to top</a>
|
|
</div>
|
|
{{end}}
|