diff --git a/searx/results.py b/searx/results.py index caf02213d..471d16981 100644 --- a/searx/results.py +++ b/searx/results.py @@ -232,7 +232,7 @@ class ResultContainer: if engine_name in engines: histogram_observe(standard_result_count, 'engine', engine_name, 'result', 'count') - if not self.paging and standard_result_count > 0 and engine_name in engines and engines[engine_name].paging: + if not self.paging and engine_name in engines and engines[engine_name].paging: self.paging = True def _merge_infobox(self, infobox): diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index 42ad3fa3d..7d97c9e06 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -124,22 +124,24 @@ {% endif %} -
-
- - {% for category in selected_categories %} - - {% endfor %} - - - - - - {% if timeout_limit %}{% endif %} - {{- engine_data_form(engine_data) -}} - -
-
+ {%- if results | count > 0 -%} +
+
+ + {% for category in selected_categories %} + + {% endfor %} + + + + + + {% if timeout_limit %}{% endif %} + {{- engine_data_form(engine_data) -}} + +
+
+ {%- endif -%} {% set pstart = 1 %} {% set pend = 11 %} {% if pageno > 5 %}