forked from zaclys/searxng
Merge branch 'master' into blog-dev-in-lxc
This commit is contained in:
commit
bdd24a6e71
96
README.rst
96
README.rst
@ -1,63 +1,73 @@
|
||||
searx
|
||||
=====
|
||||
.. SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
A privacy-respecting, hackable `metasearch
|
||||
engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__.
|
||||
.. figure:: https://raw.githubusercontent.com/asciimoo/searx/master/searx/static/themes/oscar/img/logo_searx_a.png
|
||||
:target: https://asciimoo.github.io/searx/
|
||||
:alt: searX
|
||||
:width: 100%
|
||||
:align: center
|
||||
|
||||
Pronunciation: səːks
|
||||
|
||||
List of `running
|
||||
instances <https://searx.space/>`__.
|
||||
|
||||
See the `documentation <https://asciimoo.github.io/searx>`__ and the `wiki <https://github.com/asciimoo/searx/wiki>`__ for more information.
|
||||
-------
|
||||
|
||||
|searx install|
|
||||
|searx homepage|
|
||||
|searx wiki|
|
||||
|AGPL License|
|
||||
|Issues|
|
||||
|commits|
|
||||
|OpenCollective searx backers|
|
||||
|OpenCollective searx sponsors|
|
||||
|
||||
Installation
|
||||
~~~~~~~~~~~~
|
||||
Privacy-respecting, hackable `metasearch engine`_ / *pronunciation* **səːks**.
|
||||
|
||||
With Docker
|
||||
-----------
|
||||
Go to the `searx-docker <https://github.com/searx/searx-docker>`__ project.
|
||||
.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
|
||||
|
||||
Without Docker
|
||||
--------------
|
||||
For all of the details, follow this `step by step installation <https://asciimoo.github.io/searx/admin/installation.html>`__.
|
||||
.. |searx install| image:: https://img.shields.io/badge/-install-blue
|
||||
:target: https://asciimoo.github.io/searx/admin/installation.html
|
||||
|
||||
Note: the documentation needs to be updated.
|
||||
.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue
|
||||
:target: https://asciimoo.github.io/searx
|
||||
|
||||
If you are in a hurry
|
||||
---------------------
|
||||
- clone the source:
|
||||
``git clone https://github.com/asciimoo/searx.git && cd searx``
|
||||
- install dependencies: ``./manage.sh update_packages``
|
||||
- edit your
|
||||
`settings.yml <https://github.com/asciimoo/searx/blob/master/searx/settings.yml>`__
|
||||
(set your ``secret_key``!)
|
||||
- run ``python searx/webapp.py`` to start the application
|
||||
.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue
|
||||
:target: https://github.com/asciimoo/searx/wiki
|
||||
|
||||
.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg
|
||||
:target: https://github.com/asciimoo/searx/blob/master/LICENSE
|
||||
|
||||
Bugs
|
||||
~~~~
|
||||
.. |Issues| image:: https://img.shields.io/github/issues/asciimoo/searx?color=yellow&label=issues
|
||||
:target: https://github.com/asciimoo/searx/issues
|
||||
|
||||
Bugs or suggestions? Visit the `issue
|
||||
tracker <https://github.com/asciimoo/searx/issues>`__.
|
||||
|
||||
`License <https://github.com/asciimoo/searx/blob/master/LICENSE>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
More about searx
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- `openhub <https://www.openhub.net/p/searx/>`__
|
||||
- `twitter <https://twitter.com/Searx_engine>`__
|
||||
- IRC: #searx @ freenode
|
||||
.. |PR| image:: https://img.shields.io/github/issues-pr-raw/asciimoo/searx?color=yellow&label=PR
|
||||
:target: https://github.com/asciimoo/searx/pulls
|
||||
|
||||
.. |commits| image:: https://img.shields.io/github/commit-activity/y/asciimoo/searx?color=yellow&label=commits
|
||||
:target: https://github.com/asciimoo/searx/commits/master
|
||||
|
||||
.. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg
|
||||
:target: https://opencollective.com/searx#backer
|
||||
|
||||
|
||||
.. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg
|
||||
:target: https://opencollective.com/searx#sponsor
|
||||
|
||||
|
||||
If you are looking for running instances, ready to use, then visit searx.space_.
|
||||
|
||||
Otherwise jump to the user_, admin_ and developer_ handbooks you will find on
|
||||
our homepage_.
|
||||
|
||||
.. _searx.space: https://searx.space
|
||||
.. _user: https://asciimoo.github.io/searx/user
|
||||
.. _admin: https://asciimoo.github.io/searx/admin
|
||||
.. _developer: https://asciimoo.github.io/searx/dev
|
||||
.. _homepage: https://asciimoo.github.io/searx
|
||||
|
||||
contact:
|
||||
openhub_ // twitter_ // IRC: #searx @ freenode
|
||||
|
||||
.. _openhub: https://www.openhub.net/p/searx
|
||||
.. _twitter: https://twitter.com/Searx_engine
|
||||
|
||||
-------
|
||||
|
||||
|gluten free|
|
||||
|
||||
.. |gluten free| image:: https://forthebadge.com/images/featured/featured-gluten-free.svg
|
||||
|
@ -13,7 +13,7 @@ Private engines
|
||||
To solve this issue private engines were introduced in :pull:`1823`.
|
||||
A new option was added to engines named `tokens`. It expects a list
|
||||
of strings. If the user making a request presents one of the tokens
|
||||
of an engine, he/she is able to access information about the engine
|
||||
of an engine, they can access information about the engine
|
||||
and make search requests.
|
||||
|
||||
Example configuration to restrict access to the Arch Linux Wiki engine:
|
||||
|
@ -81,7 +81,7 @@ Parameters
|
||||
Theme of instance.
|
||||
|
||||
Please note, available themes depend on an instance. It is possible that an
|
||||
instance administrator deleted, created or renamed themes on his/her instance.
|
||||
instance administrator deleted, created or renamed themes on their instance.
|
||||
See the available options in the preferences page of the instance.
|
||||
|
||||
``oscar-style`` : default ``logicodev``
|
||||
@ -91,7 +91,7 @@ Parameters
|
||||
``oscar``.
|
||||
|
||||
Please note, available styles depend on an instance. It is possible that an
|
||||
instance administrator deleted, created or renamed styles on his/her
|
||||
instance administrator deleted, created or renamed styles on their
|
||||
instance. See the available options in the preferences page of the instance.
|
||||
|
||||
``enabled_plugins`` : optional
|
||||
|
@ -44,9 +44,9 @@ hidden from visited result pages.
|
||||
What are the consequences of using public instances?
|
||||
----------------------------------------------------
|
||||
|
||||
If someone uses a public instance, he/she has to trust the administrator of that
|
||||
If someone uses a public instance, they have to trust the administrator of that
|
||||
instance. This means that the user of the public instance does not know whether
|
||||
his/her requests are logged, aggregated and sent or sold to a third party.
|
||||
their requests are logged, aggregated and sent or sold to a third party.
|
||||
|
||||
Also, public instances without proper protection are more vulnerable to abusing
|
||||
the search service, In this case the external service in exchange returns
|
||||
|
@ -33,7 +33,7 @@ supported_languages_url = 'https://search.yahoo.com/web/advanced'
|
||||
results_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' Sr ')]"
|
||||
url_xpath = './/h3/a/@href'
|
||||
title_xpath = './/h3/a'
|
||||
content_xpath = './/div[@class="compText aAbs"]'
|
||||
content_xpath = './/div[contains(@class, "compText")]'
|
||||
suggestion_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' AlsoTry ')]//a"
|
||||
|
||||
time_range_dict = {'day': ['1d', 'd'],
|
||||
|
@ -435,8 +435,8 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
|
||||
font-weight: bold;
|
||||
border-bottom: #01d7d4 5px solid;
|
||||
}
|
||||
#check-advanced {
|
||||
display: none;
|
||||
#check-advanced:focus + label {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#check-advanced:checked ~ #advanced-search-container {
|
||||
display: block;
|
||||
|
File diff suppressed because one or more lines are too long
@ -408,8 +408,8 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
|
||||
font-weight: bold;
|
||||
border-bottom: #01d7d4 5px solid;
|
||||
}
|
||||
#check-advanced {
|
||||
display: none;
|
||||
#check-advanced:focus + label {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#check-advanced:checked ~ #advanced-search-container {
|
||||
display: block;
|
||||
|
File diff suppressed because one or more lines are too long
@ -31,8 +31,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
#check-advanced {
|
||||
display: none;
|
||||
#check-advanced:focus + label {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#check-advanced:checked ~ #advanced-search-container {
|
||||
|
@ -59,12 +59,16 @@
|
||||
|
||||
<h2 id='add to browser'>How to set as the default search engine?</h2>
|
||||
|
||||
<dt>Firefox</dt>
|
||||
<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>
|
||||
|
||||
<dd>
|
||||
<a href="#" onclick="window.external.AddSearchProvider(window.location.protocol + '//' + window.location.host + '{{ url_for('opensearch') }}');">Install</a>
|
||||
searx as a search engine on any version of Firefox! (javascript required)
|
||||
</dd>
|
||||
<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 Egde</a></li>
|
||||
<li>Chrome 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>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<input type="checkbox" name="advanced_search" id="check-advanced" {% if advanced_search %} checked="checked"{% endif %}>
|
||||
<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') -}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% from 'oscar/macros.html' import icon %}
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" />
|
||||
@ -8,7 +8,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="searx/{{ searx_version }}">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" />
|
||||
{% block meta %}{% endblock %}
|
||||
<script src="{{ url_for('js_translations') }}"></script>
|
||||
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
|
||||
@ -42,7 +42,7 @@
|
||||
<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:none !important;}
|
||||
.hide_if_nojs {display: none !important;overflow: hidden !important;}
|
||||
.disabled_if_nojs {pointer-events: none; cursor: default; text-decoration: line-through;}
|
||||
</style>
|
||||
</noscript>
|
||||
|
@ -6,10 +6,10 @@
|
||||
{% 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 %}
|
||||
<h1 class="text-hide center-block" id="main-logo">
|
||||
<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
|
||||
</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<label class="visually-hidden" for="language">{{ _('Language') }}</label>
|
||||
<select class="language custom-select form-control" 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) -%}
|
||||
|
@ -8,34 +8,34 @@
|
||||
<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>
|
||||
{%- 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) -%}
|
||||
<h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe) }}{% else %}{{ result.title|safe}}{% endif %}</h4>
|
||||
{% 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) -%}
|
||||
{% macro result_sub_header(result, id) -%}
|
||||
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
|
||||
{% if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %}
|
||||
{% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %}
|
||||
{% if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif %}
|
||||
{% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
<!-- Draw result footer -->
|
||||
{% macro result_footer(result) -%}
|
||||
{% 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 -%}
|
||||
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
|
||||
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
|
||||
{%- endif -%}
|
||||
{%- if proxify -%}
|
||||
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
|
||||
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- if result.pretty_url -%}
|
||||
@ -44,31 +44,31 @@
|
||||
{%- endmacro %}
|
||||
|
||||
<!-- Draw result footer -->
|
||||
{% macro result_footer_rtl(result) -%}
|
||||
{% 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 -%}
|
||||
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
|
||||
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
|
||||
{%- endif -%}
|
||||
{% if proxify -%}
|
||||
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
|
||||
<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 %}
|
||||
|
||||
{% macro preferences_item_header(info, label, rtl) -%}
|
||||
{% 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">{{ label }}</label>
|
||||
<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">{{ label }}</label>
|
||||
<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 %}
|
||||
|
@ -30,9 +30,9 @@
|
||||
<div class="col-sm-11 col-md-10">
|
||||
{% include 'oscar/categories.html' %}
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
|
||||
<label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
|
||||
{% else %}
|
||||
<label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
|
||||
<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>
|
||||
@ -40,14 +40,14 @@
|
||||
</div>
|
||||
{% set language_label = _('Search language') %}
|
||||
{% set language_info = _('What language do you prefer for search?') %}
|
||||
{{ preferences_item_header(language_info, language_label, rtl) }}
|
||||
{{ preferences_item_header(language_info, language_label, rtl, 'language') }}
|
||||
{% include 'oscar/languages.html' %}
|
||||
{{ preferences_item_footer(language_info, language_label, rtl) }}
|
||||
|
||||
{% set locale_label = _('Interface language') %}
|
||||
{% set locale_info = _('Change the language of the layout') %}
|
||||
{{ preferences_item_header(locale_info, locale_label, rtl) }}
|
||||
<select class="form-control" name='locale'>
|
||||
{{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
|
||||
<select class="form-control" 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 %}
|
||||
@ -56,8 +56,8 @@
|
||||
|
||||
{% set autocomplete_label = _('Autocomplete') %}
|
||||
{% set autocomplete_info = _('Find stuff as you type') %}
|
||||
{{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }}
|
||||
<select class="form-control" name="autocomplete">
|
||||
{{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
|
||||
<select class="form-control" name="autocomplete" id="autocomplete">
|
||||
<option value=""> - </option>
|
||||
{% for backend in autocomplete_backends %}
|
||||
<option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
|
||||
@ -67,8 +67,8 @@
|
||||
|
||||
{% 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) }}
|
||||
<select class="form-control" name='image_proxy'>
|
||||
{{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
|
||||
<select class="form-control" 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>
|
||||
@ -76,8 +76,8 @@
|
||||
|
||||
{% set method_label = _('Method') %}
|
||||
{% set method_info = _('Change how forms are submited, <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) }}
|
||||
<select class="form-control" name='method'>
|
||||
{{ preferences_item_header(method_info, method_label, rtl, 'method') }}
|
||||
<select class="form-control" 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>
|
||||
@ -85,8 +85,8 @@
|
||||
|
||||
{% set safesearch_label = _('SafeSearch') %}
|
||||
{% set safesearch_info = _('Filter content') %}
|
||||
{{ preferences_item_header(safesearch_info, safesearch_label, rtl) }}
|
||||
<select class="form-control" name='safesearch'>
|
||||
{{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
|
||||
<select class="form-control" 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>
|
||||
@ -95,16 +95,16 @@
|
||||
|
||||
{% set theme_label = _('Themes') %}
|
||||
{% set theme_info = _('Change searx layout') %}
|
||||
{{ preferences_item_header(theme_info, theme_label, rtl) }}
|
||||
<select class="form-control" name="theme">
|
||||
{{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
|
||||
<select class="form-control" 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) }}
|
||||
|
||||
{{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl) }}
|
||||
<select class="form-control" name='oscar-style'>
|
||||
{{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
|
||||
<select class="form-control" 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>
|
||||
@ -113,8 +113,8 @@
|
||||
|
||||
{% set label = _('Results on new tabs') %}
|
||||
{% set info = _('Open result links on new browser tabs') %}
|
||||
{{ preferences_item_header(info, label, rtl) }}
|
||||
<select class="form-control" name='results_on_new_tab'>
|
||||
{{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
|
||||
<select class="form-control" 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>
|
||||
@ -122,8 +122,8 @@
|
||||
|
||||
{% 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'>
|
||||
{{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
|
||||
<select class="form-control" 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_name == current_doi_resolver %}selected="selected"{% endif %}>
|
||||
{{ doi_resolver_name }} - {{ doi_resolver_url }}
|
||||
@ -134,8 +134,8 @@
|
||||
|
||||
{% set label = _('Engine tokens') %}
|
||||
{% set info = _('Access tokens for private engines') %}
|
||||
{{ preferences_item_header(info, label, rtl) }}
|
||||
<input class="form-control" id='tokens' name='tokens' value='{{ preferences.tokens.get_value() }}'/>
|
||||
{{ 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>
|
||||
@ -173,23 +173,23 @@
|
||||
<table class="table table-hover table-condensed table-striped">
|
||||
<tr>
|
||||
{% if not rtl %}
|
||||
<th>{{ _("Allow") }}</th>
|
||||
<th>{{ _("Engine name") }}</th>
|
||||
<th>{{ _("Shortcut") }}</th>
|
||||
<th>{{ _("Selected language") }}</th>
|
||||
<th>{{ _("SafeSearch") }}</th>
|
||||
<th>{{ _("Time range") }}</th>
|
||||
<th>{{ _("Avg. time") }}</th>
|
||||
<th>{{ _("Max time") }}</th>
|
||||
<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 class="text-right">{{ _("Max time") }}</th>
|
||||
<th class="text-right">{{ _("Avg. time") }}</th>
|
||||
<th class="text-right">{{ _("Time range") }}</th>
|
||||
<th class="text-right">{{ _("SafeSearch") }}</th>
|
||||
<th class="text-right">{{ _("Selected language") }}</th>
|
||||
<th class="text-right">{{ _("Shortcut") }}</th>
|
||||
<th class="text-right">{{ _("Engine name") }}</th>
|
||||
<th class="text-right">{{ _("Allow") }}</th>
|
||||
<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] %}
|
||||
@ -199,21 +199,21 @@
|
||||
<td class="onoff-checkbox">
|
||||
{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
|
||||
</td>
|
||||
<th>{{ search_engine.name }}</th>
|
||||
<th scope="row">{{ 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 '' }}">{{ '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 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>{{ search_engine.name }}</th>
|
||||
<th scope="row">{{ search_engine.name }}</th>
|
||||
<td class="onoff-checkbox">
|
||||
{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
|
||||
</td>
|
||||
@ -241,7 +241,7 @@
|
||||
<h3 class="panel-title">{{ _(plugin.name) }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-xs-6 col-sm-4 col-md-6">{{ _(plugin.description) }}</div>
|
||||
<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) }}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
|
||||
{% 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 %}>{{ result.repository }}</a></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 }}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% 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) -}}
|
||||
{{- result_header(result, favicons, loop.index) -}}
|
||||
{{- result_sub_header(result, loop.index) -}}
|
||||
|
||||
{%- if result.embedded -%}
|
||||
<small> • <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') }}">{{ icon('music') }} {{ _('show media') }}</a></small>
|
||||
<small> • <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 -%}
|
||||
@ -16,7 +16,7 @@
|
||||
{%- 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">
|
||||
<img src="{{ image_proxify(result.img_src) }}" 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>
|
||||
@ -25,7 +25,7 @@
|
||||
{%- endif -%}
|
||||
|
||||
{%- if rtl -%}
|
||||
{{ result_footer_rtl(result) }}
|
||||
{{ result_footer_rtl(result, loop.index) }}
|
||||
{%- else -%}
|
||||
{{ result_footer(result) }}
|
||||
{{ result_footer(result, loop.index) }}
|
||||
{%- endif -%}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{%- from 'oscar/macros.html' import draw_favicon -%}
|
||||
{%- 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}}">{{- "" -}}
|
||||
<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">{{- "" -}}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
|
||||
|
||||
{{ result_header(result, favicons) }}
|
||||
{{ result_sub_header(result) }}
|
||||
{{ result_header(result, favicons, loop.index) }}
|
||||
{{ result_sub_header(result, loop.index) }}
|
||||
|
||||
{% if (result.latitude and result.longitude) or result.boundingbox %}
|
||||
<small> • <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></small>
|
||||
@ -66,7 +66,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if rtl %}
|
||||
{{ result_footer_rtl(result) }}
|
||||
{{ result_footer_rtl(result, loop.index) }}
|
||||
{% else %}
|
||||
{{ result_footer(result) }}
|
||||
{{ result_footer(result, loop.index) }}
|
||||
{% endif %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
|
||||
|
||||
{{ result_header(result, favicons) }}
|
||||
{{ result_sub_header(result) }}
|
||||
{{ 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> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>{% endif %}
|
||||
{% if result.filesize %}<br />{{ icon('floppy-disk') }} {{ _('Filesize') }}
|
||||
@ -19,7 +19,7 @@
|
||||
</p>
|
||||
|
||||
{% if rtl %}
|
||||
{{ result_footer_rtl(result) }}
|
||||
{{ result_footer_rtl(result, loop.index) }}
|
||||
{% else %}
|
||||
{{ result_footer(result) }}
|
||||
{{ result_footer(result, loop.index) }}
|
||||
{% endif %}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
|
||||
|
||||
{{ result_header(result, favicons) }}
|
||||
{{ result_sub_header(result) }}
|
||||
{{ result_header(result, favicons, loop.index) }}
|
||||
{{ result_sub_header(result, loop.index) }}
|
||||
|
||||
{% if result.embedded %}
|
||||
<small> • <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') }}">{{ icon('film') }} {{ _('show video') }}</a></small>
|
||||
<small> • <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 %}
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
<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) }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
|
||||
<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 %}
|
||||
@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
{% if rtl %}
|
||||
{{ result_footer_rtl(result) }}
|
||||
{{ result_footer_rtl(result, loop.index) }}
|
||||
{% else %}
|
||||
{{ result_footer(result) }}
|
||||
{{ result_footer(result, loop.index) }}
|
||||
{% endif %}
|
||||
|
@ -1,3 +1,4 @@
|
||||
<label class="visually-hidden" for="time-range">{{ _('Time range') }}</label>
|
||||
<select name="time_range" id="time-range" class="custom-select form-control" accesskey="t">{{- "" -}}
|
||||
<option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
|
||||
{{- _('Anytime') -}}
|
||||
|
Loading…
Reference in New Issue
Block a user