summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/legacy/results.html8
-rw-r--r--searx/templates/oscar/results.html8
-rw-r--r--searx/templates/simple/results.html10
3 files changed, 20 insertions, 6 deletions
diff --git a/searx/templates/legacy/results.html b/searx/templates/legacy/results.html
index 2e28bc91f..fd95657a4 100644
--- a/searx/templates/legacy/results.html
+++ b/searx/templates/legacy/results.html
@@ -33,8 +33,12 @@
{% if answers %}
<div id="answers"><span>{{ _('Answers') }}</span>
- {% for answer in answers %}
- <span>{{ answer }}</span>
+ {% for answer in answers.values() %}
+ {% if answer.url %}
+ <a href="{{ answer.url }}">{{ answer.answer }}</a>
+ {% else %}
+ <span>{{ answer.answer }}</span>
+ {% endif %}
{% endfor %}
</div>
{% endif %}
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index fc4efadfa..7a444d19f 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -94,9 +94,13 @@
{%- endif %}
{% if answers -%}
- {%- for answer in answers %}
+ {%- for answer in answers.values() %}
<div class="result well">
- <span>{{ answer }}</span>
+ {% if answer.url %}
+ <a href="{{ answer.url }}">{{ answer.answer }}</a>
+ {% else %}
+ <span>{{ answer.answer }}</span>
+ {% endif %}
</div>
{%- endfor %}
{%- endif %}
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html
index 8885abc30..2e393193f 100644
--- a/searx/templates/simple/results.html
+++ b/searx/templates/simple/results.html
@@ -15,8 +15,14 @@
<div id="results" class="{{ only_template }}">
{% if answers -%}
<div id="answers"><h4 class="title">{{ _('Answers') }} : </h4>
- {%- for answer in answers -%}
- <div class="answer">{{- answer -}}</div>
+ {%- for answer in answers.values() -%}
+ <div class="answer">
+ {% if answer.url %}
+ <a href="{{ answer.url }}">{{ answer.answer }}</a>
+ {% else %}
+ <span>{{ answer.answer }}</span>
+ {% endif %}
+ </div>
{%- endfor -%}
</div>
{%- endif %}