neon_arch
commited on
Commit
·
dd74a90
1
Parent(s):
05c3e6c
✨ feat: provide new messages when results are filtered/dissallowed (#201)
Browse files- public/templates/search.html +62 -30
public/templates/search.html
CHANGED
|
@@ -1,37 +1,69 @@
|
|
| 1 |
{{>header this.style}}
|
| 2 |
<main class="results">
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
</div>
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
<li>Make sure that all words are spelled correctly.</li>
|
| 22 |
-
<li>Try different keywords.</li>
|
| 23 |
-
<li>Try more general keywords.</li>
|
| 24 |
-
</ul>
|
| 25 |
-
<img src="./images/no_results.gif" alt="Man fishing gif" />
|
| 26 |
</div>
|
| 27 |
-
{{/if}}
|
| 28 |
-
</div>
|
| 29 |
-
<div class="page_navigation">
|
| 30 |
-
<button type="button" onclick="navigate_backward()">
|
| 31 |
-
← previous
|
| 32 |
-
</button>
|
| 33 |
-
<button type="button" onclick="navigate_forward()">next →</button>
|
| 34 |
-
</div>
|
| 35 |
</main>
|
| 36 |
<script src="static/index.js"></script>
|
| 37 |
<script src="static/pagination.js"></script>
|
|
|
|
| 1 |
{{>header this.style}}
|
| 2 |
<main class="results">
|
| 3 |
+
{{>search_bar this}}
|
| 4 |
+
<div class="results_aggregated">
|
| 5 |
+
{{#if results}} {{#each results}}
|
| 6 |
+
<div class="result">
|
| 7 |
+
<h1><a href="{{{this.url}}}">{{{this.title}}}</a></h1>
|
| 8 |
+
<small>{{{this.url}}}</small>
|
| 9 |
+
<p>{{{this.description}}}</p>
|
| 10 |
+
<div class="upstream_engines">
|
| 11 |
+
{{#each engine}}
|
| 12 |
+
<span>{{{this}}}</span>
|
| 13 |
+
{{/each}}
|
| 14 |
+
</div>
|
| 15 |
+
</div>
|
| 16 |
+
{{/each}} {{else}} {{#if disallowed}}
|
| 17 |
+
<div class="result_disallowed">
|
| 18 |
+
<div class="description">
|
| 19 |
+
<p>
|
| 20 |
+
Your search - <span class="user_query">{{{this.pageQuery}}}</span> -
|
| 21 |
+
has been disallowed.
|
| 22 |
+
</p>
|
| 23 |
+
<p class="description_paragraph">Dear user,</p>
|
| 24 |
+
<p class="description_paragraph">
|
| 25 |
+
The query - <span class="user_query">{{{this.pageQuery}}}</span> - has
|
| 26 |
+
been blacklisted via server configuration and hence disallowed by the
|
| 27 |
+
server. Henceforth no results could be displayed for your query.
|
| 28 |
+
</p>
|
| 29 |
+
</div>
|
| 30 |
+
<img src="./images/barricade.png" alt="Image of a Barricade" />
|
| 31 |
+
</div>
|
| 32 |
+
{{else}} {{#if filtered}}
|
| 33 |
+
<div class="result_filtered">
|
| 34 |
+
<div class="description">
|
| 35 |
+
<p>
|
| 36 |
+
Your search - <span class="user_query">{{{this.pageQuery}}}</span> -
|
| 37 |
+
has been filtered.
|
| 38 |
+
</p>
|
| 39 |
+
<p class="description_paragraph">Dear user,</p>
|
| 40 |
+
<p class="description_paragraph">
|
| 41 |
+
All the search results contain results that has been configured to be
|
| 42 |
+
filtered out via server configuration and henceforth has been
|
| 43 |
+
completely filtered out.
|
| 44 |
+
</p>
|
| 45 |
+
</div>
|
| 46 |
+
<img src="./images/filter.png" alt="Image of a paper inside a funnel" />
|
| 47 |
+
</div>
|
| 48 |
+
{{else}}
|
| 49 |
+
<div class="result_not_found">
|
| 50 |
+
<p>Your search - {{{this.pageQuery}}} - did not match any documents.</p>
|
| 51 |
+
<p class="suggestions">Suggestions:</p>
|
| 52 |
+
<ul>
|
| 53 |
+
<li>Make sure that all words are spelled correctly.</li>
|
| 54 |
+
<li>Try different keywords.</li>
|
| 55 |
+
<li>Try more general keywords.</li>
|
| 56 |
+
</ul>
|
| 57 |
+
<img src="./images/no_results.gif" alt="Man fishing gif" />
|
| 58 |
+
</div>
|
| 59 |
+
{{/if}} {{/if}} {{/if}}
|
| 60 |
</div>
|
| 61 |
+
<div class="page_navigation">
|
| 62 |
+
<button type="button" onclick="navigate_backward()">
|
| 63 |
+
← previous
|
| 64 |
+
</button>
|
| 65 |
+
<button type="button" onclick="navigate_forward()">next →</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
</main>
|
| 68 |
<script src="static/index.js"></script>
|
| 69 |
<script src="static/pagination.js"></script>
|