feat: complete UI redesign — modern, clean search interface

- 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
This commit is contained in:
Franz Kafka 2026-03-22 08:06:31 +00:00
parent 471b9798e1
commit ea9bae88b0
7 changed files with 940 additions and 755 deletions

View file

@ -1,51 +1,26 @@
{{define "results_inner"}}
{{if .Corrections}}
<div class="corrections">
{{range .Corrections}}<span class="correction">{{.}}</span>{{end}}
</div>
<div class="correction">{{range .Corrections}}{{.}} {{end}}</div>
{{end}}
{{if .Answers}}
{{if or .Answers .Infoboxes}}
<div id="answers">
{{range .Answers}}
<div class="answer">{{.}}</div>
<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 id="sidebar">
<div class="results-meta">
{{if .NumberOfResults}}
<p id="result_count"><small>{{.NumberOfResults}} results</small></p>
{{end}}
{{if .Infoboxes}}
<div id="infoboxes">
{{range .Infoboxes}}
<div class="infobox">
{{if .title}}<div class="title">{{.title}}</div>{{end}}
{{if .content}}<div class="content">{{.content}}</div>{{end}}
{{if .img_src}}<img src="{{.img_src}}" alt="{{.title}}" loading="lazy">{{end}}
</div>
{{end}}
</div>
{{end}}
{{if .Suggestions}}
<div id="suggestions">
<small>Suggestions:</small>
<div>
{{range .Suggestions}}<span class="suggestion"><a href="/search?q={{.}}">{{.}}</a></span>{{end}}
</div>
</div>
{{end}}
{{if .UnresponsiveEngines}}
<div class="unresponsive_engines">
<small>Unresponsive engines:</small>
<ul>
{{range .UnresponsiveEngines}}<li>{{index . 0}}: {{index . 1}}</li>{{end}}
</ul>
</div>
<span>{{.NumberOfResults}} results</span>
{{end}}
</div>
@ -59,51 +34,47 @@
{{end}}
{{end}}
{{else if not .Answers}}
<div class="no_results">
<p>No results found.</p>
{{if .Query}}<p>Try different keywords or check your spelling.</p>{{end}}
<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 id="pagination" role="navigation">
<nav class="pagination" role="navigation">
{{if gt .Pageno 1}}
<form method="GET" action="/search" class="previous_page">
<form method="GET" action="/search" class="prev-next">
<input type="hidden" name="q" value="{{.Query}}">
<input type="hidden" name="pageno" value="{{.PrevPage}}">
<input type="hidden" name="format" value="html">
<button type="submit" role="link">← Previous</button>
<button type="submit">← Prev</button>
</form>
{{end}}
<div class="numbered_pagination">
{{range .PageNumbers}}
{{if .IsCurrent}}
<span class="page_number_current">{{.Num}}</span>
{{else}}
<form method="GET" action="/search" class="page_number">
<input type="hidden" name="q" value="{{$.Query}}">
<input type="hidden" name="pageno" value="{{.Num}}">
<input type="hidden" name="format" value="html">
<button type="submit" role="link">{{.Num}}</button>
</form>
{{end}}
{{end}}
</div>
{{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="next_page">
<form method="GET" action="/search" class="prev-next">
<input type="hidden" name="q" value="{{.Query}}">
<input type="hidden" name="pageno" value="{{.NextPage}}">
<input type="hidden" name="format" value="html">
<button type="submit" role="link">Next →</button>
<button type="submit">Next →</button>
</form>
{{end}}
</nav>
{{end}}
<div id="backToTop">
<div class="back-to-top" id="backToTop">
<a href="#">↑ Back to top</a>
</div>