This commit is contained in:
Joseph Cheung 2023-02-19 18:06:16 +08:00
parent 3747a01486
commit acd87ae0e8
34 changed files with 0 additions and 1624 deletions

View file

@ -1,102 +0,0 @@
<div{% if rtl %} dir="ltr"{% endif %}>
<h1>About <a href="{{ url_for('index') }}">searx</a></h1>
<p>
Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>,
aggregating the results of other <a href="{{ url_for('preferences') }}">search engines</a>
while not storing information about its users.
</p>
<p>More about searx...</p>
<ul>
<li><a href="https://github.com/searx/searx">github</a></li>
<li><a href="https://twitter.com/Searx_engine">twitter</a></li>
<li>IRC: #searx @ freenode (<a href="https://kiwiirc.com/client/irc.freenode.com/searx">webclient</a>)</li>
<li><a href="https://www.transifex.com/projects/p/searx/">transifex</a></li>
</ul>
<hr />
<h2>Why use searx?</h2>
<ul>
<li>
Searx may not offer you as personalised results as Google, but it doesn't
generate a profile about you.
</li>
<li>
Searx doesn't care about what you search for, never shares anything with a
third party, and it can't be used to compromise you.
</li>
<li>
Searx is free software, the code is 100% open and you can help to make it
better. See more on <a href="https://github.com/searx/searx">github</a>.
</li>
</ul>
<p>
If you do care about privacy, want to be a conscious user, or otherwise
believe in digital freedom, make searx your default search engine or run it
on your own server
</p>
<h2>Technical details - How does it work?</h2>
<p>
Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>,
inspired by the <a href="https://beniz.github.io/seeks/">seeks project</a>.
It provides basic privacy by mixing your queries with searches on other
platforms without storing search data. Queries are made using a POST request
on every browser (except Chromium-based browsers*). Therefore they show up
in neither our logs, nor your url history. In the case of Chromium-based
browser users there is an exception: searx uses the search bar to perform GET
requests.
Searx can be added to your browser's search bar; moreover, it can be set as
the default search engine.
</p>
<h2 id='add to browser'>How to set as the default search engine?</h2>
<p>
Searx supports <a href="https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md">OpenSearch</a>.
For more information on changing your default search engine, see your browser's documentation:
</p>
<ul>
<li><a href="https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox">Firefox</a></li>
<li><a href="https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine">Microsoft Edge</a></li>
<li>Chromium-based browsers <a href="https://www.chromium.org/tab-to-search">only add websites that the user navigates to without a path.</a>
</ul>
<h2>Where to find anonymous usage statistics of this instance ?</h2>
<p>
<a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.
</p>
<h2>How can I make it my own?</h2>
<p>
Searx appreciates your concern regarding logs, so take the
code from the <a href="https://github.com/searx/searx">original searx project</a> and
run it yourself!
</p>
<p>
Add your searx instance to this <a href="{{ brand.PUBLIC_INSTANCES }}"> list
of public searx instances</a> to help other people reclaim their privacy and
make the Internet freer! The more decentralized the Internet is, the more
freedom we have!
</p>
<h2>Where are the docs & code of this instance?</h2>
<p>
See the <a href="{{ brand.DOCS_URL }}">{{ brand.DOCS_URL }}</a>
and <a href="{{ brand.GIT_URL }}">{{ brand.GIT_URL }}</a>
</p>
</div>
{% include "__common__/aboutextend.html" ignore missing %}

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>{{ instance_name }}</ShortName>
<Description>a privacy-respecting, hackable metasearch engine</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image>{{ url_for('static', filename='img/favicon.png', _external=True) }}</Image>
<LongName>searx metasearch</LongName>
{% if opensearch_method == 'get' %}
<Url rel="results" type="text/html" method="get" template="{{ url_for('search', _external=True) }}?q={searchTerms}"/>
{% else %}
<Url rel="results" type="text/html" method="post" template="{{ url_for('search', _external=True) }}">
<Param name="q" value="{searchTerms}" />
</Url>
{% endif %}
{% if autocomplete %}
<Url rel="suggestions" type="application/x-suggestions+json" template="{{ url_for('autocompleter', _external=True) }}?q={searchTerms}"/>
{% endif %}
<Url type="application/opensearchdescription+xml"
rel="self"
template="{{ opensearch_url }}" />
</OpenSearchDescription>

View file

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Searx search: {{ q|e }}</title>
<link>{{ url_for('search', _external=True) }}?q={{ q|e }}</link>
<description>Search results for "{{ q|e }}" - searx</description>
<opensearch:totalResults>{{ number_of_results }}</opensearch:totalResults>
<opensearch:startIndex>1</opensearch:startIndex>
<opensearch:itemsPerPage>{{ number_of_results }}</opensearch:itemsPerPage>
<atom:link rel="search" type="application/opensearchdescription+xml" href="{{ opensearch_url }}"/>
<opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" />
{% if error_message %}
<item>
<title>Error</title>
<description>{{ error_message|e }}</description>
</item>
{% endif %}
{% for r in results %}
<item>
<title>{{ r.title }}</title>
<link>{{ r.url }}</link>
<description>{{ r.content }}</description>
{% if r.pubdate %}<pubDate>{{ r.pubdate }}</pubDate>{% endif %}
</item>
{% endfor %}
{% if answers %}
{% for a in answers %}
<item>
<title>{{ a }}</title>
<type>answer</type>
</item>
{% endfor %}
{% endif %}
{% if corrections %}
{% for a in corrections %}
<item>
<title>{{ a }}</title>
<type>correction</type>
</item>
{% endfor %}
{% endif %}
{% if suggestions %}
{% for a in suggestions %}
<item>
<title>{{ a }}</title>
<type>suggestion</type>
</item>
{% endfor %}
{% endif %}
</channel>
</rss>

View file

@ -1,9 +0,0 @@
{% extends "oscar/base.html" %}
{% block content %}
<div class="text-center">
<h1>{{ _('Page not found') }}</h1>
{% autoescape false %}
<p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
{% endautoescape %}
</div>
{% endblock %}

View file

@ -1,5 +0,0 @@
{% extends "oscar/base.html" %}
{% block title %}{{ _('about') }} - {% endblock %}
{% block content %}
{% include '__common__/about.html' %}
{% endblock %}

View file

@ -1,17 +0,0 @@
<input type="checkbox" name="advanced_search" class="visually-hidden" id="check-advanced" {% if advanced_search %} checked="checked"{% endif %}>
<label for="check-advanced">{{- "" -}}
<span class="glyphicon glyphicon-cog"></span>
{{- _('Advanced settings') -}}
</label>
<div id="advanced-search-container">
{% include 'oscar/categories.html' %}
<div class="row">
<div class="col-xs-6">
{%- include 'oscar/time-range.html' -%}
</div>
<div class="col-xs-6">
{%- include 'oscar/languages.html' -%}
</div>
</div>
</div>

View file

@ -1,110 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<!DOCTYPE html>
<html lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %} class="nojs">
<head>
<meta charset="UTF-8" />
<meta name="description" content="Search - a privacy-respecting metasearch engine" />
<meta name="keywords" content="Search, search, search engine, metasearch, meta search" />
<meta name="generator" content="Search/{{ searx_version }}">
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" />
{% block meta %}{% endblock %}
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" />
{% if preferences.get_value('oscar-style') -%}
{{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/'+preferences.get_value('oscar-style')+'.min.css') }}" type="text/css" />
{%- else -%}
{{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/logicodev.min.css') }}" type="text/css" />
{%- endif %}
{% set templates = results|map(attribute='template')|unique|list -%}
{%- set load_leaflet = 'map.html' in templates -%}
{%- if load_leaflet -%}
{{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.min.css') }}" type="text/css" />
{%- endif %}
{%- for css in styles %}
<link rel="stylesheet" href="{{ url_for('static', filename=css) }}" type="text/css" />
{% endfor %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}" type="text/css" />
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
{% block styles %}
{% endblock %}
{% block head %}
{% endblock %}
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}"/>
<noscript>
<style type="text/css">
.tab-content > .active_if_nojs, .active_if_nojs {display: block !important; visibility: visible !important;}
.margin_top_if_nojs {margin-top: 20px;}
.hide_if_nojs {display: none !important;overflow: hidden !important;}
.disabled_if_nojs {pointer-events: none; cursor: default; text-decoration: line-through;}
</style>
</noscript>
</head>
<body class="{{ endpoint }}_endpoint" >
{% include 'oscar/navbar.html' %}
<div class="container">
{% if errors %}
<div class="alert alert-danger 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') }} {{ _('Error!') }}</strong>
<ul>
{% for message in errors %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% block site_alert_error %}
{% endblock %}
{% block site_alert_warning %}
{% endblock %}
{% block site_alert_info %}
{% endblock %}
{% block site_alert_success %}
{% endblock %}
{% block content %}
{% endblock %}
</div>
<div class="footer">
<div class="container">
{% block footer %}
{% endblock %}
<p class="text-muted">
<small>
{{ _('Powered by') }} <a href="{{ get_setting('brand.docs_url') }}">Search </a> - {{ searx_version }}, previously codenamed MAGI - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>
</small>
</p>
</div>
</div>
<script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
{% if load_leaflet %}{{" "}}<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>{{ "\n" }}{% endif %}
{% if autocomplete %}{{" "}}<script src="{{ url_for('static', filename='js/typeahead.bundle.min.js') }}"></script>{{ "\n" }}{% endif %}
<script src="{{ url_for('static', filename='js/searxng.min.js') }}"
data-method="{{ method or 'POST' }}"
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"
data-infinite-scroll="{% if infinite_scroll %}true{% else %}false{% endif %}"
data-translations="{{ translations }}"></script>
{% for script in scripts %}
{{""}}<script src="{{ url_for('static', filename=script) }}"></script>
{% endfor %}
<noscript>
<style>
.glyphicon { display: none; }
</style>
</noscript>
</body>
</html>

View file

@ -1,17 +0,0 @@
<div id="categories">
{%- if rtl -%}
{% for category in categories | reverse -%}
<a>
<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
<label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
</a>
{%- endfor %}
{%- else -%}
{% for category in categories -%}
<a>
<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
<label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
</a>
{%- endfor %}
{%- endif -%}
</div>

View file

@ -1,21 +0,0 @@
{% extends "oscar/base.html" %}
{% block content %}
<div class="container-fluid">
<div class="row">{{- "" -}}
<div class="text-center col-sm-12 col-md-12">
{%- if cookies['oscar-style'] == 'pointhi' -%}
<h1 class="text-hide center-block"><img class="center-block img-responsive" src="{{ url_for('static', filename='img/searx_logo.png') }}" alt="searx logo"/>searx</h1>
{%- else -%}
<div class="text-hide center-block" id="main-logo">{{- "" -}}
<img class="center-block img-responsive" src="{{ url_for('static', filename='img/logo_searx_a.png') }}" alt="searx logo" />searx{{- "" -}}
</div>
{%- endif -%}
</div>{{- "" -}}
</div>
<div class="row">
<div class="text-center col-sm-12 col-md-12">
{% include 'oscar/search_full.html' %}
</div>
</div>
</div>
{% endblock %}

View file

@ -1,49 +0,0 @@
{% from 'oscar/macros.html' import result_link with context %}
<div class="panel panel-default infobox">
<div class="panel-heading">{{- "" -}}
<div class="infobox_part">
<div class="{% if not rtl %}pull-right{% endif %}">
{% for engine in infobox.engines %}
<span class="label label-default">{{ engine }}</span>
{% endfor %}
</div>
<h4 class="panel-title"><bdi>{{ infobox.infobox }}</bdi></h4>{{- "" -}}
{% for u in infobox.urls %}{% if u.official %} <a class="header_url" href="{{ u.url }}">{{ u.url }}</a>{% endif %}{% endfor %}
</div>
</div>
<input type="checkbox" class="infobox_checkbox" id="expand_infobox_{{ infobox.engine }}" hidden>
<div class="panel-body infobox_body">
{% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" />{% endif %}
{% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content | safe }}</p></bdi>{% endif %}
{% if infobox.attributes -%}
<table class="table table-striped infobox_part">
{% for attribute in infobox.attributes -%}
<tr>{{- "" -}}
<td><bdi>{{ attribute.label }}</bdi></td>
{%- if attribute.image -%}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{%- else -%}
<td><bdi>{{ attribute.value }}</bdi></td>
{%- endif -%}
</tr>
{% endfor -%}
</table>
{% endif %}
{% if infobox.urls -%}
<div class="infobox_part">{{- "\n" -}}
<bdi>
{%- for url in infobox.urls -%}
<p class="btn btn-default btn-xs">{{ result_link(url.url, url.title) }}</p>
{% endfor -%}
</bdi>{{- "" -}}
</div>
{% endif %}
</div>
<label for="expand_infobox_{{ infobox.engine }}" class="infobox_toggle panel-footer">
<span class="infobox_label_down glyphicon glyphicon-chevron-down"></span>
<span class="infobox_label_up glyphicon glyphicon-chevron-up"></span>
</label>
</div>

View file

@ -1,10 +0,0 @@
{% from 'oscar/macros.html' import custom_select_class %}
<label class="visually-hidden" for="language">{{ _('Language') }}</label>
<select class="language form-control {{ custom_select_class(rtl) }}" id="language" name="language" accesskey="l">
<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>

View file

@ -1,152 +0,0 @@
<!-- Draw glyphicon icon from bootstrap-theme -->
{% macro icon(action, alt) -%}
<span title="{{ alt }}" 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='', id='') -%}
<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}{% if id %} aria-labelledby="result-{{id}}"{%endif%}>{{ title }}</a>
{%- endmacro -%}
<!-- Draw result header -->
{% macro result_header(result, favicons, id) -%}
<h4 class="result_header" id="result-{{id}}">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }}{% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe, id=id) }}{% else %}{{ result.title|safe}}{% endif %}</h4>
{%- endmacro %}
<!-- Draw result sub header -->
{% macro result_sub_header(result, id) -%}
{%- 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", id) }}</small>{% endif -%}
{%- if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif -%}
{%- endmacro %}
<!-- Draw result footer -->
{% macro result_footer(result, id) -%}
<div class="clearfix"></div>{{- "" -}}
<div class="pull-right">
{%- for engine in result.engines -%}
<span class="label label-default">{{ engine }}</span>
{%- endfor -%}
{%- if result.url -%}
{%- if result.cached_url -%}
<small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
{%- elif not result.is_onion -%}
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
{% if archive_today %}
<small>{{ result_link("https://archive.today/" + result.url, icon('link') + _('archive'), "text-info", id) }}</small>
{% endif %}
{%- endif -%}
{%- endif -%}
{%- if proxify -%}
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
{%- endif -%}
</div>
{%- if result.pretty_url -%}
<div class="external-link">{{ result.pretty_url }}</div>
{%- endif -%}
{%- endmacro %}
<!-- Draw result footer without cache link -->
{% macro result_footer_nocache(result) -%}
<div class="clearfix"></div>{{- "" -}}
<div class="pull-right">
{%- for engine in result.engines -%}
<span class="label label-default">{{ engine }}</span>
{%- endfor -%}
{%- 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, id) -%}
<div class="clearfix"></div>
{%- for engine in result.engines -%}
<span class="label label-default">{{ engine }}</span>
{%- endfor -%}
{%- if result.url -%}
{%- if result.cached_url -%}
<small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
{%- elif not result.is_onion -%}
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
{% if archive_today %}
<small>{{ result_link("https://archive.today/" + result.url, icon('link') + _('archive'), "text-info", id) }}</small>
{% endif %}
{%- endif -%}
{%- endif -%}
{%- if proxify -%}
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
{%- endif -%}
{%- if result.pretty_url -%}
<div class="external-link">{{ result.pretty_url }}</div>
{%- endif -%}
{%- endmacro %}
<!-- Draw result footer without cache link -->
{% macro result_footer_nocache_rtl(result) -%}
<div class="clearfix"></div>
{%- for engine in result.engines -%}
<span class="label label-default">{{ engine }}</span>
{%- endfor -%}
{%- 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, id) -%}
{%- if rtl -%}
<div class="row form-group">{{- "" -}}
<label class="col-sm-3 col-md-2 pull-right"{% if id %} for="{{id}}"{% endif %}>{{ 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"{% if id %} for="{{id}}"{% endif %}>{{ 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 custom_select_class(rtl) -%}
custom-select{% if rtl %}-rtl{% 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>{{- "" -}}
<label class="visually-hidden" for="{{ id }}">{{ _('Allow') }}</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 %}

View file

@ -1,8 +0,0 @@
<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') }} {{ _('Heads up!') }}</strong>
{{ _('It look like you are using searx first time.') }}
</div>

View file

@ -1,5 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<div class="alert alert-info fade in" role="alert">
<strong class="lead">{{ icon('info-sign') }} {{ _('Information!') }}</strong>
{{ _('currently, there are no cookies defined.') }}
</div>

View file

@ -1,5 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<div class="alert alert-info fade in" role="alert">
<strong class="lead">{{ icon('info-sign') }} {{ _('Heads up!') }}</strong>
{{ _('There is currently no data available. ') }}
</div>

View file

@ -1,17 +0,0 @@
{% 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.') }} (<a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a>)</small></p>
</div>
{% else %}
<div class="alert alert-info fade in" role="alert">
<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 %}

View file

@ -1,9 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<div class="alert alert-success 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('ok-sign') }} {{ _('Well done!') }}</strong>
{{ _('Settings saved successfully.') }}
</div>

View file

@ -1,9 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<div class="alert alert-danger 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('exclamation-sign') }} {{ _('Oh snap!') }}</strong>
{{ _('Something went wrong.') }}
</div>

View file

@ -1,9 +0,0 @@
<div class="searx-navbar">{{- "" -}}
<span class="instance {% if rtl %}pull-right{% else %}pull-left{% endif%}">{{- "" -}}
<a href="{{ url_for('index') }}">{{ instance_name }}</a>{{- "" -}}
</span>{{- "" -}}
<span class="{% if rtl %}pull-left{% else %}pull-right{% endif %}">{{- "" -}}
<a href="{{ url_for('about') }}">{{ _('about') }}</a>{{- "" -}}
<a href="{{ url_for('preferences') }}">{{ _('preferences') }}</a>{{- "" -}}
</span>{{- "" -}}
</div>

View file

@ -1,400 +0,0 @@
{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle, support_toggle, custom_select_class %}
{% extends "oscar/base.html" %}
{% macro engine_about(search_engine, id) -%}
{% if search_engine.about is defined %}
{% set about = search_engine.about %}
<div class="engine-tooltip" role="tooltip" id="{{ id }}">{{- "" -}}
<h5><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></h5>
{%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%}
{%- if search_engine.enable_http %}<p>{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
</div>
{%- endif -%}
{%- endmacro %}
{% block title %}{{ _('preferences') }} - {% endblock %}
{% block content %}
<div>
<h1>{{ _('Preferences') }}</h1>
<form method="post" action="{{ url_for('preferences') }}" id="search_form">
<!-- Nav tabs -->
<ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
<li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
<li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
<li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li>
{% if answerers %}<li><a href="#tab_answerers" role="tab" data-toggle="tab">{{ _('Answerers') }}</a></li>{% endif %}
<li><a href="#tab_cookies" role="tab" data-toggle="tab">{{ _('Cookies') }}</a></li>
</ul>
<!-- Tab panes -->
<noscript>
<h3>{{ _('General') }}</h3>
</noscript>
<div class="tab-content">
<div class="tab-pane active" id="tab_general">
<fieldset>
<div class="container-fluid">
{% if 'categories' not in locked_preferences %}
<div class="row form-group">
{% if rtl %}
<div class="col-sm-11 col-md-10">
{% include 'oscar/categories.html' %}
</div>
<label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
{% else %}
<label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
<div class="col-sm-11 col-md-10 search-categories">
{% include 'oscar/categories.html' %}
</div>
{% endif %}
</div>
{% endif %}
{% if 'language' not in locked_preferences %}
{% set language_label = _('Search language') %}
{% set language_info = _('What language do you prefer for search?') %}
{{ preferences_item_header(language_info, language_label, rtl, 'language') }}
{% include 'oscar/languages.html' %}
{{ preferences_item_footer(language_info, language_label, rtl) }}
{% endif %}
{% if 'locale' not in locked_preferences %}
{% set locale_label = _('Interface language') %}
{% set locale_info = _('Change the language of the layout') %}
{{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
<select class="form-control {{ custom_select_class(rtl)}}" name="locale" id="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>
{{ preferences_item_footer(locale_info, locale_label, rtl) }}
{% endif %}
{% if 'autocomplete' not in locked_preferences %}
{% set autocomplete_label = _('Autocomplete') %}
{% set autocomplete_info = _('Find stuff as you type') %}
{{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="autocomplete" id="autocomplete">
<option value=""> - </option>
{% for backend in autocomplete_backends %}
<option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
{% endfor %}
</select>
{{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
{% endif %}
{% if 'image_proxy' not in locked_preferences %}
{% set image_proxy_label = _('Image proxy') %}
{% set image_proxy_info = _('Proxying image results through searx') %}
{{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="image_proxy" id="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>
{{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
{% endif %}
{% if 'method' not in locked_preferences %}
{% set method_label = _('Method') %}
{% set method_info = _('Change how forms are submitted, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') %}
{{ preferences_item_header(method_info, method_label, rtl, 'method') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="method" id="method">
<option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
<option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
</select>
{{ preferences_item_footer(method_info, method_label, rtl) }}
{% endif %}
{% if 'safesearch' not in locked_preferences %}
{% set safesearch_label = _('SafeSearch') %}
{% set safesearch_info = _('Filter content') %}
{{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="safesearch" id="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>
{{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
{% endif %}
{% if 'theme' not in locked_preferences %}
{% set theme_label = _('Themes') %}
{% set theme_info = _('Change searx layout') %}
{{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="theme" id="theme">
{% for name in themes %}
<option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
{% endfor %}
</select>
{{ preferences_item_footer(theme_info, theme_label, rtl) }}
{% endif %}
{% if 'oscar-style' not in locked_preferences %}
{{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="oscar-style" id="oscar_style">
<option value="logicodev" >Logicodev</option>
<option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
<option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
</select>
{{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }}
{% endif %}
{% if 'results_on_new_tab' not in locked_preferences %}
{% set label = _('Results on new tabs') %}
{% set info = _('Open result links on new browser tabs') %}
{{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="results_on_new_tab" id="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>
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
{% if 'autofocus' not in locked_preferences %}
{% set label = _('Autofocus search field') %}
{% set info = _('Turn off if you use your keyboard to scroll') %}
{{ preferences_item_header(info, label, rtl, 'autofocus') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="autofocus" id="autofocus">
<option value="1" {% if autofocus %}selected="selected"{% endif %}>{{ _('On') }}</option>
<option value="0" {% if not autofocus %}selected="selected"{% endif %}>{{ _('Off')}}</option>
</select>
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
{% if 'archive_today' not in locked_preferences %}
{% set label = _('Show archive.today links') %}
{% set info = _('Alternative link cache service') %}
{{ preferences_item_header(info, label, rtl, 'archive_today') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="archive_today" id="archive_today">
<option value="1" {% if archive_today %}selected="selected"{% endif %}>{{ _('On') }}</option>
<option value="0" {% if not archive_today %}selected="selected"{% endif %}>{{ _('Off')}}</option>
</select>
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
{% set label = _('Show advanced settings') %}
{% set info = _('Show advanced settings panel in the home page by default') %}
{{ preferences_item_header(info, label, rtl, 'advanced_search') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="advanced_search" id="advanced_search">
<option value="1" {% if preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('On') }}</option>
<option value="0" {% if not preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('Off')}}</option>
</select>
{{ preferences_item_footer(info, label, rtl) }}
{% if 'doi_resolver' not in locked_preferences %}
{% 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, 'doi_resolver') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="doi_resolver" id="doi_resolver">
{% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
<option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}>
{{ doi_resolver_name }} - {{ doi_resolver_url }}
</option>
{% endfor %}
</select>
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
{% set label = _('Engine tokens') %}
{% set info = _('Access tokens for private engines') %}
{{ preferences_item_header(info, label, rtl, 'tokens') }}
<input class="form-control" id="tokens" name="tokens" value='{{ preferences.tokens.get_value() }}'/>
{{ preferences_item_footer(info, label, rtl) }}
</div>
</fieldset>
</div>
<div class="tab-pane active_if_nojs" id="tab_engine">
<!-- Nav tabs -->
<ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
{% for categ in all_categories %}
<li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
{% endfor %}
</ul>
<noscript>
<h3>{{ _('Engines') }}</h3>
</noscript>
<!-- Tab panes -->
<div class="tab-content">
<div class="hide_if_nojs">
<p class="text-{% if rtl %}left{% else %}right{% endif %}">
<button type="button" class="btn btn-default btn-success" id="allow-all-engines">{{ _("Allow all") }}</button>
<button type="button" class="btn btn-default btn-danger" id="disable-all-engines">{{ _("Disable all") }}</button>
</p>
</div>
{% for categ in all_categories %}
<noscript><label>{{ _(categ) }}</label>
</noscript>
<div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
<div class="container-fluid">
<fieldset>
<div class="table-responsive">
<table class="table table-hover table-condensed table-striped">
<tr>
{% if not rtl %}
<th scope="col">{{ _("Allow") }}</th>
<th scope="col">{{ _("Engine name") }}</th>
<th scope="col">{{ _("Shortcut") }}</th>
<th scope="col">{{ _("Selected language") }}</th>
<th scope="col">{{ _("SafeSearch") }}</th>
<th scope="col">{{ _("Time range") }}</th>
<th scope="col">{{ _("Avg. time") }}</th>
<th scope="col">{{ _("Max time") }}</th>
{% else %}
<th scope="col" class="text-right">{{ _("Max time") }}</th>
<th scope="col" class="text-right">{{ _("Avg. time") }}</th>
<th scope="col" class="text-right">{{ _("Time range") }}</th>
<th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
<th scope="col" class="text-right">{{ _("Selected language") }}</th>
<th scope="col" class="text-right">{{ _("Shortcut") }}</th>
<th scope="col" class="text-right">{{ _("Engine name") }}</th>
<th scope="col" class="text-right">{{ _("Allow") }}</th>
{% endif %}
</tr>
{% for search_engine in engines_by_category[categ] %}
{% if not search_engine.private %}
<tr>
{% if not rtl %}
<td class="onoff-checkbox">
{{- checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) -}}
</td>
<th scope="row"><span aria-labelledby="{{ 'tooltip_' + categ + '_' + search_engine.name }}">
{%- if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif -%}
{{- search_engine.name -}}</span>
{{- engine_about(search_engine, 'tooltip_' + categ + '_' + search_engine.name) -}}
</th>
<td class="name">{{ shortcuts[search_engine.name] }}</td>
<td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</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 '' }}">{% if stats[search_engine.name]['warn_time'] %}{{ icon('exclamation-sign')}} {% endif %}{{ '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 '' }}">{% if stats[search_engine.name]['warn_timeout'] %}{{ icon('exclamation-sign') }} {% endif %}{{ search_engine.timeout }}</td>
{% else %}
<td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</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 }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
<td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
<td>{{ support_toggle(search_engine.safesearch==True) }}</td>
<td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
<td>{{ shortcuts[search_engine.name] }}</td>
<th scope="row"><span>{% if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif %}{{ search_engine.name }}</span>{{ engine_about(search_engine) }}</th>
<td class="onoff-checkbox">
{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
</table>
</div>
</fieldset>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="tab-pane active_if_nojs" id="tab_plugins">
<noscript>
<h3>{{ _('Plugins') }}</h3>
</noscript>
<fieldset>
<div class="container-fluid">
{% for plugin in plugins %}
{% if plugin.preference_section != 'onions' %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{ _(plugin.name) }}</h3>
</div>
<div class="panel-body">
<div class="col-xs-6 col-sm-4 col-md-6"><label for="{{'plugin_' + plugin.id}}">{{ _(plugin.description) }}</label></div>
<div class="col-xs-6 col-sm-4 col-md-6">
<div class="onoff-checkbox">
{{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</fieldset>
</div>
{% if answerers %}
<div class="tab-pane active_if_nojs" id="tab_answerers">
<noscript>
<h3>{{ _('Answerers') }}</h3>
</noscript>
<p class="text-muted">
{{ _('This is the list of searx\'s instant answering modules.') }}
</p>
<table class="table table-striped">
<tr>
<th{% if rtl %} class="text-right"{% endif %}>{{ _('Name') }}</th>
<th{% if rtl %} class="text-right"{% endif %}>{{ _('Keywords') }}</th>
<th{% if rtl %} class="text-right"{% endif %}>{{ _('Description') }}</th>
<th{% if rtl %} class="text-right"{% endif %}>{{ _('Examples') }}</th>
</tr>
{% for answerer in answerers %}
<tr>
<td>{{ answerer.info.name }}</td>
<td>{{ answerer.keywords|join(', ') }}</td>
<td>{{ answerer.info.description }}</td>
<td>{{ answerer.info.examples|join(', ') }}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
<div class="tab-pane active_if_nojs" id="tab_cookies">
<noscript>
<h3>{{ _('Cookies') }}</h3>
</noscript>
<p class="text-muted">
{{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
{{ _('With that list, you can assess searx transparency.') }}<br />
</p>
{% if cookies %}
<table class="table table-striped">
<tr>
<th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Cookie name') }}</th>
<th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
</tr>
{% for cookie in cookies %}
<tr>
<td class="text-muted">{{ cookie }}</td>
<td class="text-muted">{{ cookies[cookie] }}</td>
</tr>
{% endfor %}
</table>
{% else %}
{% include 'oscar/messages/no_cookies.html' %}
{% endif %}
</div>
</div>
<p class="text-muted">
{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
</p>
<p>
{{ _('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>:
</p>
<div class="tab-pane">
<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 %}">
<input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
<a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
</div>
</form>
</div>
{% endblock %}

View file

@ -1,18 +0,0 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context%}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} aria-labelledby="result-{{loop.index}}">{{ result.repository }}</a></p>{% endif %}
<div dir="ltr">
{{ result.codelines|code_highlighter(result.code_language)|safe }}
</div>
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}

View file

@ -1,31 +0,0 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context %}
{{- result_header(result, favicons, loop.index) -}}
{{- result_sub_header(result, loop.index) -}}
{%- if result.embedded -%}
<small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}" aria-labelledby="result-{{loop.index}}">{{ icon('music') }} {{ _('show media') }}</a></small>
{%- endif -%}
{%- if result.embedded -%}
<div id="result-media-{{ index }}" class="collapse">
{{- result.embedded|safe -}}
</div>
{%- endif -%}
{%- if result.img_src or result.thumbnail -%}
<div class="container-fluid">{{- "" -}}
<div class="row">{{- "" -}}
<img src="{{ image_proxify(result.img_src or result.thumbnail) }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
</div>{{- "" -}}
</div>
{%- else -%}
{%- if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif -%}
{%- endif -%}
{%- if rtl -%}
{{ result_footer_rtl(result, loop.index) }}
{%- else -%}
{{ result_footer(result, loop.index) }}
{%- endif -%}

View file

@ -1,55 +0,0 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer_nocache, result_footer_nocache_rtl, icon with context %}
{{- result_header(result, favicons) -}}
{{- result_sub_header(result) -}}
{%- if result.embedded -%}
<small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">
{%- if result.mtype == 'audio' %}{{ icon('music') -}}
{%- elif result.mtype == 'video' %} {{ icon('film') -}}
{%- endif %} {{ _('show media') }}</a></small>
{%- endif -%}
{%- if result.embedded -%}
<div id="result-media-{{ index }}" class="collapse">
{{- result.embedded|safe -}}
</div>
{%- endif -%}
{%- if result.abstract %}<p class="result-content result-abstract">{{ result.abstract|safe }}</p>{% endif -%}
{%- if result.img_src -%}
<div class="container-fluid">
<div class="row">
<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
</div>
</div>
{%- else -%}
{%- if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif -%}
{%- endif -%}
<table class="result-metadata result-content">
{%- if result.author %}<tr><td>{{ _('Author') }}</td><td>{{ result.author|safe }}</td></tr>{% endif -%}
{%- if result.filename %}<tr><td>{{ _('Filename') }}</td><td>{{ result.filename|safe }}</td></tr>{% endif -%}
{%- if result.size %}<tr><td>{{ _('Filesize') }}</td><td>
{%- if result.size < 1024 %}{{ result.size }} {{ _('Bytes') -}}
{%- elif result.size < 1024*1024 %}{{ '{0:0.2f}'.format(result.size/1024) }} {{ _('kiB') -}}
{%- elif result.size < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.size/1024/1024) }} {{ _('MiB') -}}
{%- elif result.size < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.size/1024/1024/1024) }} {{ _('GiB') -}}
{%- else %}{{ '{0:0.2f}'.format(result.size/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif -%}
</td></tr>
{%- endif -%}
{%- if result.time %}<tr><td>{{ _('Date') }}</td><td>{{ result.time|safe }}</td></tr>{% endif -%}
{%- if result.mtype %}<tr><td>{{ _('Type') }}</td><td>{{ result.mtype|safe }}/{{ result.subtype|safe }}</td></tr>{% endif -%}
</table>
{%- if rtl -%}
{{ result_footer_nocache_rtl(result) }}
{%- else -%}
{{ result_footer_nocache(result) }}
{%- endif -%}

View file

@ -1,36 +0,0 @@
{%- from 'oscar/macros.html' import draw_favicon with context -%}
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} data-toggle="modal" data-target="#modal-{{ index }}-{{pageno}}" id="result-{{loop.index}}">{{- "" -}}
<img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail">{{- "" -}}
</a>
<div class="modal fade" id="modal-{{ index }}-{{ pageno }}" tabindex="-1" role="dialog" aria-hidden="true">{{- "" -}}
<div class="modal-dialog">{{- "" -}}
<div class="modal-wrapper">{{- "" -}}
<div class="modal-header">{{- "" -}}
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>{{- "" -}}
<h4 class="modal-title">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result.title|striptags }}</h4>{{- "" -}}
</div>{{- "" -}}
<div class="modal-body">{{- "" -}}
<img class="img-responsive center-block" src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}">
{%- if result.author %}<span class="photo-author">{{ result.author }}</span><br />{% endif -%}
{%- if result.content %}<p class="result-content">{{ result.content|striptags }}</p>{% endif -%}
{%- if result.img_format %}<p class="result-format">{{ result.img_format }}</p>{% endif -%}
{%- if result.source %}<p class="result-source">{{ result.source }}</p>{% endif -%}
</div>{{- "" -}}
<div class="modal-footer">{{- "" -}}
<div class="clearfix"></div>{{- "" -}}
<span class="label label-default pull-right">{{ result.engine }}</span>{{- "" -}}
<p class="text-muted pull-left">{{ result.pretty_url }}</p>{{- "" -}}
<div class="clearfix"></div>{{- "" -}}
<div class="row">{{- "" -}}
<div class="col-md-6">{{- "" -}}
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="btn btn-default">{{ _('Get image') }}</a>{{- "" -}}
</div>{{- "" -}}
<div class="col-md-6">{{- "" -}}
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="btn btn-default">{{ _('View source') }}</a>{{- "" -}}
</div>{{- "" -}}
</div>{{- "" -}}
</div>{{- "" -}}
</div>{{- "" -}}
</div>{{- "" -}}
</div>{{- "" -}}

View file

@ -1,19 +0,0 @@
{% from 'oscar/macros.html' import result_footer, result_footer_rtl with context %}
<div class="result result-default">
<table class="table table-responsive table-bordered table-condensed">
{% for key, value in result.items() %}
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions', 'pretty_url', 'parsed_url'] %}
{% continue %}
{% endif %}
<tr>
<td><b>{{ key|upper }}</b>: {{ value|truncate }}</td>
</tr>
{% endfor %}
</table>
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
</div>

View file

@ -1,76 +0,0 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{- result_header(result, favicons, loop.index) -}}
{{- result_sub_header(result, loop.index) -}}
<div class="container-fluid">
<div class="row">
{%- if result.img_src -%}<img src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" class="img-thumbnail">{%- endif -%}
{%- if result.type_icon or result.type -%}
<p class="result-content">
{%- if result.type_icon -%}
<img src="{{ image_proxify(result.type_icon) }}" title="{{ result.type|striptags }}" class="img-type">
{%- endif -%}
{{ result.type if result.type is not none else '' }}
</p>
{%- endif -%}
{%- if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif -%}
<table class="result-content result-map-details">
{%- if result.address -%}
<tr>
<th scope="row">
{{ result.address_label or _('address') }}
</th>
<td class="result-content result-adress" itemscope itemtype="http://schema.org/PostalAddress">
{%- if result.address.name -%}
<strong itemprop="name" class="hidden">{{ result.address.name }}</strong>
{%- 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 -%}
</td>
</tr>
{%- endif %}
{%- for info in result.data -%}
<tr><th scope="row">{{ info.label }}</th><td>{{ info.value|safe }}</td></tr>
{%- endfor -%}
{%- for link in result.links -%}
<tr><th scope="row">{{ link.label }}</th><td><a class="text-info cursor-pointer" href="{{ link.url }}">{{ link.url_label|safe }}</a></td></tr>
{%- endfor -%}
</table>
<p class="result-content">
{%- if (result.latitude and result.longitude) or result.boundingbox -%}
<span><a class="text-info btn-collapse collapsed searx_init_map cursor-pointer disabled_if_nojs" data-toggle="collapse" data-target="#result-map-{{ index }}" 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 %} data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}">{{ icon('globe') }} {{ _('show map') }}</a></span>
{%- endif -%}
</p>
</div>
{%- if (result.latitude and result.longitude) or result.boundingbox -%}
<div class="collapse" id="result-map-{{ index }}">
<div style="height:300px; width:100%; margin: 10px 0;" id="osm-map-{{ index }}"></div>
</div>
{%- endif -%}
</div>
{%- if rtl -%}
{{- result_footer_rtl(result, loop.index) -}}
{% else %}
{{- result_footer(result, loop.index) -}}
{%- endif -%}

View file

@ -1,23 +0,0 @@
{% from 'oscar/macros.html' import draw_favicon, icon, result_header, result_sub_header, result_footer_rtl, result_footer %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
<div class="container-fluid">
<div class="row">
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail col-xs-6 col-sm-3 col-md-3 result-content" src="{{ image_proxify(result.thumbnail) }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
<p class="col-xs-12 col-sm-9 col-md-9 result-content">
{% if result.price %}<big>{{ result.price|safe }}</big></br>{% endif %}
{% if result.shipping %}<small>{{ result.shipping|safe }}</small></br>{% endif %}
{% if result.source_country %}<small>{{ result.source_country|safe }}</small></br>{% endif %}
{% if result.content %}{{ result.content|safe }}{% endif %}
{% if result.has_stock is defined %}<br>{% if result.has_stock %}{{ icon('check', _('Has stock')) }}{% else %}{{ icon('alert', _('Out of stock')) }}{% endif %}{% endif %}
</p>
</div>
</div>
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}

View file

@ -1,25 +0,0 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{- result_header(result, favicons, loop.index) -}}
{{- result_sub_header(result, loop.index) -}}
{%- if result.seed is defined %}<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>{% endif -%}
{%- if result.filesize %}<br />{{ 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>{% endif -%}
{%- if result.files %}<br />{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span>{% endif -%}
{%- if result.content %}<br />{{ result.content|safe }}{% endif -%}
</p>
{%- if rtl -%}
{{ result_footer_rtl(result, loop.index) }}
{%- else -%}
{{ result_footer(result, loop.index) }}
{%- endif -%}

View file

@ -1,29 +0,0 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{- result_header(result, favicons, loop.index) -}}
{{- result_sub_header(result, loop.index) -}}
{%- if result.embedded -%}
<small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}" aria-labelledby="result-{{loop.index}}">{{ icon('film') }} {{ _('show video') }}</a></small>
{%- endif -%}
{%- if result.embedded -%}
<div id="result-video-{{ index }}" class="collapse">
{{- result.embedded|safe -}}
</div>
{%- endif -%}
<div class="container-fluid">{{- "" -}}
<div class="row">{{- "" -}}
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ image_proxify(result.thumbnail) }}" aria-labelledby="result-{{loop.index}}" /></a>
{%- if result.author %}<p class="col-xs-12 col-sm-8 col-md-8 result-content"><b>{{ _('Author') }}</b>: {{ result.author }}</p>{% endif -%}
{%- if result.length %}<p class="col-xs-12 col-sm-8 col-md-8 result-content"><b>{{ _('Length') }}</b>: {{ result.length }}</p>{% endif -%}
{%- if result.content %}<p class="col-xs-12 col-sm-8 col-md-8 result-content">{{ result.content|safe }}</p>{% endif -%}
</div>{{- "" -}}
</div>
{%- if rtl -%}
{{ result_footer_rtl(result, loop.index) }}
{%- else -%}
{{ result_footer(result, loop.index) }}
{%- endif -%}

View file

@ -1,187 +0,0 @@
{% extends "oscar/base.html" %}
{% macro search_form_attrs(pageno) -%}
{%- for category in selected_categories -%}<input type="hidden" name="category_{{ category }}" value="1"/>{%- endfor -%}
<input type="hidden" name="q" value="{{ q|e }}" />{{- "" -}}
<input type="hidden" name="pageno" value="{{ pageno }}" />{{- "" -}}
<input type="hidden" name="time_range" value="{{ time_range }}" />{{- "" -}}
<input type="hidden" name="language" value="{{ current_language }}" />{{- "" -}}
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" />{% endif -%}
{%- endmacro %}
{% 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 %}
{%- macro search_url() %}{{ url_for('search', _external=True) }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if time_range %}&amp;time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&amp;language={{ current_language }}{% endif %}{% endmacro -%}
{% block title %}{{ q|e }} - {% endblock %}
{% block meta %}{{" "}}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ search_url() }}&amp;format=rss">{% endblock %}
{% block content %}
{% include 'oscar/search.html' %}
<div class="row">
<div class="col-sm-4 col-sm-push-8" id="sidebar_results">
{% 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' %}{{- "\n\n" -}}
{% endfor %}
{%- endif %}
{% if suggestions %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ _('Suggestions') }}</h4>
</div>
<div class="panel-body">
{% for suggestion in suggestions %}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
{% if current_language != 'all' %}
<input type="hidden" name="language" value="{{ current_language }}">
{% endif %}
{% if time_range %}
<input type="hidden" name="time_range" value="{{ time_range }}">
{% endif %}
<input type="hidden" name="q" value="{{ suggestion.url }}">
<button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button>
</form>
{% endfor %}
</div>
</div>
{%- endif %}
<div class="panel panel-default hidden-xs">
<div class="panel-heading">{{- "" -}}
<h4 class="panel-title">{{ _('Links') }}</h4>{{- "" -}}
</div>
<div class="panel-body">
<form role="form">{{- "" -}}
<div class="form-group">{{- "" -}}
<label for="search_url">{{ _('Search URL') }}</label>{{- "" -}}
<input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ search_url() }}" readonly>{{- "" -}}
</div>{{- "" -}}
</form>
<label>{{ _('Download results') }}</label>
<div class="clearfix"></div>
{% for output_type in ('csv', 'json', 'rss') %}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
{{- search_form_attrs(pageno) -}}
<input type="hidden" name="format" value="{{ output_type }}">{{- "" -}}
<button type="submit" class="btn btn-default">{{ output_type }}</button>{{- "" -}}
</form>
{% endfor %}
<div class="clearfix"></div>
<br /><label><a href="{{ search_url() }}&amp;format=rss">{{ _('RSS subscription') }}</a></label>
<div class="clearfix"></div>
</div>
</div>
</div><!-- /#sidebar_results -->
<div class="col-sm-8 col-sm-pull-4" id="main_results">
<h1 class="sr-only">{{ _('Search results') }}</h1>
{% if corrections -%}
<div class="result">
<div class="clearfix">
<span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
{% for correction in corrections -%}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="navigation" class="form-inline pull-left suggestion_item">{{- "" -}}
{% if current_language != 'all' %}
<input type="hidden" name="language" value="{{ current_language }}">
{% endif %}
{% if time_range %}
<input type="hidden" name="time_range" value="{{ time_range }}">
{% endif %}
<input type="hidden" name="q" value="{{ correction.url }}">{{- "" -}}
<button type="submit" class="btn btn-default btn-xs">{{ correction.title }}</button>{{- "" -}}
</form>
{% endfor %}
</div>
</div>
{%- endif %}
{% if answers -%}
{%- for answer in answers.values() %}
<div class="result well">
{% if answer.url %}
<a href="{{ answer.url }}">{{ answer.answer }}</a>
{% else %}
<span>{{ answer.answer }}</span>
{% endif %}
</div>
{%- endfor %}
{%- endif %}
{% for result in results -%}
<div class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
{%- set index = loop.index -%}
{%- if result.template -%}
{% include get_result_template('oscar', result['template']) %}
{%- else -%}
{% include 'oscar/result_templates/default.html' %}
{%- endif -%}
</div>
{% endfor %}
{% if not results and not answers -%}
{% include 'oscar/messages/no_results.html' %}
{% endif %}
<div class="clearfix"></div>
{% if paging -%}
{% if rtl %}
<div id="pagination">
<div class="pull-left">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno+1) -}}
{{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
<div class="pull-right">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno-1) -}}
{{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
</div><!-- /#pagination -->
<div class="clearfix"></div>
{% else %}
<div id="pagination">
<div class="pull-left">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno-1) -}}
{{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-backward"></span> {{ _('previous page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
<div class="pull-right">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno+1) -}}
{{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
</div><!-- /#pagination -->
<div class="clearfix"></div>
{% endif %}
{% endif %}
</div><!-- /#main_results -->
</div>
{% endblock %}

View file

@ -1,25 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" id="search_form" role="search">
<div class="row">
<div class="col-xs-12 col-md-8">
<div class="input-group search-margin">
<input type="search" {% if autofocus %}autofocus{% endif %} name="q" class="form-control" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
<span class="input-group-btn">
<button type="submit" class="btn btn-default" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
<button type="button" id="clear_search" class="btn btn-default hide_if_nojs" aria-label="{{ _('Clear search') }}">{{ icon('remove') }}</button>
</span>
</div>
</div>
<div class="col-xs-6 col-md-2 search-margin">
{%- include 'oscar/time-range.html' -%}
</div>
<div class="col-xs-6 col-md-2 search-margin">
{%- include 'oscar/languages.html' -%}
</div>
</div>
<div class="row">
<div class="col-sm-12">
{%- include 'oscar/categories.html' -%}
</div>
</div>
</form><!-- / #search_form_full -->

View file

@ -1,19 +0,0 @@
{% from 'oscar/macros.html' import icon %}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" id="search_form" role="search">
{% if rtl %}
<div class="input-group">
{% else %}
<div class="input-group col-md-8 col-md-offset-2">
{% endif %}
<input type="search" autofocus name="q" class="form-control input-lg autofocus" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
<span class="input-group-btn">
<button type="submit" class="btn btn-default input-lg" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
<button type="reset" class="btn btn-default input-lg" aria-label="{{ _('Clear search') }}"><span class="hide_if_nojs">{{ icon('remove') }}</span><span class="hidden active_if_nojs">{{ _('Clear') }}</span></button>
</span>
</div>
<div class="col-md-8 col-md-offset-2 advanced">
{% include 'oscar/advanced.html' %}
</div>
</form><!-- / #search_form_full -->

View file

@ -1,33 +0,0 @@
{% extends "oscar/base.html" %}
{% block title %}{{ _('stats') }} - {% endblock %}
{% block content %}
<div class="container-fluid">
<h1>{{ _('Engine stats') }}</h1>
<div class="row">
{% for stat_name,stat_category in stats %}
<div class="col-xs-12 col-sm-12 col-md-6">
<h3>{{ stat_name }}</h3>
<div class="container-fluid">
{% for engine in stat_category %}
<div class="row">
<div class="col-sm-4 col-md-4">{{ engine.name }}</div>
<div class="col-sm-8 col-md-8">
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{{ '%i'|format(engine.avg) }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ engine.percentage }}%;">
{{ '%.02f'|format(engine.avg) }}
</div>
</div>
</div>
</div>
{% endfor %}
{% if not stat_category %}
<div class="col-sm-12 col-md-12">
{% include 'oscar/messages/no_data_available.html' %}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View file

@ -1,19 +0,0 @@
{% from 'oscar/macros.html' import custom_select_class %}
<label class="visually-hidden" for="time-range">{{ _('Time range') }}</label>
<select name="time_range" id="time-range" class="{{ custom_select_class(rtl) }} form-control" accesskey="t">{{- "" -}}
<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>