diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2020-04-29 12:55:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-29 12:55:13 +0000 |
| commit | 4bae1a9eabd33ee095002c0392d26c45e8319159 (patch) | |
| tree | 43601cb54beca64d63457f66a46b1633ffb522c6 /searx/templates | |
| parent | ceceee546b5273d9a1ebce6638ab98c7c34ed58f (diff) | |
| parent | 7342806987aec05c50f12e149683609640ba66a0 (diff) | |
Merge branch 'master' into fix/manage.sh
Diffstat (limited to 'searx/templates')
| -rw-r--r-- | searx/templates/__common__/about.html | 138 | ||||
| -rw-r--r-- | searx/templates/__common__/opensearch_response_rss.xml | 24 | ||||
| -rw-r--r-- | searx/templates/courgette/github_ribbon.html | 2 | ||||
| -rw-r--r-- | searx/templates/oscar/base.html | 8 | ||||
| -rw-r--r-- | searx/templates/oscar/infobox.html | 2 | ||||
| -rw-r--r-- | searx/templates/oscar/preferences.html | 6 | ||||
| -rw-r--r-- | searx/templates/oscar/results.html | 124 | ||||
| -rw-r--r-- | searx/templates/oscar/search.html | 1 | ||||
| -rw-r--r-- | searx/templates/oscar/search_full.html | 1 | ||||
| -rw-r--r-- | searx/templates/simple/base.html | 6 |
10 files changed, 189 insertions, 123 deletions
diff --git a/searx/templates/__common__/about.html b/searx/templates/__common__/about.html index bf1733359..d3e8d06a6 100644 --- a/searx/templates/__common__/about.html +++ b/searx/templates/__common__/about.html @@ -1,63 +1,97 @@ <div{% if rtl %} dir="ltr"{% endif %}> - <h1>About <a href="{{ url_for('index') }}">searx</a></h1> + <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> - <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/asciimoo/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> + <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> -<h2>Technical details - How does it work?</h2> + <p>More about searx ...</p> -<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>.<br /> -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 chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, searx uses the search bar to perform GET requests.<br /> -Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. -</p> - -<h2>How can I make it my own?</h2> - -<p>Searx appreciates your concern regarding logs, so take the <a href="https://github.com/asciimoo/searx">code</a> and run it yourself! <br />Add your Searx to this <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">list</a> to help other people reclaim their privacy and make the Internet freer! -<br />The more decentralized the Internet is, the more freedom we have!</p> - - -<h2>More about searx</h2> - -<ul> + <ul> <li><a href="https://github.com/asciimoo/searx">github</a></li> - <li><a href="https://www.ohloh.net/p/searx/">ohloh</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 id="faq">FAQ</h2> - -<h3>How to add to firefox?</h3> -<p><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)</p> - -<h2 id="dev_faq">Developer FAQ</h2> - -<h3>New engines?</h3> -<ul> - <li>Edit your <a href="https://raw.github.com/asciimoo/searx/master/searx/settings.yml">settings.yml</a></li> - <li>Create your custom engine module, check the <a href="https://github.com/asciimoo/searx/blob/master/examples/basic_engine.py">example engine</a></li> -</ul> -<p>Don't forget to restart searx after config edit!</p> - -<h3>Installation/WSGI support?</h3> -<p>See the <a href="https://github.com/asciimoo/searx/wiki/Installation">installation and setup</a> wiki page</p> - -<h3>How to debug engines?</h3> -<p><a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.</p> + </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/asciimoo/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 chrome*). Therefore they show up in neither our + logs, nor your url history. In case of Chrome* 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> + + <dt>Firefox</dt> + + <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> + + <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/asciimoo/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 %} diff --git a/searx/templates/__common__/opensearch_response_rss.xml b/searx/templates/__common__/opensearch_response_rss.xml index 32c42e7c7..3781dd87c 100644 --- a/searx/templates/__common__/opensearch_response_rss.xml +++ b/searx/templates/__common__/opensearch_response_rss.xml @@ -25,5 +25,29 @@ {% 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> diff --git a/searx/templates/courgette/github_ribbon.html b/searx/templates/courgette/github_ribbon.html index 67c6e678f..bdd9cf180 100644 --- a/searx/templates/courgette/github_ribbon.html +++ b/searx/templates/courgette/github_ribbon.html @@ -1,3 +1,3 @@ <a href="https://github.com/asciimoo/searx" class="github"> <img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ url_for('static', filename='img/github_ribbon.png') }}" alt="Fork me on GitHub" class="github"/> -</a>
\ No newline at end of file +</a> diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 66a9e6029..5eb4462e4 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -85,10 +85,10 @@ {% endblock %} <p class="text-muted"> <small> - {{ _('Powered by') }} <a href="https://asciimoo.github.io/searx/">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> - <a href="https://github.com/asciimoo/searx">{{ _('Source code') }}</a> | - <a href="https://github.com/asciimoo/searx/issues">{{ _('Issue tracker') }}</a> | - <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">{{ _('Public instances') }}</a> + {{ _('Powered by') }} <a href="{{ brand.DOCS_URL }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> + <a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> | + <a href="{{ brand.ISSUE_URL }}">{{ _('Issue tracker') }}</a> | + <a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a> </small> </p> </div> diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html index 9f5e58d2b..9802f11e2 100644 --- a/searx/templates/oscar/infobox.html +++ b/searx/templates/oscar/infobox.html @@ -6,7 +6,7 @@ <div class="panel-body"> {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %} - {% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content }}</p></bdi>{% 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"> diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 1a484dd4b..b03929df3 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -131,6 +131,12 @@ {% endfor %} </select> {{ preferences_item_footer(info, label, rtl) }} + + {% 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_footer(info, label, rtl) }} </div> </fieldset> </div> diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 9cf942695..43e3e26d9 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -15,7 +15,68 @@ {% include 'oscar/search.html' %} <div class="row"> - <div class="col-sm-8" id="main_results"> + <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('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item"> + <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"> + <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('index') }}" 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> + </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 -%} @@ -91,66 +152,5 @@ {% endif %} {% endif %} </div><!-- /#main_results --> - - <div class="col-sm-4" 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('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item"> - <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"> - <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('index') }}" 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> - </div> - </div> - </div><!-- /#sidebar_results --> </div> {% endblock %} diff --git a/searx/templates/oscar/search.html b/searx/templates/oscar/search.html index cad9eca89..9978801ca 100644 --- a/searx/templates/oscar/search.html +++ b/searx/templates/oscar/search.html @@ -6,6 +6,7 @@ <input type="search" 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="reset" class="btn btn-default" aria-label="{{ _('Clear search') }}"><span class="hide_if_nojs">{{ icon('remove') }}</span><span class="hidden active_if_nojs">{{ _('Clear') }}</span></button> </span> </div> </div> diff --git a/searx/templates/oscar/search_full.html b/searx/templates/oscar/search_full.html index 656463178..ea821dc45 100644 --- a/searx/templates/oscar/search_full.html +++ b/searx/templates/oscar/search_full.html @@ -9,6 +9,7 @@ <input type="search" 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"> diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index 92597b654..71df123ea 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -51,9 +51,9 @@ <footer> <p> {{ _('Powered by') }} <a href="{{ url_for('about') }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> - <a href="https://github.com/asciimoo/searx">{{ _('Source code') }}</a> | - <a href="https://github.com/asciimoo/searx/issues">{{ _('Issue tracker') }}</a> | - <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">{{ _('Public instances') }}</a> + <a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> | + <a href="{{ brand.ISSUE_URL }}">{{ _('Issue tracker') }}</a> | + <a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a> </p> </footer> <!--[if gte IE 9]>--> |