✨ feat: add images, error_box & new message when no results are provided (#185)
This commit is contained in:
parent
9fd8275b17
commit
c4935f202a
8 changed files with 67 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
|||
{{>header this.style}}
|
||||
<main class="results">
|
||||
{{>search_bar}}
|
||||
{{>search_bar this}}
|
||||
<div class="results_aggregated">
|
||||
{{#each results}}
|
||||
{{#if results}} {{#each results}}
|
||||
<div class="result">
|
||||
<h1><a href="{{{this.visitingUrl}}}">{{{this.title}}}</a></h1>
|
||||
<small>{{{this.url}}}</small>
|
||||
|
@ -13,13 +13,27 @@
|
|||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}} {{else}}
|
||||
<div class="result_not_found">
|
||||
<p>Your search - {{{this.pageQuery}}} - did not match any documents.</p>
|
||||
<p class="suggestions">Suggestions:</p>
|
||||
<ul>
|
||||
<li>Make sure that all words are spelled correctly.</li>
|
||||
<li>Try different keywords.</li>
|
||||
<li>Try more general keywords.</li>
|
||||
</ul>
|
||||
<img src="./images/no_results.gif" alt="Man fishing gif" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="page_navigation">
|
||||
<button type="button" onclick="navigate_backward()">← previous</button>
|
||||
<button type="button" onclick="navigate_backward()">
|
||||
← previous
|
||||
</button>
|
||||
<button type="button" onclick="navigate_forward()">next →</button>
|
||||
</div>
|
||||
</main>
|
||||
<script src="static/index.js"></script>
|
||||
<script src="static/pagination.js"></script>
|
||||
<script src="static/error_box.js"></script>
|
||||
{{>footer}}
|
||||
|
|
|
@ -6,4 +6,20 @@
|
|||
placeholder="Type to search"
|
||||
/>
|
||||
<button type="submit" onclick="searchWeb()">search</button>
|
||||
<div class="error_box">
|
||||
<button onclick="toggleErrorBox()" class="error_box_dropdown">
|
||||
<img src="./images/info.svg" alt="Info icon for error box" />
|
||||
</button>
|
||||
{{#each engineErrorsInfo}}
|
||||
<div class="error_item">
|
||||
<span class="engine_name">{{{this.engine}}}</span>
|
||||
<span class="engine_name">{{{this.error}}}</span>
|
||||
<span
|
||||
class="severity_color"
|
||||
style="background: {{{this.severity_color}}}; width: 400px; height: 400px"
|
||||
>lsl</span
|
||||
>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue