From 3678f0117a78096c02c607fde9d481c774c4b430 Mon Sep 17 00:00:00 2001 From: Daoud Clarke Date: Mon, 6 Nov 2023 18:27:22 +0000 Subject: [PATCH] Handle no results in all cases --- mwmbl/templates/index.html | 6 +----- mwmbl/templates/results.html | 40 +++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/mwmbl/templates/index.html b/mwmbl/templates/index.html index 8c68729..db3c3c5 100644 --- a/mwmbl/templates/index.html +++ b/mwmbl/templates/index.html @@ -83,11 +83,7 @@
    - {% if results %} - {% include "results.html" %} - {% else %} -
  • - {% endif %} + {% include "results.html" %}
diff --git a/mwmbl/templates/results.html b/mwmbl/templates/results.html index 869db07..9150247 100644 --- a/mwmbl/templates/results.html +++ b/mwmbl/templates/results.html @@ -1,20 +1,28 @@ {% load result_filters %} Mwmbl - {{ query }} -{% for result in results %} -
  • -
    -
    - - - +{% if results %} + {% for result in results %} +
  • + - - +
  • + {% endfor %} +{% else %} +
  • +

    + Welcome to Mwmbl, the free, open-source and non-profit search engine. +

  • -{% endfor %} +{% endif %}