summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorJohannes Schauer <josch@debian.org>2017-11-24 10:58:25 +0100
committerJohannes Schauer <josch@debian.org>2017-11-24 10:58:25 +0100
commitf1527a94a793e8adc98e980e57284cba895e8944 (patch)
tree327b94dda486fd5ecaeb79d84cfb81549c1175d8 /searx/templates
parent73ebd8743faa9b30a6a8f3f39261978c5be99479 (diff)
parent6479b263d1fd25f5db5228e0360966b285dfa8b3 (diff)
Update upstream source from tag '0.13.1+dfsg1'
Update to upstream version '0.13.1+dfsg1' with Debian dir 980739b2c7be7ef39720df072e76ef29317a41b7
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/courgette/result_templates/code.html22
-rw-r--r--searx/templates/legacy/result_templates/code.html22
-rw-r--r--searx/templates/oscar/macros.html187
-rw-r--r--searx/templates/oscar/messages/no_results.html16
-rw-r--r--searx/templates/oscar/preferences.html48
-rw-r--r--searx/templates/oscar/results.html10
-rw-r--r--searx/templates/simple/404.html9
-rw-r--r--searx/templates/simple/about.html4
-rw-r--r--searx/templates/simple/base.html61
-rw-r--r--searx/templates/simple/categories.html8
-rw-r--r--searx/templates/simple/index.html12
-rw-r--r--searx/templates/simple/infobox.html46
-rw-r--r--searx/templates/simple/languages.html8
-rw-r--r--searx/templates/simple/macros.html85
-rw-r--r--searx/templates/simple/messages/no_results.html17
-rw-r--r--searx/templates/simple/preferences.html190
-rw-r--r--searx/templates/simple/result_templates/code.html13
-rw-r--r--searx/templates/simple/result_templates/default.html17
-rw-r--r--searx/templates/simple/result_templates/images.html4
-rw-r--r--searx/templates/simple/result_templates/map.html71
-rw-r--r--searx/templates/simple/result_templates/torrent.html24
-rw-r--r--searx/templates/simple/result_templates/videos.html15
-rw-r--r--searx/templates/simple/results.html151
-rw-r--r--searx/templates/simple/search.html16
-rw-r--r--searx/templates/simple/simple.spec.txt40
-rw-r--r--searx/templates/simple/stats.html25
-rw-r--r--searx/templates/simple/time-range.html17
27 files changed, 1009 insertions, 129 deletions
diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html
index 953617e..d6dbd5e 100644
--- a/searx/templates/courgette/result_templates/code.html
+++ b/searx/templates/courgette/result_templates/code.html
@@ -1,11 +1,11 @@
-<div class="result {{ result.class }}">
- <h3 class="result_title">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% 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>{% endif %}
- <p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
- {% if result.repository %}<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
- <div dir="ltr">
- {{ result.codelines|code_highlighter(result.code_language)|safe }}
- </div>
-
- <p class="url">{{ result.pretty_url }}&lrm;</p>
-</div>
+<div class="result {{ result.class }}">
+ <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>
+ {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
+ <p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
+ {% if result.repository %}<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
+ <div dir="ltr">
+ {{ result.codelines|code_highlighter(result.code_language)|safe }}
+ </div>
+
+ <p class="url">{{ result.pretty_url }}&lrm;</p>
+</div>
diff --git a/searx/templates/legacy/result_templates/code.html b/searx/templates/legacy/result_templates/code.html
index 9e3ed20..fee6c82 100644
--- a/searx/templates/legacy/result_templates/code.html
+++ b/searx/templates/legacy/result_templates/code.html
@@ -1,11 +1,11 @@
-<div class="result {{ result.class }}">
- <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% 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></p>
- {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
- <p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
- {% if result.repository %}<p class="result-content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
-
- <div dir="ltr">
- {{ result.codelines|code_highlighter(result.code_language)|safe }}
- </div>
-</div>
+<div class="result {{ result.class }}">
+ <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 %}
+ <p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
+ {% if result.repository %}<p class="result-content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
+
+ <div dir="ltr">
+ {{ result.codelines|code_highlighter(result.code_language)|safe }}
+ </div>
+</div>
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html
index e71091e..0ff9575 100644
--- a/searx/templates/oscar/macros.html
+++ b/searx/templates/oscar/macros.html
@@ -1,88 +1,99 @@
-<!-- Draw glyphicon icon from bootstrap-theme -->
-{% macro icon(action) -%}
- <span class="glyphicon glyphicon-{{ action }}"></span>
-{%- endmacro %}
-
-<!-- Draw favicon -->
-<!-- TODO: using url_for methode -->
-{% macro draw_favicon(favicon) -%}
- <img width="32" height="32" class="favicon" src="static/themes/oscar/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
-{%- endmacro %}
-
-{%- macro result_link(url, title, classes='') -%}
-<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a>
-{%- endmacro -%}
-
-<!-- Draw result header -->
-{% macro result_header(result, favicons) -%}
-<h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result_link(result.url, result.title|safe) }}</h4>
-{%- endmacro %}
-
-<!-- Draw result sub header -->
-{% macro result_sub_header(result) -%}
- {% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
- {% if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %}
- {% if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %}
-{%- endmacro %}
-
-<!-- Draw result footer -->
-{% macro result_footer(result) -%}
- <div class="clearfix"></div>
- <div class="pull-right">
- {% for engine in result.engines %}
- <span class="label label-default">{{ engine }}</span>
- {% endfor %}
- <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
- {% if proxify %}
- <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
- {% endif %}
-</div>
-<div class="external-link">{{ result.pretty_url }}</div>
-{%- endmacro %}
-
-<!-- Draw result footer -->
-{% macro result_footer_rtl(result) -%}
- <div class="clearfix"></div>
- {% for engine in result.engines %}
- <span class="label label-default">{{ engine }}</span>
- {% endfor %}
- <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
- {% if proxify %}
- <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
- {% endif %}
- <div class="external-link">{{ result.pretty_url }}</div>
-{%- endmacro %}
-
-{% macro preferences_item_header(info, label, rtl) -%}
- {% if rtl %}
- <div class="row form-group">
- <label class="col-sm-3 col-md-2 pull-right">{{ label }}</label>
- <span class="col-sm-5 col-md-6 help-block pull-left">{{ info }}</span>
- <div class="col-sm-4 col-md-4">
- {% else %}
- <div class="row form-group">
- <label class="col-sm-3 col-md-2">{{ label }}</label>
- <div class="col-sm-4 col-md-4">
- {% endif %}
-{%- endmacro %}
-
-{% macro preferences_item_footer(info, label, rtl) -%}
- {% if rtl %}
- </div>
- </div>
- {% else %}
- </div>
- <span class="col-sm-5 col-md-6 help-block">{{ info }}</span>
- </div>
- {% endif %}
-{%- endmacro %}
-
-{% macro checkbox_toggle(id, blocked) -%}
- <div class="onoffswitch">
- <input type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} class="onoffswitch-checkbox">
- <label class="onoffswitch-label" for="{{ id }}">
- <span class="onoffswitch-inner"></span>
- <span class="onoffswitch-switch"></span>
- </label>
- </div>
-{%- endmacro %}
+<!-- Draw glyphicon icon from bootstrap-theme -->
+{% macro icon(action) -%}
+ <span class="glyphicon glyphicon-{{ action }}"></span>
+{%- endmacro %}
+
+<!-- Draw favicon -->
+{% macro draw_favicon(favicon) -%}
+ <img width="32" height="32" class="favicon" src="{{ url_for('static', filename='themes/oscar/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
+{%- endmacro %}
+
+{%- macro result_link(url, title, classes='') -%}
+<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a>
+{%- endmacro -%}
+
+<!-- Draw result header -->
+{% macro result_header(result, favicons) -%}
+<h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result_link(result.url, result.title|safe) }}</h4>
+{%- endmacro %}
+
+<!-- Draw result sub header -->
+{% macro result_sub_header(result) -%}
+ {% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
+ {% if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %}
+ {% if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %}
+{%- endmacro %}
+
+<!-- Draw result footer -->
+{% macro result_footer(result) -%}
+ <div class="clearfix"></div>
+ <div class="pull-right">
+ {% for engine in result.engines %}
+ <span class="label label-default">{{ engine }}</span>
+ {% endfor %}
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
+ {% if proxify %}
+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
+ {% endif %}
+</div>
+<div class="external-link">{{ result.pretty_url }}</div>
+{%- endmacro %}
+
+<!-- Draw result footer -->
+{% macro result_footer_rtl(result) -%}
+ <div class="clearfix"></div>
+ {% for engine in result.engines %}
+ <span class="label label-default">{{ engine }}</span>
+ {% endfor %}
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
+ {% if proxify %}
+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
+ {% endif %}
+ <div class="external-link">{{ result.pretty_url }}</div>
+{%- endmacro %}
+
+{% macro preferences_item_header(info, label, rtl) -%}
+ {% if rtl %}
+ <div class="row form-group">
+ <label class="col-sm-3 col-md-2 pull-right">{{ label }}</label>
+ <span class="col-sm-5 col-md-6 help-block pull-left">{{ info }}</span>
+ <div class="col-sm-4 col-md-4">
+ {% else %}
+ <div class="row form-group">
+ <label class="col-sm-3 col-md-2">{{ label }}</label>
+ <div class="col-sm-4 col-md-4">
+ {% endif %}
+{%- endmacro %}
+
+{% macro preferences_item_footer(info, label, rtl) -%}
+ {% if rtl %}
+ </div>
+ </div>
+ {% else %}
+ </div>
+ <span class="col-sm-5 col-md-6 help-block">{{ info }}</span>
+ </div>
+ {% endif %}
+{%- endmacro %}
+
+{% macro checkbox_toggle(id, blocked) -%}
+ <div class="onoffswitch">
+ <input type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} class="onoffswitch-checkbox">
+ <label class="onoffswitch-label" for="{{ id }}">
+ <span class="onoffswitch-inner"></span>
+ <span class="onoffswitch-switch"></span>
+ </label>
+ </div>
+{%- endmacro %}
+
+{% macro support_toggle(supports) -%}
+ {% if supports %}
+ <span class="label label-success">
+ {{ _("supported") }}
+ </span>
+ {% else %}
+ <span class="label label-danger">
+ {{ _("not supported") }}
+ </span>
+ {% endif %}
+{%- endmacro %}
diff --git a/searx/templates/oscar/messages/no_results.html b/searx/templates/oscar/messages/no_results.html
index ac3705e..16b5984 100644
--- a/searx/templates/oscar/messages/no_results.html
+++ b/searx/templates/oscar/messages/no_results.html
@@ -1,9 +1,17 @@
{% from 'oscar/macros.html' import icon %}
+{% if unresponsive_engines %}
+<div class="alert alert-danger fade in" role="alert">
+ <p><strong class="lead">{{ icon('remove-sign') }} {{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
+ <p>
+ {% for engine_name, error_type in unresponsive_engines %}
+ {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
+ {% endfor %}
+ </p>
+ <p><small>{{ _('Please, try again later or find another searx instance.') }}</small></p>
+</div>
+{% else %}
<div class="alert alert-info fade in" role="alert">
- <button class="close" data-dismiss="alert" type="button">
- <span aria-hidden="true">×</span>
- <span class="sr-only">{{ _('Close') }}</span>
- </button>
<strong class="lead">{{ icon('info-sign') }} {{ _('Sorry!') }}</strong>
{{ _('we didn\'t find any results. Please use another query or search in more categories.') }}
</div>
+{% endif %}
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index e5477e7..5f85a9a 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -1,7 +1,8 @@
-{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle %}
+{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle, support_toggle %}
{% extends "oscar/base.html" %}
{% block title %}{{ _('preferences') }} - {% endblock %}
{% block content %}
+
<div>
<h1>{{ _('Preferences') }}</h1>
@@ -117,6 +118,18 @@
<option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
</select>
{{ preferences_item_footer(info, label, rtl) }}
+
+ {% set label = _('Open Access DOI resolver') %}
+ {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
+ {{ preferences_item_header(info, label, rtl) }}
+ <select class="form-control" id='doi_resolver' name='doi_resolver'>
+ {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
+ <option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}>
+ {{ doi_resolver_name }} - {{ doi_resolver_url }}
+ </option>
+ {% endfor %}
+ </select>
+ {{ preferences_item_footer(info, label, rtl) }}
</div>
</fieldset>
</div>
@@ -148,7 +161,7 @@
<th>{{ _("Allow") }}</th>
<th>{{ _("Engine name") }}</th>
<th>{{ _("Shortcut") }}</th>
- <th>{{ _("Supports selected language") }}</th>
+ <th>{{ _("Selected language") }}</th>
<th>{{ _("SafeSearch") }}</th>
<th>{{ _("Time range") }}</th>
<th>{{ _("Avg. time") }}</th>
@@ -156,8 +169,9 @@
{% else %}
<th>{{ _("Max time") }}</th>
<th>{{ _("Avg. time") }}</th>
+ <th>{{ _("Time range") }}</th>
<th>{{ _("SafeSearch") }}</th>
- <th>{{ _("Supports selected language") }}</th>
+ <th>{{ _("Selected language") }}</th>
<th>{{ _("Shortcut") }}</th>
<th>{{ _("Engine name") }}</th>
<th>{{ _("Allow") }}</th>
@@ -171,18 +185,19 @@
{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
</td>
<th>{{ search_engine.name }}</th>
- <td>{{ shortcuts[search_engine.name] }}</td>
- <td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td>
- <td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
- <td><input type="checkbox" {{ "checked" if search_engine.time_range_support==True else ""}} readonly="readonly" disabled="disabled"></td>
- <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
- <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
- {% else %}
- <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
- <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
- <td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
- <td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td>
- <td>{{ shortcuts[search_engine.name] }}</td>
+ <td class="name">{{ shortcuts[search_engine.name] }}</td>
+ <td>{{ support_toggle(current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages) }}</td>
+ <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
+ <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
+ {% else %}
+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
+ <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
+ <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
+ <td>{{ support_toggle(current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages) }}</td>
+ <td>{{ shortcuts[search_engine.name] }}</td>
<th>{{ search_engine.name }}</th>
<td class="onoff-checkbox">
{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
@@ -283,6 +298,9 @@
<br />
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
</p>
+ <p style="margin:20px 0;">{{ _('Search URL of the currently saved preferences') }} <small class="text-muted">({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})</small>:<br/>
+ <input readonly="" class="form-control select-all-on-click cursor-text" type="url" value="{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&amp;q=%s{% endraw %}">
+ </p>
<input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 060b2a1..ee1052d 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -94,6 +94,16 @@
{% if number_of_results != '0' %}
<p><small>{{ _('Number of results') }}: {{ number_of_results }}</small></p>
{% endif %}
+
+ {% if unresponsive_engines and results|length >= 1 %}
+ <div class="alert alert-danger fade in" role="alert">
+ <p>{{ _('Engines cannot retrieve results') }}:</p>
+ {% for engine_name, error_type in unresponsive_engines %}
+ {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
+ {% endfor %}
+ </div>
+ {% endif %}
+
{% if infoboxes %}
{% for infobox in infoboxes %}
{% include 'oscar/infobox.html' %}
diff --git a/searx/templates/simple/404.html b/searx/templates/simple/404.html
new file mode 100644
index 0000000..1843c98
--- /dev/null
+++ b/searx/templates/simple/404.html
@@ -0,0 +1,9 @@
+{% extends "simple/base.html" %}
+{% block content %}
+<div class="center">
+ <h1>{{ _('Page not found') }}</h1>
+ {% autoescape false %}
+ <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p>
+ {% endautoescape %}
+</div>
+{% endblock %}
diff --git a/searx/templates/simple/about.html b/searx/templates/simple/about.html
new file mode 100644
index 0000000..1913879
--- /dev/null
+++ b/searx/templates/simple/about.html
@@ -0,0 +1,4 @@
+{% extends 'simple/base.html' %}
+{% block content %}
+{% include '__common__/about.html' %}
+{% endblock %}
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html
new file mode 100644
index 0000000..0003f11
--- /dev/null
+++ b/searx/templates/simple/base.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html class="no-js" 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="keywords" content="searx, search, search engine, metasearch, meta search">
+ <meta name="generator" content="searx/{{ searx_version }}">
+ <meta name="referrer" content="no-referrer">
+ <meta name="robots" content="noarchive">
+ <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1">
+ <meta name="HandheldFriendly" content="True">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
+ <title>{% block title %}{% endblock %}searx</title>
+ {% if rtl %}
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/searx-rtl.min.css') }}" type="text/css" media="screen" />
+ {% else %}
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/searx.min.css') }}" type="text/css" media="screen" />
+ {% endif %}
+ {% block styles %}{% endblock %}
+ {% block meta %}{% endblock %}
+ {% block head %}
+ <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
+ {% endblock %}
+ <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
+ <script type="text/javascript">
+ var searx = {
+ autocompleter: {% if autocomplete %}true{% else %}false{% endif %},
+ method: "{{ method or 'POST' }}",
+ touch: (("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch) || false,
+ staticPath: "{{ url_for('static', filename='themes/simple') }}/",
+ noItemFound: "{{ _('No item found') }}",
+ search_on_category_select: {{ 'true' if 'plugins/js/search_on_category_select.js' in scripts else 'false'}},
+ infinite_scroll: {{ 'true' if 'plugins/js/infinite_scroll.js' in scripts else 'false' }}
+ };
+ document.getElementsByTagName("html")[0].className = (searx.touch)?"js touch":"js";
+ </script>
+</head>
+<body>
+ <main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}">
+ {% if errors %}
+ <div class="dialog-error" role="alert">
+ <a href="#" class="close" aria-label="close" title="close">×</a>
+ <ul>
+ {% for message in errors %}
+ <li>{{ message }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% block content %}
+ {% endblock %}
+ </main>
+ <footer>
+ <p>{{ _('Powered by') }} <a href="{{ url_for('about') }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}</p>
+ </footer>
+ <!--[if gte IE 9]>-->
+ <script src="{{ url_for('static', filename='js/searx.min.js') }}" ></script>
+ <!--<![endif]-->
+</body>
+</html>
diff --git a/searx/templates/simple/categories.html b/searx/templates/simple/categories.html
new file mode 100644
index 0000000..127d55b
--- /dev/null
+++ b/searx/templates/simple/categories.html
@@ -0,0 +1,8 @@
+<div id="categories">{{- '' -}}
+ <div id="categories_container">
+ {%- for category in categories -%}
+ <div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label></div>
+ {%- endfor -%}
+ {%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
+ </div>{{- '' -}}
+</div>
diff --git a/searx/templates/simple/index.html b/searx/templates/simple/index.html
new file mode 100644
index 0000000..4e8e76c
--- /dev/null
+++ b/searx/templates/simple/index.html
@@ -0,0 +1,12 @@
+{% extends "simple/base.html" %}
+{% from 'simple/macros.html' import icon %}
+{% block meta %}
+ <link rel="preload" href="{{ url_for('static', filename='img/searx.png') }}" as="image" />
+{% endblock %}
+{% block content %}
+<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
+<div class="index">
+ <div class="title"><h1>searx</h1></div>
+ {% include 'simple/search.html' %}
+</div>
+{% endblock %}
diff --git a/searx/templates/simple/infobox.html b/searx/templates/simple/infobox.html
new file mode 100644
index 0000000..d99806a
--- /dev/null
+++ b/searx/templates/simple/infobox.html
@@ -0,0 +1,46 @@
+<aside class="infobox">
+ <h2><bdi>{{ infobox.infobox }}</bdi></h2>
+ {% if infobox.img_src %}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
+ <p><bdi>{{ infobox.entity }}</bdi></p>
+ <p><bdi>{{ infobox.content | safe }}</bdi></p>
+ {% if infobox.attributes %}
+ <div class="attributes">
+ {% for attribute in infobox.attributes %}
+ <dl>
+ <dt><bdi>{{ attribute.label }} :</bdi></dt>
+ {%- if attribute.image -%}
+ <dd><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></dd>
+ {%- else -%}
+ <dd><bdi>{{ attribute.value }}</bdi></dd>
+ {%- endif -%}
+ </dl>
+ {% endfor %}
+ </div>
+ {% endif %}
+
+ {% if infobox.urls %}
+ <div class="urls">
+ <ul>
+ {%- for url in infobox.urls -%}
+ <li class="url"><bdi><a href="{{ url.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ url.title }}</a></bdi></li>
+ {%- endfor -%}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% if infobox.relatedTopics %}
+ <div class="relatedTopics">
+ {% for topic in infobox.relatedTopics %}
+ <div>
+ <h3><bdi>{{ topic.name }}</bdi></h3>
+ {% for suggestion in topic.suggestions %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <input type="hidden" name="q" value="{{ suggestion }}">
+ <input type="submit" value="{{ suggestion }}" />
+ </form>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </div>
+ {% endif %}
+</aside>
diff --git a/searx/templates/simple/languages.html b/searx/templates/simple/languages.html
new file mode 100644
index 0000000..dd928ff
--- /dev/null
+++ b/searx/templates/simple/languages.html
@@ -0,0 +1,8 @@
+<select class="language" id="language" name="language" tabindex="2">{{- '' -}}
+ <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
+ {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
+ <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
+ {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id -}}
+ </option>
+ {%- endfor -%}
+</select>
diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html
new file mode 100644
index 0000000..f0b3627
--- /dev/null
+++ b/searx/templates/simple/macros.html
@@ -0,0 +1,85 @@
+<!-- Draw glyphicon icon from bootstrap-theme -->
+{% macro icon(action) -%}
+ <span class="ion-icon-big ion-{{ action }}"></span>
+{%- endmacro %}
+
+{% macro icon_small(action) -%}
+ <span class="ion-icon ion-{{ action }}"></span>
+{%- endmacro %}
+
+<!-- Draw favicon -->
+{% macro draw_favicon(favicon) -%}
+ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
+{%- endmacro %}
+
+{% macro result_open_link(url, classes='') -%}
+ <a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>
+{%- endmacro %}
+
+{%- macro result_close_link() -%}
+ </a>
+{%- endmacro %}
+
+{%- macro result_link(url, title, classes='') -%}
+ {{ result_open_link(url, classes) }}{{ title }}{{ result_close_link() }}
+{%- endmacro -%}
+
+<!-- Draw result header -->
+{% macro result_header(result, favicons, image_proxify) -%}
+<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}">
+ {%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%}
+ {%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%}
+ <h3>{{ result_link(result.url, result.title|safe) }}</h3>
+{%- endmacro -%}
+
+<!-- Draw result sub header -->
+{%- macro result_sub_header(result) -%}
+ {% if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
+{%- endmacro -%}
+
+<!-- Draw result sub footer -->
+{%- macro result_sub_footer(result, proxify) -%}
+<div class="engines">{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}</div>{{- '' -}}
+<p class="url"><span class="url">{{ result.pretty_url }}</span>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "cache_link") }}&lrm; {% if proxify %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}</p>{{- '' -}}
+<div class="break"></div>{{- '' -}}
+{%- endmacro -%}
+
+<!-- Draw result footer -->
+{%- macro result_footer(result) -%}
+</article>
+{%- endmacro -%}
+
+<!-- -->
+{%- macro tabs_open() -%}
+<div class="tabs" role="tablist">
+{%- endmacro -%}
+
+{%- macro tab_header(name, id, label) -%}
+<input type="radio" name="{{ name }}" id="tab_{{ id }}"/>
+<label for="tab_{{ id }}" role="tab"
+ aria-controls="panel{{ id }}">{{ label }}</label>
+<section id="tab-content{{ id }}" role="tabpanel"
+ aria-labelledby="{{ label }}" aria-hidden="false">
+{%- endmacro -%}
+
+{%- macro tab_footer() -%}
+</section>
+{%- endmacro -%}
+
+{%- macro tabs_close() -%}
+</div>
+{%- endmacro -%}
+
+{%- macro checkbox_onoff(name, checked) -%}
+<div class="checkbox-onoff">{{- '' -}}
+ <input type="checkbox" value="None" id="{{ name }}" name="{{ name }}" {% if checked %}checked{% endif %}/>{{- '' -}}
+ <label for="{{ name }}"></label>{{- '' -}}
+</div>
+{%- endmacro -%}
+
+{%- macro checkbox(name, checked, readonly, disabled) -%}
+<div class="checkbox">{{- '' -}}
+ <input type="checkbox" value="None" id="{{ name }}" name="{{ name }}" {% if checked %}checked{% endif %}{% if readonly %} readonly="readonly" {% endif %}{% if disabled %} disabled="disabled" {% endif %}/>{{- '' -}}
+ <label for="{{ name }}"></label>{{- '' -}}
+</div>
+{%- endmacro -%}
diff --git a/searx/templates/simple/messages/no_results.html b/searx/templates/simple/messages/no_results.html
new file mode 100644
index 0000000..fa984b0
--- /dev/null
+++ b/searx/templates/simple/messages/no_results.html
@@ -0,0 +1,17 @@
+{% from 'simple/macros.html' import icon %}
+{% if unresponsive_engines %}
+<div class="dialog-error" role="alert">
+ <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
+ <p>
+ {% for engine_name, error_type in unresponsive_engines %}
+ {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
+ {% endfor %}
+ </p>
+ <p><small>{{ _('Please, try again later or find another searx instance.') }}</small></p>
+</div>
+{% else %}
+<div class="dialog-error" role="alert">
+ <p><strong>{{ _('Sorry!') }}</strong></p>
+ <p>{{ _('we didn\'t find any results. Please use another query or search in more categories.') }}</p>
+</div>
+{% endif %}
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
new file mode 100644
index 0000000..4529fea
--- /dev/null
+++ b/searx/templates/simple/preferences.html
@@ -0,0 +1,190 @@
+{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
+
+{% extends "simple/base.html" %}
+
+{%- macro plugin_preferences(section) -%}
+{%- for plugin in plugins -%}
+{%- if plugin.preference_section == section -%}
+<fieldset>{{- '' -}}
+ <legend>{{ _(plugin.name) }}</legend>{{- '' -}}
+ <div class="value">
+ {{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
+ </div>{{- '' -}}
+ <div class="description">
+ {{- _(plugin.description) -}}
+ </div>{{- '' -}}
+</fieldset>
+{%- endif -%}
+{%- endfor -%}
+{%- endmacro -%}
+
+{% block head %} {% endblock %}
+{% block content %}
+
+<a href="{{ url_for('index') }}"><h1><span>searx</span></h1></a>
+
+<h2>{{ _('Preferences') }}</h2>
+
+<form id="search_form" method="post" action="{{ url_for('preferences') }}">
+
+{{ tabs_open() }}
+
+{{ tab_header('maintab', 'general', _('General')) }}
+ <fieldset>
+ <legend>{{ _('Default categories') }}</legend>
+ {% set display_tooltip = false %}
+ {% include 'simple/categories.html' %}
+ </fieldset>
+ <fieldset>
+ <legend>{{ _('Search language') }}</legend>
+ <p class="value">{{- '' -}}
+ <select name='language'>{{- '' -}}
+ <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
+ {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
+ <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id }}</option>
+ {%- endfor -%}
+ </select>{{- '' -}}
+ </p>
+ <div class="description">{{ _('What language do you prefer for search?') }}</div>
+ </fieldset>
+ <fieldset>
+ <legend>{{ _('Autocomplete') }}</legend>
+ <p class="value">
+ <select name="autocomplete">
+ <option value=""> - </option>
+ {% for backend in autocomplete_backends %}
+ <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
+ {% endfor %}
+ </select>
+ </p>
+ <div class="description">{{ _('Find stuff as you type') }}</div>
+ </fieldset>
+ <fieldset>
+ <legend>{{ _('SafeSearch') }}</legend>
+ <p class="value">
+ <select name='safesearch'>
+ <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
+ <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
+ <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
+ </select>
+ </p>
+ <div class="description">{{ _('Filter content') }}</p>
+ </fieldset>
+ {{ plugin_preferences('general') }}
+ {{ tab_footer() }}
+
+ {{ tab_header('maintab', 'engines', _('Engines')) }}
+ <p>{{ _('Currently used search engines') }}</p>
+
+ {{ tabs_open() }}
+ {% for categ in all_categories %}
+
+ {{ tab_header('enginetab', 'category' + categ, _(categ)) }}
+ <div class="scrollx">
+ <table class="striped">
+ <tr>
+ <th class="engine_checkbox">{{ _("Allow") }}</th>
+ <th class="name">{{ _("Engine name") }}</th>
+ <th class="shortcut">{{ _("Shortcut") }}</th>
+ <th>{{ _("Supports selected language") }}</th>
+ <th>{{ _("SafeSearch") }}</th>
+ <th>{{ _("Time range") }}</th>
+ <th>{{ _("Avg. time") }}</th>
+ <th>{{ _("Max time") }}</th>
+ </tr>
+ {% for search_engine in engines_by_category[categ] %}
+
+ {% if not search_engine.private %}
+ {% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %}
+ <tr>
+ <td class="engine_checkbox">{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}</td>
+ <th class="name">{{ search_engine.name }}</th>
+ <td class="shortcut">{{ shortcuts[search_engine.name] }}</td>
+ <td>{{ checkbox(engine_id + '_supported_languages', current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages, true, true) }}</td>
+ <td>{{ checkbox(engine_id + '_safesearch', search_engine.safesearch==True, true, true) }}</td>
+ <td>{{ checkbox(engine_id + '_time_range_support', search_engine.time_range_support==True, true, true) }}</td>
+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
+ </tr>
+ {% endif %}
+ {% endfor %}
+ </table>
+ <div>
+ {{ tab_footer() }}
+ {% endfor %}
+ {{ tabs_close() }}
+ {{ tab_footer() }}
+
+ {{ tab_header('maintab', 'ui', _('User interface')) }}
+ <fieldset>
+ <legend>{{ _('Interface language') }}</legend>
+ <p class="value">
+ <select name='locale'>
+ {% for locale_id,locale_name in locales.items() | sort %}
+ <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
+ {% endfor %}
+ </select>
+ </p>
+ <div class="description">{{ _('Change the language of the layout') }}</div>
+ </fieldset>
+ <fieldset>
+ <legend>{{ _('Themes') }}</legend>
+ <p class="value">
+ <select name="theme">
+ {%- for name in themes -%}
+ <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
+ {%- endfor -%}
+ </select>
+ </p>
+ <div class="description">{{ _('Change searx layout') }}</div>
+ </fieldset>
+ <fieldset>
+ <legend>{{ _('Results on new tabs') }}</legend>
+ <p class="value">
+ <select name='results_on_new_tab'>
+ <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
+ <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
+ </select>
+ </p>
+ <div class="description">{{_('Open result links on new browser tabs') }}</div>
+ </fieldset>
+ {{ plugin_preferences('ui') }}
+ {{ tab_footer() }}
+
+ {{ tab_header('maintab', 'privacy', _('Privacy')) }}
+ <fieldset>
+ <legend>{{ _('Method') }}</legend>
+ <p class="value">
+ <select name='method'>
+ <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
+ <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
+ </select>
+ </p>
+ <div class="description">{{ _('Search language') }}</div>
+ </fieldset>
+ <fieldset>
+ <legend>{{ _('Image proxy') }}</legend>
+ <p class="value">
+ <select name='image_proxy'>
+ <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
+ <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
+ </select>
+ </p>
+ <div class="description">{{ _('Proxying image results through searx') }}</div>
+ </fieldset>
+ {{ plugin_preferences('privacy') }}
+ {{ tab_footer() }}
+
+ {{ tabs_close() }}
+
+ <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
+ <br />
+ {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
+ </p>
+
+ <input type="submit" value="{{ _('save') }}" />
+ <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div>
+ <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
+
+</form>
+{% endblock %}
diff --git a/searx/templates/simple/result_templates/code.html b/searx/templates/simple/result_templates/code.html
new file mode 100644
index 0000000..9db0531
--- /dev/null
+++ b/searx/templates/simple/result_templates/code.html
@@ -0,0 +1,13 @@
+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %}
+
+{{ result_header(result, favicons, image_proxify) -}}
+{{- result_sub_header(result) -}}
+{%- if result.content %}{{ result.content|safe }}{% endif %}</p>
+{%- if result.repository -%}
+<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>
+{%- endif -%}
+<div dir="ltr" class="codelines">
+ {{- result.codelines|code_highlighter(result.code_language)|safe -}}
+</div>{{- '' -}}
+{{- result_sub_footer(result, proxify) -}}
+{{ result_footer(result) }}
diff --git a/searx/templates/simple/result_templates/default.html b/searx/templates/simple/result_templates/default.html
new file mode 100644
index 0000000..b29ca55
--- /dev/null
+++ b/searx/templates/simple/result_templates/default.html
@@ -0,0 +1,17 @@
+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %}
+
+{{ result_header(result, favicons, image_proxify) -}}
+{{- result_sub_header(result) -}}
+{% if result.embedded -%}
+<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music-note') }} {{ _('show media') }}</a></p>
+{%- endif %}
+<p class="content">
+ {%- if result.content %}{{ result.content|safe }}{% endif -%}
+</p>
+{{- result_sub_footer(result, proxify) -}}
+{% if result.embedded -%}
+<div id="result-media-{{ index }}" class="invisible">
+ {{- result.embedded|safe -}}
+</div>
+{%- endif %}
+{{- result_footer(result) }}
diff --git a/searx/templates/simple/result_templates/images.html b/searx/templates/simple/result_templates/images.html
new file mode 100644
index 0000000..f756acb
--- /dev/null
+++ b/searx/templates/simple/result_templates/images.html
@@ -0,0 +1,4 @@
+<article class="result result-images {% if result['category'] %}category-{{ result['category'] }}{% endif %}">
+ <a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="image_thumbnail" 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">{{ result.parsed_url[0] }}://{{ result.parsed_url[1] }}</a></span>
+</article>
diff --git a/searx/templates/simple/result_templates/map.html b/searx/templates/simple/result_templates/map.html
new file mode 100644
index 0000000..1fe0c86
--- /dev/null
+++ b/searx/templates/simple/result_templates/map.html
@@ -0,0 +1,71 @@
+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, icon %}
+
+{{ result_header(result, favicons, image_proxify) -}}
+{{- result_sub_header(result) -}}
+
+{%- if (result.latitude and result.longitude) or result.boundingbox -%}
+ <small> &bull; <a class="btn-collapse collapsed searx_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon( 'globe') }} {{ _('show map') }}</a></small>
+{%- endif -%}
+
+{%- if result.osm and (result.osm.type and result.osm.id) -%}
+ <small> &bull; <a class="btn-collapse collapsed hide_if_nojs searx_overpass_request" data-target="#result-overpass-{{ index }}" data-btn-text-collapsed="{{ _('show details') }}" data-btn-text-not-collapsed="{{ _('hide details') }}" data-osm-type="{{ result.osm.type }}" data-osm-id="{{ result.osm.id }}" data-result-table="result-overpass-table-{{ index }}" data-result-table-loadicon="result-overpass-table-loading-{{ index }}">{{ icon('location') }} {{ _('show details') }}</a></small>
+{%- endif -%}
+{#-
+{% if (result.latitude and result.longitude) %}
+ <small> &bull; <a class="btn-collapse disabled_if_nojs" data-target="#result-geodata-{{ index }}" data-btn-text-collapsed="{{ _('show geodata') }}" data-btn-text-not-collapsed="{{ _('hide geodata') }}">{{ icon('location') }} {{ _('show geodata') }}</a></small>
+{% endif %}
+-#}
+
+{%- if result.address -%}
+<p itemscope itemtype="http://schema.org/PostalAddress" class="content">
+ {%- if result.address.name -%}
+ <strong itemprop="name">{{ result.address.name }}</strong><br/>
+ {%- endif -%}
+ {% if result.address.road -%}
+ <span itemprop="streetAddress">
+ {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %}
+ {{ result.address.road }}
+ </span><br/>
+ {%- endif %}
+ {%- if result.address.locality -%}
+ <span itemprop="addressLocality">{{ result.address.locality }}</span>
+ {% if result.address.postcode %}, <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %}
+ <br/>
+ {%- endif -%}
+ {%- if result.address.country -%}
+ <span itemprop="addressCountry">{{ result.address.country }}</span>
+ {%- endif -%}
+</p>
+{%- endif -%}
+
+{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
+
+{{- result_sub_footer(result, proxify) -}}
+
+{% if result.osm and (result.osm.type and result.osm.id) -%}
+ <div class="result-content invisible" id="result-overpass-{{ index }}"{% if rtl %} dir="ltr"{% endif %}>
+ <div id="result-overpass-table-loading-{{ index }}"><img src="{{ url_for('static', filename='img/loader.gif') }}" alt="Loading ..."/></div>
+ <table id="result-overpass-table-{{ index }}">
+ <thead>
+ <tr><th>key</th><th>value</th></tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+{%- endif %}
+
+{#-
+{% if (result.latitude and result.longitude) -%}
+ <div id="result-geodata-{{ index }}" class="invisible">
+ <strong>Longitude:</strong> {{ result.longitude }} <br/>
+ <strong>Latitude:</strong> {{ result.latitude }}
+ </div>
+{%- endif %}
+-#}
+
+{% if (result.latitude and result.longitude) or result.boundingbox -%}
+ <div id="result-map-{{ index }}" class="invisible"><div id="osm-map-{{ index }}" style="height:300px; width:100%; margin: 10px 0;" ></div></div>
+{%- endif %}
+
+{{- result_footer(result) }}
diff --git a/searx/templates/simple/result_templates/torrent.html b/searx/templates/simple/result_templates/torrent.html
new file mode 100644
index 0000000..3c7fd15
--- /dev/null
+++ b/searx/templates/simple/result_templates/torrent.html
@@ -0,0 +1,24 @@
+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, result_link %}
+
+{{ result_header(result, favicons, image_proxify) -}}
+{{- result_sub_header(result) -}}
+
+{% if result.magnetlink %}<p class="altlink"> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</p>{% endif %}
+{% if result.torrentfile %}<p class="altlink"> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %}
+
+{% if result.seed %}<p class="stat"> &bull; {{ icon('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %}
+
+{%- if result.filesize %}<p class="stat">{{ icon('floppy-disk') }} {{ _('Filesize') }}<span class="badge">
+ {%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }}
+ {%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }}
+ {%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
+ {%- elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }}
+ {%- else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif -%}
+ </span></p>
+{%- endif -%}
+
+{%- if result.files %}<p class="stat">{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%}
+
+{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
+{{- result_sub_footer(result, proxify) -}}
+{{- result_footer(result) }}
diff --git a/searx/templates/simple/result_templates/videos.html b/searx/templates/simple/result_templates/videos.html
new file mode 100644
index 0000000..be270e9
--- /dev/null
+++ b/searx/templates/simple/result_templates/videos.html
@@ -0,0 +1,15 @@
+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %}
+
+{{ result_header(result, favicons, image_proxify) }}
+{{ result_sub_header(result) }}
+{% if result.embedded -%}
+<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film-outline') }} {{ _('show video') }}</a></p>
+{%- endif %}
+{% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
+{{- result_sub_footer(result, proxify) -}}
+{% if result.embedded -%}
+<div id="result-video-{{ index }}" class="invisible">
+ {{- result.embedded|safe -}}
+</div>
+{%- endif %}
+{{ result_footer(result) }}
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html
new file mode 100644
index 0000000..081118e
--- /dev/null
+++ b/searx/templates/simple/results.html
@@ -0,0 +1,151 @@
+{% extends "simple/base.html" %}
+{% from 'simple/macros.html' import icon, icon_small %}
+{% block title %}{{ q|e }} - {% endblock %}
+{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}&amp;pageno={{ pageno }}&amp;time_range={{ time_range }}&amp;language={{ current_language }}&amp;safesearch={{ safesearch }}&amp;format=rss">{% endblock %}
+{% block content %}
+<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
+{% include 'simple/search.html' %}
+<div id="results">
+ {% if answers %}
+ <div id="answers"><h4 class="title">{{ _('Answers') }} : </h4>
+ {% for answer in answers -%}
+ <div class="answer">{{ answer }}</div>
+ {%- endfor %}
+ </div>
+ {% endif %}
+
+ <div id="sidebar">
+
+ {% if number_of_results != '0' -%}
+ <p id="result_count"><small>{{ _('Number of results') }}: {{ number_of_results }}</small></p>
+ {%- endif %}
+
+ {% if unresponsive_engines and results|length >= 1 %}
+ <div class="dialog-error" role="alert">
+ <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
+ <p>{% for engine_name, error_type in unresponsive_engines %}
+ {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
+ {% endfor %}</p>
+ </div>
+ {% endif %}
+
+ {% if infoboxes %}
+ <div id="infoboxes">
+ {% for infobox in infoboxes %}
+ {% include 'simple/infobox.html' %}
+ {% endfor %}
+ </div>
+ {% endif %}
+
+ {% if suggestions %}
+ <div id="suggestions">
+ <h4 class="title">{{ _('Suggestions') }} : </h4>
+ <div class="wrapper">
+ {% for suggestion in suggestions %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <input type="hidden" name="q" value="{{ suggestion }}">
+ <input type="hidden" name="language" value="{{ current_language }}">
+ <input type="hidden" name="safesearch" value="{{ safesearch }}">
+ <input type="hidden" name="theme" value="{{ theme }}">
+ <input type="submit" class="suggestion" value="&bull; {{ suggestion }}">
+ </form>
+ {% endfor %}
+ </div>
+ </div>
+ {% endif %}
+
+ <div id="search_url">
+ <h4 class="title">{{ _('Search URL') }} :</h4>
+ <div><pre>{{ base_url }}?q={{ q|urlencode }}&amp;language={{ current_language }}&amp;time_range={{ time_range }}&amp;safesearch={{ safesearch }}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}</pre></div>
+ </div>
+ <div id="apis">
+ <h4 class="title">{{ _('Download results') }}</h4>
+ {% for output_type in ('csv', 'json', 'rss') %}
+ <div class="left">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <input type="hidden" name="q" value="{{ q|e }}">
+ {% for category in selected_categories %}
+ <input type="hidden" name="category_{{ category }}" value="1">
+ {% endfor %}
+ <input type="hidden" name="pageno" value="{{ pageno }}">
+ <input type="hidden" name="time_range" value="{{ time_range }}">
+ <input type="hidden" name="language" value="{{ current_language }}">
+ <input type="hidden" name="safesearch" value="{{ safesearch }}">
+ <input type="hidden" name="format" value="{{ output_type }}">
+ <input type="submit" value="{{ output_type }}">
+ </form>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+
+ {% if corrections %}
+ <div id="corrections">
+ <h4>{{ _('Try searching for:') }}</h4>
+ {% for correction in corrections %}
+ <div class="left">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation">
+ <input type="hidden" name="q" value="{{ correction }}">
+ <input type="hidden" name="time_range" value="{{ time_range }}">
+ <input type="hidden" name="language" value="{{ current_language }}">
+ <input type="hidden" name="safesearch" value="{{ safesearch }}">
+ <input type="hidden" name="theme" value="{{ theme }}">
+ <input type="submit" value="{{ correction }}">
+ </form>
+ </div>
+ {% endfor %}
+ </div>
+ {% endif %}
+
+ <div id="urls">
+ {% for result in results %}
+ {% set index = loop.index %}
+ {% if result['template'] %}
+ {% include get_result_template('simple', result['template']) %}
+ {% else %}
+ {% include 'simple/result_templates/default.html' %}
+ {% endif %}
+ {% endfor %}
+ {% if not results and not answers %}
+ {% include 'simple/messages/no_results.html' %}
+ {% endif %}
+ </div>
+ <div id="backToTop">
+ <a href="#">{{ icon_small('chevron-up') }}</a>
+ </div>
+ {% if paging %}
+ <nav id="pagination">
+ {% if pageno > 1 %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <div class="{% if rtl %}right{% else %}left{% endif %}">
+ <input type="hidden" name="q" value="{{ q|e }}" >
+ {% for category in selected_categories %}
+ <input type="hidden" name="category_{{ category }}" value="1" >
+ {% endfor %}
+ <input type="hidden" name="pageno" value="{{ pageno-1 }}" >
+ <input type="hidden" name="time_range" value="{{ time_range }}" >
+ <input type="hidden" name="language" value="{{ current_language }}" >
+ <input type="hidden" name="safesearch" value="{{ safesearch }}" >
+ <input type="hidden" name="theme" value="{{ theme }}" >
+ <button type="submit">{{ icon_small('chevron-left') }} {{ _('previous page') }}</button>
+ </div>
+ </form>
+ {% endif %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <div class="{% if rtl %}left{% else %}right{% endif %}">
+ <input type="hidden" name="q" value="{{ q|e }}" >
+ {% for category in selected_categories %}
+ <input type="hidden" name="category_{{ category }}" value="1" >
+ {% endfor %}
+ <input type="hidden" name="pageno" value="{{ pageno+1 }}" >
+ <input type="hidden" name="time_range" value="{{ time_range }}" >
+ <input type="hidden" name="language" value="{{ current_language }}" >
+ <input type="hidden" name="safesearch" value="{{ safesearch }}" >
+ <input type="hidden" name="theme" value="{{ theme }}" >
+ <button type="submit">{{ _('next page') }} {{ icon_small('chevron-right') }}</button>
+ </div>
+ </form>
+ </nav>
+ {% endif %}
+</div>
+{% endblock %}
diff --git a/searx/templates/simple/search.html b/searx/templates/simple/search.html
new file mode 100644
index 0000000..3f48d7f
--- /dev/null
+++ b/searx/templates/simple/search.html
@@ -0,0 +1,16 @@
+<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
+ <div id="search_wrapper">
+ <div class="search_box">
+ <input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
+ <button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
+ </div>
+ <div class="search_filters">
+ {% include 'simple/languages.html' %}
+ {% include 'simple/time-range.html' %}
+ </div>
+ </div>
+ {% set display_tooltip = true %}
+ {% include 'simple/categories.html' %}
+ <input type="hidden" name="safesearch" value="{{ safesearch }}" >
+ <input type="hidden" name="theme" value="{{ theme }}" >
+</form>
diff --git a/searx/templates/simple/simple.spec.txt b/searx/templates/simple/simple.spec.txt
new file mode 100644
index 0000000..a9724f8
--- /dev/null
+++ b/searx/templates/simple/simple.spec.txt
@@ -0,0 +1,40 @@
+#container
+ .search
+ #search_form
+
+#results
+
+ #sidebar
+ #result-count
+ .title
+ .content
+
+ .infobox
+ h2
+ img
+ p
+ div#attributes
+ table
+ tbody
+ tr
+ td
+ td
+ div#urls
+ ul
+ li
+
+ #suggestions
+ .title
+ .suggestion
+
+ #search_url
+ .title
+ input
+
+ #apis
+ .title
+ .api-link
+
+ .result
+
+
diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html
new file mode 100644
index 0000000..462ab4a
--- /dev/null
+++ b/searx/templates/simple/stats.html
@@ -0,0 +1,25 @@
+{% extends "simple/base.html" %}
+{% block head %} {% endblock %}
+{% block content %}
+
+<a href="{{ url_for('index') }}"><h1><span>searx</span></h1></a>
+
+<h2>{{ _('Engine stats') }}</h2>
+
+{% for stat_name,stat_category in stats %}
+<div class="left">
+ <table>
+ <tr colspan="3">
+ <th>{{ stat_name }}</th>
+ </tr>
+ {% for engine in stat_category %}
+ <tr>
+ <td>{{ engine.name }}</td>
+ <td>{{ '%.02f'|format(engine.avg) }}</td>
+ <td class="percentage"><div style="width: {{ engine.percentage }}%">&nbsp;</div></td>
+ </tr>
+ {% endfor %}
+ </table>
+</div>
+{% endfor %}
+{% endblock %}
diff --git a/searx/templates/simple/time-range.html b/searx/templates/simple/time-range.html
new file mode 100644
index 0000000..a9fc9f1
--- /dev/null
+++ b/searx/templates/simple/time-range.html
@@ -0,0 +1,17 @@
+<select name="time_range" id="time_range" class="time_range" tabindex="3">{{- '' -}}
+ <option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
+ {{- _('Anytime') -}}
+ </option>{{- '' -}}
+ <option id="time-range-day" value="day" {{ "selected" if time_range=="day" else ""}}>
+ {{- _('Last day') -}}
+ </option>{{- '' -}}
+ <option id="time-range-week" value="week" {{ "selected" if time_range=="week" else ""}}>
+ {{- _('Last week') -}}
+ </option>{{- '' -}}
+ <option id="time-range-month" value="month" {{ "selected" if time_range=="month" else ""}}>
+ {{- _('Last month') -}}
+ </option>{{- '' -}}
+ <option id="time-range-year" value="year" {{ "selected" if time_range=="year" else ""}}>
+ {{- _('Last year') -}}
+ </option>{{- '' -}}
+</select>