0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-21 21:48:21 -05:00

feat: provide new messages when results are filtered/dissallowed (#201)

This commit is contained in:
neon_arch 2023-09-02 17:51:29 +03:00
parent 05c3e6cc12
commit dd74a90e6b

View File

@ -1,37 +1,69 @@
{{>header this.style}} {{>header this.style}}
<main class="results"> <main class="results">
{{>search_bar this}} {{>search_bar this}}
<div class="results_aggregated"> <div class="results_aggregated">
{{#if results}} {{#each results}} {{#if results}} {{#each results}}
<div class="result"> <div class="result">
<h1><a href="{{{this.url}}}">{{{this.title}}}</a></h1> <h1><a href="{{{this.url}}}">{{{this.title}}}</a></h1>
<small>{{{this.url}}}</small> <small>{{{this.url}}}</small>
<p>{{{this.description}}}</p> <p>{{{this.description}}}</p>
<div class="upstream_engines"> <div class="upstream_engines">
{{#each engine}} {{#each engine}}
<span>{{{this}}}</span> <span>{{{this}}}</span>
{{/each}} {{/each}}
</div> </div>
</div>
{{/each}} {{else}} {{#if disallowed}}
<div class="result_disallowed">
<div class="description">
<p>
Your search - <span class="user_query">{{{this.pageQuery}}}</span> -
has been disallowed.
</p>
<p class="description_paragraph">Dear user,</p>
<p class="description_paragraph">
The query - <span class="user_query">{{{this.pageQuery}}}</span> - has
been blacklisted via server configuration and hence disallowed by the
server. Henceforth no results could be displayed for your query.
</p>
</div>
<img src="./images/barricade.png" alt="Image of a Barricade" />
</div>
{{else}} {{#if filtered}}
<div class="result_filtered">
<div class="description">
<p>
Your search - <span class="user_query">{{{this.pageQuery}}}</span> -
has been filtered.
</p>
<p class="description_paragraph">Dear user,</p>
<p class="description_paragraph">
All the search results contain results that has been configured to be
filtered out via server configuration and henceforth has been
completely filtered out.
</p>
</div>
<img src="./images/filter.png" alt="Image of a paper inside a funnel" />
</div>
{{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}} {{/if}} {{/if}}
</div> </div>
{{/each}} {{else}} <div class="page_navigation">
<div class="result_not_found"> <button type="button" onclick="navigate_backward()">
<p>Your search - {{{this.pageQuery}}} - did not match any documents.</p> &#8592; previous
<p class="suggestions">Suggestions:</p> </button>
<ul> <button type="button" onclick="navigate_forward()">next &#8594;</button>
<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> </div>
{{/if}}
</div>
<div class="page_navigation">
<button type="button" onclick="navigate_backward()">
&#8592; previous
</button>
<button type="button" onclick="navigate_forward()">next &#8594;</button>
</div>
</main> </main>
<script src="static/index.js"></script> <script src="static/index.js"></script>
<script src="static/pagination.js"></script> <script src="static/pagination.js"></script>