summaryrefslogtreecommitdiff
path: root/searx/templates/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates/legacy')
-rw-r--r--searx/templates/legacy/404.html2
-rw-r--r--searx/templates/legacy/base.html4
-rw-r--r--searx/templates/legacy/preferences.html4
-rw-r--r--searx/templates/legacy/result_templates/code.html2
-rw-r--r--searx/templates/legacy/result_templates/default.html2
-rw-r--r--searx/templates/legacy/result_templates/images.html2
-rw-r--r--searx/templates/legacy/result_templates/key-value.html2
-rw-r--r--searx/templates/legacy/result_templates/map.html2
-rw-r--r--searx/templates/legacy/result_templates/torrent.html2
-rw-r--r--searx/templates/legacy/result_templates/videos.html2
-rw-r--r--searx/templates/legacy/results.html8
-rw-r--r--searx/templates/legacy/search.html2
12 files changed, 20 insertions, 14 deletions
diff --git a/searx/templates/legacy/404.html b/searx/templates/legacy/404.html
index 3e889dd21..c0fa62b00 100644
--- a/searx/templates/legacy/404.html
+++ b/searx/templates/legacy/404.html
@@ -3,7 +3,7 @@
<div class="center">
<h1>{{ _('Page not found') }}</h1>
{% autoescape false %}
- <p>{{ _('Go to %(search_page)s.', search_page=unicode('<a href="{}">{}</a>').format(url_for('index'), _('search page'))) }}</p>
+ <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
{% endautoescape %}
</div>
{% endblock %}
diff --git a/searx/templates/legacy/base.html b/searx/templates/legacy/base.html
index da19741cb..152cd77f3 100644
--- a/searx/templates/legacy/base.html
+++ b/searx/templates/legacy/base.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}>
<head>
<meta charset="UTF-8" />
- <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" />
+ <meta name="description" content="searx — a privacy-respecting, hackable metasearch engine" />
<meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
<meta name="generator" content="searx/{{ searx_version }}">
<meta name="referrer" content="no-referrer">
@@ -20,7 +20,7 @@
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
{% endblock %}
</head>
- <body>
+ <body class="{{ endpoint }}_endpoint" >
<div id="container">
{% block content %}
{% endblock %}
diff --git a/searx/templates/legacy/preferences.html b/searx/templates/legacy/preferences.html
index f418dcd5b..414b3f6c0 100644
--- a/searx/templates/legacy/preferences.html
+++ b/searx/templates/legacy/preferences.html
@@ -95,6 +95,7 @@
<table>
<tr>
<th>{{ _('Engine name') }}</th>
+ <th>{{ _('Shortcut') }}</th>
<th>{{ _('Category') }}</th>
<th>{{ _('Allow') }} / {{ _('Block') }}</th>
</tr>
@@ -103,7 +104,8 @@
{% if not search_engine.private %}
<tr>
- <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
+ <td>{{ search_engine.name }}</td>
+ <td>{{ shortcuts[search_engine.name] }}</td>
<td>{{ _(categ) }}</td>
<td class="engine_checkbox">
<input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} />
diff --git a/searx/templates/legacy/result_templates/code.html b/searx/templates/legacy/result_templates/code.html
index fee6c8221..ea89563ef 100644
--- a/searx/templates/legacy/result_templates/code.html
+++ b/searx/templates/legacy/result_templates/code.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }}&lrm; <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a></p>
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
diff --git a/searx/templates/legacy/result_templates/default.html b/searx/templates/legacy/result_templates/default.html
index da091174d..13e2d2913 100644
--- a/searx/templates/legacy/result_templates/default.html
+++ b/searx/templates/legacy/result_templates/default.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }}&lrm; <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a>
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
diff --git a/searx/templates/legacy/result_templates/images.html b/searx/templates/legacy/result_templates/images.html
index 00f62abcc..514cdf8bc 100644
--- a/searx/templates/legacy/result_templates/images.html
+++ b/searx/templates/legacy/result_templates/images.html
@@ -1,4 +1,4 @@
-<div class="image_result">
+<div class="image_result{% for e in result.engines %} {{ e }}{% endfor %}">
<p>
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
diff --git a/searx/templates/legacy/result_templates/key-value.html b/searx/templates/legacy/result_templates/key-value.html
index a5bb509d9..15717a1a8 100644
--- a/searx/templates/legacy/result_templates/key-value.html
+++ b/searx/templates/legacy/result_templates/key-value.html
@@ -1,4 +1,4 @@
-<table class="result-table">
+<table class="result-table{% for e in result.engines %} {{ e }}{% endfor %}">
{% for key, value in result.items() %}
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
{% continue %}
diff --git a/searx/templates/legacy/result_templates/map.html b/searx/templates/legacy/result_templates/map.html
index 0200e0f6b..6937ba459 100644
--- a/searx/templates/legacy/result_templates/map.html
+++ b/searx/templates/legacy/result_templates/map.html
@@ -1,4 +1,4 @@
-<div class="result {{ result.class }}">
+<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
diff --git a/searx/templates/legacy/result_templates/torrent.html b/searx/templates/legacy/result_templates/torrent.html
index 068e05373..f251496bf 100644
--- a/searx/templates/legacy/result_templates/torrent.html
+++ b/searx/templates/legacy/result_templates/torrent.html
@@ -1,4 +1,4 @@
-<div class="result torrent_result">
+<div class="result torrent_result{% for e in result.engines %} {{ e }}{% endfor %}">
{% if "icon_"~result.engine~".ico" in favicons %}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
diff --git a/searx/templates/legacy/result_templates/videos.html b/searx/templates/legacy/result_templates/videos.html
index 727f44c71..50f4d1e98 100644
--- a/searx/templates/legacy/result_templates/videos.html
+++ b/searx/templates/legacy/result_templates/videos.html
@@ -1,4 +1,4 @@
-<div class="result">
+<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
<h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %}
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
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/legacy/search.html b/searx/templates/legacy/search.html
index 4d37f9ba1..fcd08d6d2 100644
--- a/searx/templates/legacy/search.html
+++ b/searx/templates/legacy/search.html
@@ -1,6 +1,6 @@
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
<div id="search_wrapper">
- <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
+ <input type="text" autofocus placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
<input type="submit" value="search" id="search_submit" />
</div>
{% set display_tooltip = true %}