diff options
Diffstat (limited to 'searx/templates')
54 files changed, 260 insertions, 179 deletions
diff --git a/searx/templates/courgette/404.html b/searx/templates/courgette/404.html new file mode 100644 index 000000000..77f1287ab --- /dev/null +++ b/searx/templates/courgette/404.html @@ -0,0 +1,9 @@ +{% extends "courgette/base.html" %} +{% block content %} +<div class="center"> + <h1>{{ _('Page not found') }}</h1> + {% autoescape false %} + <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p> + {% endautoescape %} +</div> +{% endblock %} diff --git a/searx/templates/courgette/about.html b/searx/templates/courgette/about.html index 2945e1f7b..faa7b6138 100644 --- a/searx/templates/courgette/about.html +++ b/searx/templates/courgette/about.html @@ -6,20 +6,20 @@ <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> + <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> + <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> + 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="http://seeks-project.info/">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 /> +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> diff --git a/searx/templates/courgette/base.html b/searx/templates/courgette/base.html index 276fae870..8e272585c 100644 --- a/searx/templates/courgette/base.html +++ b/searx/templates/courgette/base.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}> <head> <meta charset="UTF-8" /> - <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" /> + <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" /> <meta name="keywords" content="searx, search, search engine, metasearch, meta search" /> <meta name="generator" content="searx/{{ searx_version }}"> <meta name="referrer" content="no-referrer"> @@ -22,7 +22,7 @@ {% endblock %} {% block meta %}{% endblock %} {% block head %} - <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/> + <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/> {% endblock %} <script type="text/javascript"> searx = {}; diff --git a/searx/templates/courgette/opensearch_response_rss.xml b/searx/templates/courgette/opensearch_response_rss.xml index 5673eb2e1..ddb60fa5e 100644 --- a/searx/templates/courgette/opensearch_response_rss.xml +++ b/searx/templates/courgette/opensearch_response_rss.xml @@ -3,14 +3,14 @@ xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> - <title>Searx search: {{ q }}</title> - <link>{{ base_url }}?q={{ q }}</link> - <description>Search results for "{{ q }}" - searx</description> + <title>Searx search: {{ q|e }}</title> + <link>{{ base_url }}?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="{{ base_url }}opensearch.xml"/> - <opensearch:Query role="request" searchTerms="{{ q }}" startPage="1" /> + <opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" /> {% for r in results %} <item> <title>{{ r.title }}</title> diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html index 726f305cb..953617e84 100644 --- a/searx/templates/courgette/result_templates/code.html +++ b/searx/templates/courgette/result_templates/code.html @@ -1,8 +1,8 @@ <div class="result {{ result.class }}">
- <h3 class="result_title">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3>
+ <h3 class="result_title">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
<p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
- {% if result.repository %}<p class="content"><a href="{{ result.repository|safe }}" rel="noreferrer">{{ result.repository }}</a></p>{% endif %}
+ {% if result.repository %}<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
<div dir="ltr">
{{ result.codelines|code_highlighter(result.code_language)|safe }}
</div>
diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html index 585ecf3f5..5f2ead63f 100644 --- a/searx/templates/courgette/result_templates/default.html +++ b/searx/templates/courgette/result_templates/default.html @@ -5,7 +5,7 @@ {% endif %} <div> - <h3 class="result_title"><a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> + <h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %} <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p> <p class="url">{{ result.pretty_url }}‎</p> diff --git a/searx/templates/courgette/result_templates/images.html b/searx/templates/courgette/result_templates/images.html index 87fc7744c..49acb3b61 100644 --- a/searx/templates/courgette/result_templates/images.html +++ b/searx/templates/courgette/result_templates/images.html @@ -1,6 +1,6 @@ <div class="image_result"> <p> - <a href="{{ result.img_src }}" rel="noreferrer"><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> - <span class="url"><a href="{{ result.url }}" rel="noreferrer" class="small_font">{{ _('original context') }}</a></span> + <a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> + <span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span> </p> </div> diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html index 585ecf3f5..5f2ead63f 100644 --- a/searx/templates/courgette/result_templates/map.html +++ b/searx/templates/courgette/result_templates/map.html @@ -5,7 +5,7 @@ {% endif %} <div> - <h3 class="result_title"><a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> + <h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %} <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p> <p class="url">{{ result.pretty_url }}‎</p> diff --git a/searx/templates/courgette/result_templates/torrent.html b/searx/templates/courgette/result_templates/torrent.html index 33b574244..2fd8395ad 100644 --- a/searx/templates/courgette/result_templates/torrent.html +++ b/searx/templates/courgette/result_templates/torrent.html @@ -2,12 +2,12 @@ {% if "icon_"~result.engine~".ico" in favicons %} <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" /> {% endif %} - <h3 class="result_title"><a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> + <h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> {% if result.content %}<span class="content">{{ result.content|safe }}</span><br />{% endif %} <span class="stats">{{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }}</span><br /> <span> {% if result.magnetlink %}<a href="{{ result.magnetlink }}" class="magnetlink">{{ _('magnet link') }}</a>{% endif %} - {% if result.torrentfile %}<a href="{{ result.torrentfile }}" class="torrentfile" rel="noreferrer">{{ _('torrent file') }}</a>{% endif %} + {% if result.torrentfile %}<a href="{{ result.torrentfile }}" class="torrentfile" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('torrent file') }}</a>{% endif %} </span> <p class="url">{{ result.pretty_url }}‎</p> </div> diff --git a/searx/templates/courgette/result_templates/videos.html b/searx/templates/courgette/result_templates/videos.html index ceed8b28f..b3e19e024 100644 --- a/searx/templates/courgette/result_templates/videos.html +++ b/searx/templates/courgette/result_templates/videos.html @@ -3,8 +3,8 @@ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" /> {% endif %} - <h3 class="result_title"><a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> + <h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %} - <a href="{{ result.url }}" rel="noreferrer"><img width="400" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> + <a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img width="400" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> <p class="url">{{ result.pretty_url }}‎</p> </div> diff --git a/searx/templates/courgette/results.html b/searx/templates/courgette/results.html index 3ffbd5882..c72b7c3f7 100644 --- a/searx/templates/courgette/results.html +++ b/searx/templates/courgette/results.html @@ -1,6 +1,6 @@ {% extends "courgette/base.html" %} -{% block title %}{{ q }} - {% endblock %} -{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&format=rss&{% for category in selected_categories %}category_{{ category }}=1&{% endfor %}pageno={{ pageno }}">{% endblock %} +{% block title %}{{ q|e }} - {% endblock %} +{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&format=rss&{% for category in selected_categories %}category_{{ category }}=1&{% endfor %}pageno={{ pageno }}">{% endblock %} {% block content %} <div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>{{ _('preferences') }}</span></a></div> <div class="small search center"> @@ -17,7 +17,7 @@ {% for output_type in ('csv', 'json', 'rss') %} <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> <div class="left"> - <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="q" value="{{ q|e }}" /> <input type="hidden" name="format" value="{{ output_type }}" /> {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1"/> @@ -62,7 +62,7 @@ {% if pageno > 1 %} <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> <div class="left"> - <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="q" value="{{ q|e }}" /> {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1"/> {% endfor %} @@ -76,7 +76,7 @@ {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1"/> {% endfor %} - <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="q" value="{{ q|e }}" /> <input type="hidden" name="pageno" value="{{ pageno+1 }}" /> <input type="submit" value="{{ _('next page') }} >>" /> </div> diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/default/result_templates/images.html deleted file mode 100644 index d85f841ae..000000000 --- a/searx/templates/default/result_templates/images.html +++ /dev/null @@ -1,6 +0,0 @@ -<div class="image_result"> - <p> - <a href="{{ result.img_src }}" rel="noreferrer"><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a> - <span class="url"><a href="{{ result.url }}" rel="noreferrer" class="small_font">{{ _('original context') }}</a></span> - </p> -</div> diff --git a/searx/templates/legacy/404.html b/searx/templates/legacy/404.html new file mode 100644 index 000000000..05c14e155 --- /dev/null +++ b/searx/templates/legacy/404.html @@ -0,0 +1,9 @@ +{% extends "legacy/base.html" %} +{% block content %} +<div class="center"> + <h1>{{ _('Page not found') }}</h1> + {% autoescape false %} + <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p> + {% endautoescape %} +</div> +{% endblock %} diff --git a/searx/templates/default/about.html b/searx/templates/legacy/about.html index 1b5fc34c0..580321e47 100644 --- a/searx/templates/default/about.html +++ b/searx/templates/legacy/about.html @@ -1,25 +1,25 @@ -{% extends 'default/base.html' %} +{% extends 'legacy/base.html' %} {% block content %} -{% include 'default/github_ribbon.html' %} +{% include 'legacy/github_ribbon.html' %} <div class="row"{% 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> - <h2>Why use Searx?</h2> + <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> + <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> + 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="http://seeks-project.info/">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, if Searx used from the search bar it performs GET requests.<br /> +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, if searx used from the search bar it performs GET requests.<br /> Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. </p> diff --git a/searx/templates/default/base.html b/searx/templates/legacy/base.html index 143bdb8d2..da19741cb 100644 --- a/searx/templates/default/base.html +++ b/searx/templates/legacy/base.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}> <head> <meta charset="UTF-8" /> - <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" /> + <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" /> <meta name="keywords" content="searx, search, search engine, metasearch, meta search" /> <meta name="generator" content="searx/{{ searx_version }}"> <meta name="referrer" content="no-referrer"> @@ -17,7 +17,7 @@ {% endblock %} {% block meta %}{% endblock %} {% block head %} - <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/> + <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/> {% endblock %} </head> <body> diff --git a/searx/templates/default/categories.html b/searx/templates/legacy/categories.html index 1c466781b..1c466781b 100644 --- a/searx/templates/default/categories.html +++ b/searx/templates/legacy/categories.html diff --git a/searx/templates/default/github_ribbon.html b/searx/templates/legacy/github_ribbon.html index bdd9cf180..bdd9cf180 100644 --- a/searx/templates/default/github_ribbon.html +++ b/searx/templates/legacy/github_ribbon.html diff --git a/searx/templates/default/index.html b/searx/templates/legacy/index.html index fc15a44b6..de956d5b3 100644 --- a/searx/templates/default/index.html +++ b/searx/templates/legacy/index.html @@ -1,8 +1,8 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block content %} <div class="center"> <div class="title"><h1>searx</h1></div> - {% include 'default/search.html' %} + {% include 'legacy/search.html' %} <p class="top_margin"> {% if rtl %} <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a> @@ -13,6 +13,6 @@ {% endif %} </p> </div> -{% include 'default/github_ribbon.html' %} +{% include 'legacy/github_ribbon.html' %} {% endblock %} diff --git a/searx/templates/default/infobox.html b/searx/templates/legacy/infobox.html index ce26ac578..4dd25fabd 100644 --- a/searx/templates/default/infobox.html +++ b/searx/templates/legacy/infobox.html @@ -24,7 +24,7 @@ <div class="urls"> <ul> {% for url in infobox.urls %} - <li class="url"><bdi><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></bdi></li> + <li class="url"><bdi><a href="{{ url.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ url.title }}</a></bdi></li> {% endfor %} </ul> </div> diff --git a/searx/templates/default/opensearch.xml b/searx/templates/legacy/opensearch.xml index 15d3eb792..15d3eb792 100644 --- a/searx/templates/default/opensearch.xml +++ b/searx/templates/legacy/opensearch.xml diff --git a/searx/templates/default/opensearch_response_rss.xml b/searx/templates/legacy/opensearch_response_rss.xml index 5673eb2e1..ddb60fa5e 100644 --- a/searx/templates/default/opensearch_response_rss.xml +++ b/searx/templates/legacy/opensearch_response_rss.xml @@ -3,14 +3,14 @@ xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> - <title>Searx search: {{ q }}</title> - <link>{{ base_url }}?q={{ q }}</link> - <description>Search results for "{{ q }}" - searx</description> + <title>Searx search: {{ q|e }}</title> + <link>{{ base_url }}?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="{{ base_url }}opensearch.xml"/> - <opensearch:Query role="request" searchTerms="{{ q }}" startPage="1" /> + <opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" /> {% for r in results %} <item> <title>{{ r.title }}</title> diff --git a/searx/templates/default/preferences.html b/searx/templates/legacy/preferences.html index a47dba458..30d632c93 100644 --- a/searx/templates/default/preferences.html +++ b/searx/templates/legacy/preferences.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block head %} {% endblock %} {% block content %} <div class="row"> @@ -8,7 +8,7 @@ <fieldset> <legend>{{ _('Default categories') }}</legend> {% set display_tooltip = false %} - {% include 'default/categories.html' %} + {% include 'legacy/categories.html' %} </fieldset> <fieldset> <legend>{{ _('Search language') }}</legend> @@ -81,6 +81,15 @@ </p> </fieldset> <fieldset> + <legend>{{ _('Results on new tabs') }}</legend> + <p> + <select name='results_on_new_tab'> + <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option> + <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option> + </select> + </p> + </fieldset> + <fieldset> <legend>{{ _('Currently used search engines') }}</legend> <table> diff --git a/searx/templates/default/result_templates/code.html b/searx/templates/legacy/result_templates/code.html index ad1d97e9e..9e3ed20af 100644 --- a/searx/templates/default/result_templates/code.html +++ b/searx/templates/legacy/result_templates/code.html @@ -1,9 +1,9 @@ <div class="result {{ result.class }}">
- <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3>
- <p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" rel="noreferrer">{{ _('cached') }}</a></p>
+ <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
+ <p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a></p>
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
<p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
- {% if result.repository %}<p class="result-content"><a href="{{ result.repository|safe }}" rel="noreferrer">{{ result.repository }}</a></p>{% endif %}
+ {% if result.repository %}<p class="result-content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
<div dir="ltr">
{{ result.codelines|code_highlighter(result.code_language)|safe }}
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/legacy/result_templates/default.html index 89091e280..da091174d 100644 --- a/searx/templates/default/result_templates/default.html +++ b/searx/templates/legacy/result_templates/default.html @@ -1,6 +1,6 @@ <div class="result {{ result.class }}"> - <h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> - <p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" rel="noreferrer">{{ _('cached') }}</a> + <h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> + <p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a> {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p> <p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p> </div> diff --git a/searx/templates/legacy/result_templates/images.html b/searx/templates/legacy/result_templates/images.html new file mode 100644 index 000000000..00f62abcc --- /dev/null +++ b/searx/templates/legacy/result_templates/images.html @@ -0,0 +1,6 @@ +<div class="image_result"> + <p> + <a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a> + <span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span> + </p> +</div> diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/legacy/result_templates/map.html index d413742e7..0200e0f6b 100644 --- a/searx/templates/default/result_templates/map.html +++ b/searx/templates/legacy/result_templates/map.html @@ -5,8 +5,8 @@ {% endif %} <div> - <h3 class="result_title"><a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> - <p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" rel="noreferrer">{{ _('cached') }}</a> + <h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> + <p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a> {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p> <p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p> </div> diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/legacy/result_templates/torrent.html index 4b2522ad0..67e058ae5 100644 --- a/searx/templates/default/result_templates/torrent.html +++ b/searx/templates/legacy/result_templates/torrent.html @@ -2,12 +2,12 @@ {% if "icon_"~result.engine~".ico" in favicons %} <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" /> {% endif %} - <h3 class="result_title"><a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> + <h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> <p class="url">{{ result.pretty_url }}‎</p> {% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %} <p> {% if result.magnetlink %}<a href="{{ result.magnetlink }}" class="magnetlink">{{ _('magnet link') }}</a>{% endif %} - {% if result.torrentfile %}<a href="{{ result.torrentfile }}" rel="noreferrer" class="torrentfile">{{ _('torrent file') }}</a>{% endif %} - + {% if result.torrentfile %}<a href="{{ result.torrentfile }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="torrentfile">{{ _('torrent file') }}</a>{% endif %} - <span class="stats">{{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }}</span> </p> </div> diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/legacy/result_templates/videos.html index 5a377b70f..727f44c71 100644 --- a/searx/templates/default/result_templates/videos.html +++ b/searx/templates/legacy/result_templates/videos.html @@ -1,6 +1,6 @@ <div class="result"> - <h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h3> + <h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3> {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %} - <a href="{{ result.url }}" rel="noreferrer"><img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> + <a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> <p class="url">{{ result.url }}‎</p> </div> diff --git a/searx/templates/default/results.html b/searx/templates/legacy/results.html index 927b7b8a8..f0d78398d 100644 --- a/searx/templates/default/results.html +++ b/searx/templates/legacy/results.html @@ -1,10 +1,10 @@ -{% extends "default/base.html" %} -{% block title %}{{ q }} - {% endblock %} -{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&format=rss&{% for category in selected_categories %}category_{{ category }}=1&{% endfor %}pageno={{ pageno }}">{% endblock %} +{% extends "legacy/base.html" %} +{% block title %}{{ q|e }} - {% endblock %} +{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&format=rss&{% for category in selected_categories %}category_{{ category }}=1&{% endfor %}pageno={{ pageno }}">{% endblock %} {% block content %} <div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div> <div class="small search center"> - {% include 'default/search.html' %} + {% include 'legacy/search.html' %} </div> <div id="results"> <div id="sidebar"> @@ -18,7 +18,7 @@ {% for output_type in ('csv', 'json', 'rss') %} <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> <div class="left"> - <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="q" value="{{ q|e }}" /> <input type="hidden" name="format" value="{{ output_type }}" /> {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1"/> @@ -55,16 +55,16 @@ {% if infoboxes %} <div id="infoboxes"> {% for infobox in infoboxes %} - {% include 'default/infobox.html' %} + {% include 'legacy/infobox.html' %} {% endfor %} </div> {% endif %} {% for result in results %} {% if result['template'] %} - {% include get_result_template('default', result['template']) %} + {% include get_result_template('legacy', result['template']) %} {% else %} - {% include 'default/result_templates/default.html' %} + {% include 'legacy/result_templates/default.html' %} {% endif %} {% endfor %} @@ -73,7 +73,7 @@ {% if pageno > 1 %} <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> <div class="{% if rtl %}right{% else %}left{% endif %}"> - <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="q" value="{{ q|e }}" /> {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1"/> {% endfor %} @@ -87,7 +87,7 @@ {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1"/> {% endfor %} - <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="q" value="{{ q|e }}" /> <input type="hidden" name="pageno" value="{{ pageno+1 }}" /> <input type="submit" value="{{ _('next page') }} >>" /> </div> diff --git a/searx/templates/default/search.html b/searx/templates/legacy/search.html index 5a049a492..4d37f9ba1 100644 --- a/searx/templates/default/search.html +++ b/searx/templates/legacy/search.html @@ -4,5 +4,5 @@ <input type="submit" value="search" id="search_submit" /> </div> {% set display_tooltip = true %} - {% include 'default/categories.html' %} + {% include 'legacy/categories.html' %} </form> diff --git a/searx/templates/default/stats.html b/searx/templates/legacy/stats.html index 70fe98ac7..372447e23 100644 --- a/searx/templates/default/stats.html +++ b/searx/templates/legacy/stats.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block head %} {% endblock %} {% block content %} <h2>{{ _('Engine stats') }}</h2> diff --git a/searx/templates/oscar/404.html b/searx/templates/oscar/404.html new file mode 100644 index 000000000..11d789564 --- /dev/null +++ b/searx/templates/oscar/404.html @@ -0,0 +1,9 @@ +{% 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>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p> + {% endautoescape %} +</div> +{% endblock %} diff --git a/searx/templates/oscar/about.html b/searx/templates/oscar/about.html index 39ef3663e..673738172 100644 --- a/searx/templates/oscar/about.html +++ b/searx/templates/oscar/about.html @@ -1,5 +1,4 @@ {% extends "oscar/base.html" %} -{% block site_alert_warning_nojs %} {% endblock %} {% block title %}{{ _('about') }} - {% endblock %} {% block content %} <div{% if rtl %} dir="ltr"{% endif %}> @@ -7,20 +6,20 @@ <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> + <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> + <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> + 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="http://seeks-project.info/">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 /> +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> diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index a1f1c1a90..220f5f8b1 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -1,8 +1,9 @@ +{% 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 %}> <head> <meta charset="UTF-8" /> - <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" /> + <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" /> <meta name="keywords" content="searx, search, search engine, metasearch, meta search" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="generator" content="searx/{{ searx_version }}"> @@ -54,18 +55,25 @@ <body> {% 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_warning_nojs %} - <noscript> - <div class="visible-xs-block"> - {% include 'oscar/messages/js_disabled.html' %} - </div> - </noscript> - {% endblock %} {% block site_alert_info %} {% endblock %} {% block site_alert_success %} diff --git a/searx/templates/oscar/categories.html b/searx/templates/oscar/categories.html index 241d262ea..1ace10f16 100644 --- a/searx/templates/oscar/categories.html +++ b/searx/templates/oscar/categories.html @@ -3,7 +3,6 @@ {% for category in categories | reverse %} <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> - </label> {% endfor %} {% else %} {% for category in categories %} diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html index 70d12f2fb..c98fb0e63 100644 --- a/searx/templates/oscar/infobox.html +++ b/searx/templates/oscar/infobox.html @@ -1,3 +1,4 @@ +{% from 'oscar/macros.html' import result_link with context %} <div class="panel panel-default infobox"> <div class="panel-heading"> <h4 class="panel-title infobox_part"><bdi>{{ infobox.infobox }}</bdi></h4> @@ -25,7 +26,7 @@ <div class="infobox_part"> <bdi> {% for url in infobox.urls %} - <p class="btn btn-default btn-xs"><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></p> + <p class="btn btn-default btn-xs">{{ result_link(url.url, url.title) }}</a></p> {% endfor %} </bdi> </div> diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index bf51d5940..221300fe4 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -9,16 +9,20 @@ <img width="32" height="32" class="favicon" src="static/themes/oscar/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
{%- endmacro %}
+{%- macro result_link(url, title, classes='') -%}
+<a href="{{ url }}" {% if classes %}class="{{ classes }} "{% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a>
+{%- endmacro -%}
+
<!-- Draw result header -->
-{% macro result_header(result, favicons) -%}
- <h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}<a href="{{ result.url }}" rel="noreferrer">{{ result.title|safe }}</a></h4>
+{% macro result_header(result, favicons) -%}
+<h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result_link(result.url, result.title|safe) }}</h4>
{%- endmacro %}
<!-- Draw result sub header -->
{% macro result_sub_header(result) -%}
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
- {% if result.magnetlink %}<small> • <a href="{{ result.magnetlink }}" class="magnetlink">{{ icon('magnet') }} {{ _('magnet link') }}</a></small>{% endif %}
- {% if result.torrentfile %}<small> • <a href="{{ result.torrentfile }}" class="torrentfile" rel="noreferrer">{{ icon('download-alt') }} {{ _('torrent file') }}</a></small>{% 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 %}
{%- endmacro %}
<!-- Draw result footer -->
@@ -28,7 +32,10 @@ {% for engine in result.engines %}
<span class="label label-default">{{ engine }}</span>
{% endfor %}
- <small><a class="text-info" href="https://web.archive.org/web/{{ result.url }}" rel="noreferrer">{{ icon('link') }} {{ _('cached') }}</a></small>
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
+ {% if proxify %}
+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
+ {% endif %}
</div>
<div class="text-muted"><small>{{ result.pretty_url }}</small></div>
{%- endmacro %}
@@ -39,7 +46,10 @@ {% for engine in result.engines %}
<span class="label label-default">{{ engine }}</span>
{% endfor %}
- <small><a class="text-info" href="https://web.archive.org/web/{{ result.url }}" rel="noreferrer">{{ icon('link') }} {{ _('cached') }}</a></small>
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
+ {% if proxify %}
+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
+ {% endif %}
<div class="text-muted"><small>{{ result.pretty_url }}</small></div>
{%- endmacro %}
diff --git a/searx/templates/oscar/messages/js_disabled.html b/searx/templates/oscar/messages/js_disabled.html deleted file mode 100644 index 8baaf1e4c..000000000 --- a/searx/templates/oscar/messages/js_disabled.html +++ /dev/null @@ -1,4 +0,0 @@ -<div class="alert alert-warning" role="alert"> - <strong class="lead">{{ _('Warning!') }}</strong> - {{ _('Please enable JavaScript to use full functionality of this site.') }} -</div> diff --git a/searx/templates/oscar/navbar.html b/searx/templates/oscar/navbar.html index c59bcda3d..d12de7dab 100644 --- a/searx/templates/oscar/navbar.html +++ b/searx/templates/oscar/navbar.html @@ -1,40 +1,14 @@ <!-- Static navbar --> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> - {% if rtl %} - <div class="navbar-collapse collapse navbar-left"> - <ul class="nav navbar-nav navbar-left"> <!-- results.html --> - <li{% if template_name == 'preferences.html' %} class="active"{% endif %}><a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a></li> - <li{% if template_name == 'about.html' %} class="active"{% endif %}><a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a></li> - <li{% if template_name == 'index.html' %} class="active"{% endif %}><a href="{{ url_for('index') }}" class="hmarg">{{ _('home') }}</a></li> - </ul> - </div> - <div class="navbar-header navbar-right"> - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> - <span class="sr-only">{{ _('Toggle navigation') }}</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand" href="{{ url_for('index') }}">{{ instance_name }}</a> - </div> - {% else %} - <div class="navbar-header"> - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> - <span class="sr-only">{{ _('Toggle navigation') }}</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> + <div class="navbar-header{% if rtl %} navbar-right{% endif %}"> <a class="navbar-brand" href="{{ url_for('index') }}">{{ instance_name }}</a> </div> - <div class="navbar-collapse collapse"> - <ul class="nav navbar-nav navbar-right"> <!-- results.html --> - <li{% if template_name == 'index.html' %} class="active"{% endif %}><a href="{{ url_for('index') }}" class="hmarg">{{ _('home') }}</a></li> - <li{% if template_name == 'about.html' %} class="active"{% endif %}><a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a></li> - <li{% if template_name == 'preferences.html' %} class="active"{% endif %}><a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a></li> - </ul> - </div><!--/.nav-collapse --> - {% endif %} </div><!--/.container-fluid --> </div> +<div class="menu menu-{% if rtl %}left{% else %}right{% endif %}"> + <ul> <!-- results.html --> + <li{% if template_name == 'about.html' %} class="active"{% endif %}><a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a></li> + <li{% if template_name == 'preferences.html' %} class="active"{% endif %}><a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a></li> + </ul> +</div><!--/.nav-collapse --> diff --git a/searx/templates/oscar/opensearch_response_rss.xml b/searx/templates/oscar/opensearch_response_rss.xml index 5673eb2e1..ddb60fa5e 100644 --- a/searx/templates/oscar/opensearch_response_rss.xml +++ b/searx/templates/oscar/opensearch_response_rss.xml @@ -3,14 +3,14 @@ xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> - <title>Searx search: {{ q }}</title> - <link>{{ base_url }}?q={{ q }}</link> - <description>Search results for "{{ q }}" - searx</description> + <title>Searx search: {{ q|e }}</title> + <link>{{ base_url }}?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="{{ base_url }}opensearch.xml"/> - <opensearch:Query role="request" searchTerms="{{ q }}" startPage="1" /> + <opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" /> {% for r in results %} <item> <title>{{ r.title }}</title> diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 0e3848b7c..6ad795095 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -1,11 +1,6 @@ {% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle %} {% extends "oscar/base.html" %} {% block title %}{{ _('preferences') }} - {% endblock %} -{% block site_alert_warning_nojs %} -<noscript> - {% include 'oscar/messages/js_disabled.html' %} -</noscript> -{% endblock %} {% block content %} <div> @@ -17,6 +12,7 @@ <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> @@ -117,6 +113,15 @@ <option value="pointhi" {% if cookies['oscar-style'] == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option> </select> {{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }} + + {% 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'> + <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) }} </div> </fieldset> </div> @@ -149,6 +154,7 @@ <th>{{ _("Engine name") }}</th> <th>{{ _("Shortcut") }}</th> <th>{{ _("SafeSearch") }}</th> + <th>{{ _("Time range") }}</th> <th>{{ _("Avg. time") }}</th> <th>{{ _("Max time") }}</th> {% else %} @@ -170,6 +176,7 @@ <th>{{ search_engine.name }}</th> <td>{{ shortcuts[search_engine.name] }}</td> <td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td> + <td><input type="checkbox" {{ "checked" if search_engine.time_range_support==True else ""}} readonly="readonly" disabled="disabled"></td> <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td> <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td> {% else %} @@ -218,6 +225,34 @@ </fieldset> </div> + {% if answerers %} + <div class="tab-pane active_if_nojs" id="tab_answerers"> + <noscript> + <h3>{{ _('Answerers') }}</h3> + </noscript> + <p class="text-muted" style="margin:20px 0;"> + {{ _('This is the list of searx\'s instant answering modules.') }} + </p> + <table class="table table-striped"> + <tr> + <th class="text-muted">{{ _('Name') }}</th> + <th class="text-muted">{{ _('Keywords') }}</th> + <th class="text-muted">{{ _('Description') }}</th> + <th class="text-muted">{{ _('Examples') }}</th> + </tr> + + {% for answerer in answerers %} + <tr> + <td class="text-muted">{{ answerer.info.name }}</td> + <td class="text-muted">{{ answerer.keywords|join(', ') }}</td> + <td class="text-muted">{{ answerer.info.description }}</td> + <td class="text-muted">{{ answerer.info.examples|join(', ') }}</td> + </tr> + {% endfor %} + </table> + </div> + {% endif %} + <div class="tab-pane active_if_nojs" id="tab_cookies"> <noscript> <h3>{{ _('Cookies') }}</h3> diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html index 582a2149c..ba74d0333 100644 --- a/searx/templates/oscar/result_templates/code.html +++ b/searx/templates/oscar/result_templates/code.html @@ -5,7 +5,7 @@ {% 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|safe }}" rel="noreferrer">{{ 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 %}>{{ result.repository }}</a></p>{% endif %}
<div dir="ltr">
{{ result.codelines|code_highlighter(result.code_language)|safe }}
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index f283693c3..3ed0f3122 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -1,4 +1,4 @@ -{% 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) }}
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index 1bfff0a1a..b23f34915 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -1,27 +1,38 @@ {% from 'oscar/macros.html' import draw_favicon %}
-<a href="{{ result.img_src }}" rel="noreferrer" data-toggle="modal" data-target="#modal-{{ index }}">
+<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}}">
<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 }}" tabindex="-1" role="dialog" aria-hidden="true">
+<div class="modal fade" id="modal-{{ index }}-{{ pageno }}" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
- <div class="modal-content">
+ <div class="modal-wrapper">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</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.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
+ {% if result.author %}<span class="photo-author">{{ result.author }}</span><br />{% endif %}
+ {% if result.content %}
+ <p class="result-content">
+ {{ result.content }}
+ </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>
- <a href="{{ result.img_src }}" rel="noreferrer" class="btn btn-default">{{ _('Get image') }}</a>
- <a href="{{ result.url }}" rel="noreferrer" class="btn btn-default">{{ _('View source') }}</a>
+ <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>
diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html index af4841453..36fb26240 100644 --- a/searx/templates/oscar/result_templates/videos.html +++ b/searx/templates/oscar/result_templates/videos.html @@ -15,7 +15,7 @@ <div class="container-fluid">
<div class="row">
- <a href="{{ result.url }}" rel="noreferrer"><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) }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
{% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8 result-content">{{ result.content|safe }}</p>{% endif %}
</div>
</div>
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index e71be325a..0ae83e74b 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -1,6 +1,6 @@ {% extends "oscar/base.html" %}
-{% block title %}{{ q }} - {% endblock %}
-{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&format=rss&{% for category in selected_categories %}category_{{ category }}=1&{% endfor %}pageno={{ pageno }}&time_range={{ time_range }}">{% endblock %}
+{% block title %}{{ q|e }} - {% endblock %}
+{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&format=rss&{% for category in selected_categories %}category_{{ category }}=1&{% endfor %}pageno={{ pageno }}&time_range={{ time_range }}">{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm-8" id="main_results">
@@ -37,9 +37,9 @@ <div id="pagination">
<div class="pull-left">
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
- <input type="hidden" name="q" value="{{ q }}" />
+ <input type="hidden" name="q" value="{{ q|e }}" />
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
- <input type="hidden" name="q" value="{{ q }}" />
+ <input type="hidden" name="q" value="{{ q|e }}" />
<input type="hidden" name="pageno" value="{{ pageno+1 }}" />
<input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>
@@ -59,7 +59,7 @@ <div id="pagination">
<div class="pull-left">
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
- <input type="hidden" name="q" value="{{ q }}" />
+ <input type="hidden" name="q" value="{{ q|e }}" />
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
<input type="hidden" name="pageno" value="{{ pageno-1 }}" />
<input type="hidden" name="time_range" value="{{ time_range }}" />
@@ -69,7 +69,7 @@ <div class="pull-right">
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
- <input type="hidden" name="q" value="{{ q }}" />
+ <input type="hidden" name="q" value="{{ q|e }}" />
<input type="hidden" name="pageno" value="{{ pageno+1 }}" />
<input type="hidden" name="time_range" value="{{ time_range }}" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>
@@ -130,7 +130,7 @@ <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">
- <input type="hidden" name="q" value="{{ q }}">
+ <input type="hidden" name="q" value="{{ q|e }}">
<input type="hidden" name="format" value="{{ output_type }}">
{% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1">{% endfor %}
<input type="hidden" name="pageno" value="{{ pageno }}">
diff --git a/searx/templates/oscar/time-range.html b/searx/templates/oscar/time-range.html index 4a13c4fdb..6ce1b91cb 100644 --- a/searx/templates/oscar/time-range.html +++ b/searx/templates/oscar/time-range.html @@ -11,4 +11,7 @@ <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> diff --git a/searx/templates/pix-art/404.html b/searx/templates/pix-art/404.html new file mode 100644 index 000000000..592e8610f --- /dev/null +++ b/searx/templates/pix-art/404.html @@ -0,0 +1,9 @@ +{% extends "pix-art/base.html" %} +{% block content %} +<div class="center"> + <h1>{{ _('Page not found') }}</h1> + {% autoescape false %} + <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p> + {% endautoescape %} +</div> +{% endblock %} diff --git a/searx/templates/pix-art/about.html b/searx/templates/pix-art/about.html index cb4b351f8..041b036f2 100644 --- a/searx/templates/pix-art/about.html +++ b/searx/templates/pix-art/about.html @@ -5,20 +5,20 @@ <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> + <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> + <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> + 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="http://seeks-project.info/">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, if Searx used from the search bar it performs GET requests.<br /> +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, if searx used from the search bar it performs GET requests.<br /> Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. </p> diff --git a/searx/templates/pix-art/base.html b/searx/templates/pix-art/base.html index 578180c84..6af8823cc 100644 --- a/searx/templates/pix-art/base.html +++ b/searx/templates/pix-art/base.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}> <head> <meta charset="UTF-8" /> - <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" /> + <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" /> <meta name="keywords" content="searx, search, search engine, metasearch, meta search" /> <meta name="generator" content="searx/{{ searx_version }}"> <meta name="referrer" content="no-referrer"> diff --git a/searx/templates/pix-art/index.html b/searx/templates/pix-art/index.html index d398cc829..a0c61f975 100644 --- a/searx/templates/pix-art/index.html +++ b/searx/templates/pix-art/index.html @@ -1,7 +1,7 @@ {% extends "pix-art/base.html" %} {% block content %} <div class="center"> - <div class="title"><h1><img src="{{ url_for('static', filename='img/searx-pixel.png') }}" alt="Searx Logo"/></h1></div> + <div class="title"><h1><img src="{{ url_for('static', filename='img/searx-pixel.png') }}" alt="searx Logo"/></h1></div> {% include 'pix-art/search.html' %} <p class="top_margin"> <a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a> diff --git a/searx/templates/pix-art/preferences.html b/searx/templates/pix-art/preferences.html index a4a6cd268..ea5557b07 100644 --- a/searx/templates/pix-art/preferences.html +++ b/searx/templates/pix-art/preferences.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block head %} {% endblock %} {% block content %} <div class="row"> diff --git a/searx/templates/pix-art/results.html b/searx/templates/pix-art/results.html index 9385b608a..8999e0513 100644 --- a/searx/templates/pix-art/results.html +++ b/searx/templates/pix-art/results.html @@ -5,10 +5,10 @@ {% endfor %} {% else %} {% extends "pix-art/base.html" %} -{% block title %}{{ q }} - {% endblock %} +{% block title %}{{ q|e }} - {% endblock %} {% block meta %}{% endblock %} {% block content %} -<div id="logo"><a href="./"><img src="{{ url_for('static', filename='img/searx-pixel-small.png') }}" alt="Searx Logo"/></a></div> +<div id="logo"><a href="./"><img src="{{ url_for('static', filename='img/searx-pixel-small.png') }}" alt="searx Logo"/></a></div> <div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div> <div class="small search center"> {% include 'pix-art/search.html' %} @@ -25,8 +25,8 @@ </span> <div id="pagination"> <br /> - <input type="button" onclick="load_more('{{ q }}', {{ pageno+1 }})" id="load_more" value="{{ _('Load more...') }}" /> + <input type="button" onclick="load_more('{{ q|e }}', {{ pageno+1 }})" id="load_more" value="{{ _('Load more...') }}" /> </div> </div> {% endblock %} -{% endif %}
\ No newline at end of file +{% endif %} diff --git a/searx/templates/pix-art/stats.html b/searx/templates/pix-art/stats.html index 70fe98ac7..372447e23 100644 --- a/searx/templates/pix-art/stats.html +++ b/searx/templates/pix-art/stats.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block head %} {% endblock %} {% block content %} <h2>{{ _('Engine stats') }}</h2> |