aboutsummaryrefslogtreecommitdiff
path: root/templates/results.html
diff options
context:
space:
mode:
authorElse <else@localhost>2026-03-23 11:18:20 +0100
committerfrosty <gabriel@bwaaa.monster>2026-03-23 10:29:36 -0400
commit4ed9ec9fc5155508102da67829cf7fec9e92a50a (patch)
treedf1b198b21d654c2badcd4309641bdf076e3b932 /templates/results.html
parent660a4918b8fbd6f5131ba2b66c892698f7233956 (diff)
downloadomnisearch-4ed9ec9fc5155508102da67829cf7fec9e92a50a.tar.gz
Add engine filters and result source labels
Diffstat (limited to 'templates/results.html')
-rw-r--r--templates/results.html61
1 files changed, 21 insertions, 40 deletions
diff --git a/templates/results.html b/templates/results.html
index d8e2601..f0b0ca0 100644
--- a/templates/results.html
+++ b/templates/results.html
@@ -20,13 +20,14 @@
Omni<span>Search</span>
</h1>
<form action="/search" method="GET" class="search-form">
+ <input name="engine" type="hidden" value="{{selected_engine}}">
<input name="q" type="text" class="search-box" autocomplete="off" placeholder="Search the web..."
value="{{query}}">
</form>
</header>
<nav class="nav-tabs">
<div class="nav-container">
- <a href="/search?q={{query}}" class="active">
+ <a href="{{search_href}}" class="active">
All
</a>
<a href="/images?q={{query}}">
@@ -38,6 +39,16 @@
<aside class="sidebar-spacer">
</aside>
<main class="results-container">
+ {{if exists engine_filters}}
+ <nav class="engine-filter-list">
+ {{for filter in engine_filters}}
+ <a href="{{filter[0]}}" class="{{filter[2]}}">
+ {{filter[1]}}
+ </a>
+ {{endfor}}
+ </nav>
+ {{endif}}
+
{{if exists engine_warnings}}
<section class="engine-warning-list">
{{for warning in engine_warnings}}
@@ -62,6 +73,9 @@
<span class="url">
{{result[1]}}
</span>
+ <span class="result-sources">
+ {{result[4]}}
+ </span>
</div>
<a href="{{result[0]}}">
{{result[2]}}
@@ -75,48 +89,15 @@
</div>
{{endfor}}
+ {{if exists pagination_links}}
<nav class="pagination">
- <a class="pagination-btn prev" href="/search?q={{query}}&p={{prev_page}}">
- &larr;
- </a>
-
- {{if two_prev_page != 0}}
- <a class="pagination-btn prev" href="/search?q={{query}}&p={{two_prev_page}}">
- {{two_prev_page}}
- </a>
- {{endif}}
-
- {{if prev_page != 0}}
- <a class="pagination-btn prev" href="/search?q={{query}}&p={{prev_page}}">
- {{prev_page}}
- </a>
- {{endif}}
-
- <a class="pagination-current" href="/search?q={{query}}&p={{page}}">
- {{page}}
- </a>
- <a class="pagination-btn next" href="/search?q={{query}}&p={{next_page}}">
- {{next_page}}
- </a>
- <a class="pagination-btn next" href="/search?q={{query}}&p={{two_next_page}}">
- {{two_next_page}}
- </a>
-
- {{if prev_page == 0}}
- <a class="pagination-btn prev" href="/search?q={{query}}&p=4">
- 4
- </a>
- {{endif}}
-
- {{if two_prev_page == 0}}
- <a class="pagination-btn prev" href="/search?q={{query}}&p=5">
- 5
- </a>
- {{endif}}
- <a class="pagination-btn next" href="/search?q={{query}}&p={{next_page}}">
- &rarr;
+ {{for link in pagination_links}}
+ <a class="{{link[2]}}" href="{{link[0]}}">
+ {{link[1]}}
</a>
+ {{endfor}}
</nav>
+ {{endif}}
</main>
<aside class="infobox-sidebar">
{{if exists infoboxes}}