2017-02-12 14:06:01 +00:00
|
|
|
{% extends "simple/base.html" %}
|
2021-11-13 09:42:07 +00:00
|
|
|
{% from 'simple/icons.html' import icon, icon_big, icon_small %}
|
2021-03-02 13:24:55 +00:00
|
|
|
{% macro engine_data_form(engine_data) -%}
|
|
|
|
{% for engine_name, kv_data in engine_data.items() %}
|
|
|
|
{% for k, v in kv_data.items() %}
|
|
|
|
<input type="hidden" name="engine_data-{{ engine_name }}-{{ k|e }}" value="{{ v|e }}" />
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
{%- endmacro %}
|
2021-11-29 10:08:21 +00:00
|
|
|
{% block title %}{% if query_in_title %}{{- q|e }} - {% endif %}{% endblock %}
|
2019-07-30 04:25:05 +00:00
|
|
|
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
2017-02-12 14:06:01 +00:00
|
|
|
{% block content %}
|
|
|
|
{% include 'simple/search.html' %}
|
2018-08-09 14:13:50 +00:00
|
|
|
|
|
|
|
{% if results and results|map(attribute='template')|unique|list|count == 1 %}
|
|
|
|
{% set only_template = 'only_template_' + results[0]['template']|default('default')|replace('.html', '') %}
|
|
|
|
{% else %}
|
|
|
|
{% set unique_template = '' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div id="results" class="{{ only_template }}">
|
|
|
|
{% if answers -%}
|
2017-02-12 14:06:01 +00:00
|
|
|
<div id="answers"><h4 class="title">{{ _('Answers') }} : </h4>
|
2020-06-09 15:01:59 +00:00
|
|
|
{%- 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>
|
2018-08-09 14:13:50 +00:00
|
|
|
{%- endfor -%}
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
2018-08-09 14:13:50 +00:00
|
|
|
{%- endif %}
|
2017-02-12 14:06:01 +00:00
|
|
|
|
|
|
|
<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">
|
2021-11-13 09:42:07 +00:00
|
|
|
{{ icon_big('warning') }}
|
|
|
|
<div>
|
|
|
|
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
|
|
|
|
{%- for engine_name, error_type in unresponsive_engines -%}
|
|
|
|
<p>{{- engine_name }} (
|
|
|
|
<a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
2021-04-25 12:19:35 +00:00
|
|
|
{{- error_type -}}
|
2021-11-13 09:42:07 +00:00
|
|
|
</a> ){{- '' -}}
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if infoboxes %}
|
|
|
|
<div id="infoboxes">
|
2018-08-09 14:13:50 +00:00
|
|
|
{% for infobox in infoboxes -%}
|
|
|
|
{% include 'simple/infobox.html' %}
|
|
|
|
{%- endfor %}
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if suggestions %}
|
|
|
|
<div id="suggestions">
|
|
|
|
<h4 class="title">{{ _('Suggestions') }} : </h4>
|
|
|
|
<div class="wrapper">
|
|
|
|
{% for suggestion in suggestions %}
|
2019-07-30 04:25:05 +00:00
|
|
|
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
2019-07-16 14:27:29 +00:00
|
|
|
<input type="hidden" name="q" value="{{ suggestion.url }}">
|
2019-08-02 11:50:51 +00:00
|
|
|
<input type="hidden" name="time_range" value="{{ time_range }}">
|
2017-02-12 14:06:01 +00:00
|
|
|
<input type="hidden" name="language" value="{{ current_language }}">
|
|
|
|
<input type="hidden" name="safesearch" value="{{ safesearch }}">
|
|
|
|
<input type="hidden" name="theme" value="{{ theme }}">
|
2019-08-02 11:50:51 +00:00
|
|
|
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
2019-07-16 14:27:29 +00:00
|
|
|
<input type="submit" class="suggestion" value="• {{ suggestion.title }}">
|
2017-02-12 14:06:01 +00:00
|
|
|
</form>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div id="search_url">
|
|
|
|
<h4 class="title">{{ _('Search URL') }} :</h4>
|
2019-07-30 04:25:05 +00:00
|
|
|
<div class="selectable_url"><pre>{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&language={{ current_language }}&time_range={{ time_range }}&safesearch={{ safesearch }}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if timeout_limit %}&timeout_limit={{ timeout_limit|urlencode }}{% endif %}</pre></div>
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
<div id="apis">
|
2021-05-26 17:43:27 +00:00
|
|
|
{% if search_formats %}
|
2017-02-12 14:06:01 +00:00
|
|
|
<h4 class="title">{{ _('Download results') }}</h4>
|
2021-05-26 17:43:27 +00:00
|
|
|
{% for output_type in search_formats %}
|
2017-02-12 14:06:01 +00:00
|
|
|
<div class="left">
|
2019-07-30 04:25:05 +00:00
|
|
|
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
2017-02-12 14:06:01 +00:00
|
|
|
<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 }}">
|
2019-08-02 11:50:51 +00:00
|
|
|
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
2017-02-12 14:06:01 +00:00
|
|
|
<input type="submit" value="{{ output_type }}">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2021-05-26 17:43:27 +00:00
|
|
|
{% endif %}
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if corrections %}
|
|
|
|
<div id="corrections">
|
|
|
|
<h4>{{ _('Try searching for:') }}</h4>
|
|
|
|
{% for correction in corrections %}
|
|
|
|
<div class="left">
|
2019-07-30 04:25:05 +00:00
|
|
|
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="navigation">
|
2019-10-23 04:38:21 +00:00
|
|
|
<input type="hidden" name="q" value="{{ correction.url }}">
|
2017-02-12 14:06:01 +00:00
|
|
|
<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 }}">
|
2019-08-02 11:50:51 +00:00
|
|
|
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit }}" >{% endif %}
|
2019-10-23 04:38:21 +00:00
|
|
|
<input type="submit" value="{{ correction.title }}">
|
2017-02-12 14:06:01 +00:00
|
|
|
</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">
|
2021-11-13 09:42:07 +00:00
|
|
|
<a href="#">{{ icon_small('chevron-up-outline') }}</a>
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
{% if paging %}
|
|
|
|
<nav id="pagination">
|
|
|
|
{% if pageno > 1 %}
|
2021-08-24 09:31:29 +00:00
|
|
|
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="previous_page">
|
2017-02-12 14:06:01 +00:00
|
|
|
<div class="{% if rtl %}right{% else %}left{% endif %}">
|
|
|
|
<input type="hidden" name="q" value="{{ q|e }}" >
|
2021-03-02 13:24:55 +00:00
|
|
|
{{- engine_data_form(engine_data) -}}
|
2017-02-12 14:06:01 +00:00
|
|
|
{% 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 }}" >
|
2019-08-02 11:50:51 +00:00
|
|
|
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
2022-01-22 17:28:22 +00:00
|
|
|
<button type="submit">{{ icon_small('chevron-left') }} {{ _('Previous page') }}</button>
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2021-08-24 09:31:29 +00:00
|
|
|
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="next_page">
|
2017-02-12 14:06:01 +00:00
|
|
|
<div class="{% if rtl %}left{% else %}right{% endif %}">
|
|
|
|
<input type="hidden" name="q" value="{{ q|e }}" >
|
2021-03-02 13:24:55 +00:00
|
|
|
{{- engine_data_form(engine_data) -}}
|
2017-02-12 14:06:01 +00:00
|
|
|
{% 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 }}" >
|
2019-08-02 11:50:51 +00:00
|
|
|
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
2022-01-22 17:28:22 +00:00
|
|
|
<button type="submit">{{ _('Next page') }} {{ icon_small('chevron-right') }}</button>
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</nav>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|