Handle no results in all cases
This commit is contained in:
parent
9933a529c3
commit
3678f0117a
2 changed files with 25 additions and 21 deletions
|
@ -83,11 +83,7 @@
|
|||
<main>
|
||||
<mwmbl-results>
|
||||
<ul class='results'>
|
||||
{% if results %}
|
||||
{% include "results.html" %}
|
||||
{% else %}
|
||||
<li is='${home}'></li>
|
||||
{% endif %}
|
||||
{% include "results.html" %}
|
||||
</ul>
|
||||
</mwmbl-results>
|
||||
</main>
|
||||
|
|
|
@ -1,20 +1,28 @@
|
|||
{% load result_filters %}
|
||||
<title>Mwmbl - {{ query }}</title>
|
||||
{% for result in results %}
|
||||
<li class="result" is="mwmbl-result">
|
||||
<div class="result-container">
|
||||
<div class="curation-buttons">
|
||||
<button class="curation-button curate-delete" is="mwmbl-delete-button">✕</button>
|
||||
<button class="curation-button curate-approve" is="mwmbl-validate-button">✓</button>
|
||||
<button class="curation-button curate-add" is="mwmbl-add-button">+</button>
|
||||
{% if results %}
|
||||
{% for result in results %}
|
||||
<li class="result" is="mwmbl-result">
|
||||
<div class="result-container">
|
||||
<div class="curation-buttons">
|
||||
<button class="curation-button curate-delete" is="mwmbl-delete-button">✕</button>
|
||||
<button class="curation-button curate-approve" is="mwmbl-validate-button">✓</button>
|
||||
<button class="curation-button curate-add" is="mwmbl-add-button">+</button>
|
||||
</div>
|
||||
<div class="result-link">
|
||||
<a href="{{result.url}}">
|
||||
<p class='link'>{{result.url}}</p>
|
||||
<p class='title'>{{result.title|strengthen}}</p>
|
||||
<p class='extract'>{{result.extract|strengthen}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-link">
|
||||
<a href="{{result.url}}">
|
||||
<p class='link'>{{result.url}}</p>
|
||||
<p class='title'>{{result.title|strengthen}}</p>
|
||||
<p class='extract'>{{result.extract|strengthen}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li class="home">
|
||||
<h1>
|
||||
Welcome to Mwmbl, the free, open-source and non-profit search engine.
|
||||
</h1>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue