on master help sign in
Few fixes
389fc3bCqoicebordel
searx/templates/default/base.html+31−30
@@ -1,33 +1,34 @@
1<!DOCTYPE html>
1<!DOCTYPE html>
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
3−<head>
3+ <head>
4− <meta charset="UTF-8" />
4+ <meta charset="UTF-8" />
5− <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" />
5+ <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" />
6− <meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
6+ <meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
7− <meta name="generator" content="searx/{{ searx_version }}">
7+ <meta name="generator" content="searx/{{ searx_version }}">
8− <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1" />
8+ <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1" />
9− <title>{% block title %}{% endblock %}searx</title>
9+ <title>{% block title %}{% endblock %}searx</title>
10− <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css" media="screen" />
10+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css" media="screen" />
11− <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}?v=2" />
11+ <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}?v=2" />
12− {% block styles %}
12+ {% block styles %}
13+ {% endblock %}
13− {% endblock %}
14+ {% block meta %}{% endblock %}
14− {% block head %}
15+ {% block head %}
15− <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
16+ <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
16− {% endblock %}
17+ {% endblock %}
17−</head>
18+ </head>
18−<body>
19+ <body>
19−<div id="container">
20+ <div id="container">
20−{% block content %}
21+ {% block content %}
21−{% endblock %}
22+ {% endblock %}
22−{% if autocomplete %}
23+ {% if autocomplete %}
23−<script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script>
24+ <script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script>
24−<script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script>
25+ <script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script>
25−{% endif %}
26+ {% endif %}
26−<script type="text/javascript">
27+ <script type="text/javascript">
27− searx = {};
28+ searx = {};
28− searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
29+ searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
29−</script>
30+ </script>
30−<script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
31+ <script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
31−</div>
32+ </div>
32−</body>
33+ </body>
33</html>
34</html>
searx/templates/default/categories.html+3−3
@@ -1,10 +1,10 @@
1<div id="categories">
1<div id="categories">
2 <div id="categories_container">
2 <div id="categories_container">
3−{% for category in categories %}
3+ {% for category in categories %}
4 <div class="checkbox_container">
4 <div class="checkbox_container">
5 <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label>
5 <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label>
6 </div>
6 </div>
7−{% endfor %}
7+ {% endfor %}
8− <div class="hidden">{{ _('Click on the magnifier to perform search') }}</div>
8+ {% if display_tooltip %}<div class="hidden">{{ _('Click on the magnifier to perform search') }}</div>{% endif %}
9 </div>
9 </div>
10</div>
10</div>
searx/templates/default/infobox.html+38−38
@@ -1,44 +1,44 @@
1<div class="infobox">
1<div class="infobox">
2− <h2>{{ infobox.infobox }}</h2>
2+ <h2>{{ infobox.infobox }}</h2>
3− {% if infobox.img_src %}<img src="{{ infobox.img_src }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
3+ {% if infobox.img_src %}<img src="{{ infobox.img_src }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
4− <p>{{ infobox.entity }}</p>
4+ <p>{{ infobox.entity }}</p>
5− <p>{{ infobox.content | safe }}</p>
5+ <p>{{ infobox.content | safe }}</p>
6− {% if infobox.attributes %}
6+ {% if infobox.attributes %}
7− <div class="attributes">
7+ <div class="attributes">
8− <table>
8+ <table>
9− {% for attribute in infobox.attributes %}
9+ {% for attribute in infobox.attributes %}
10− <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr>
10+ <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr>
11− {% endfor %}
11+ {% endfor %}
12− </table>
12+ </table>
13− </div>
13+ </div>
14− {% endif %}
14+ {% endif %}
15
15
16− {% if infobox.urls %}
16+ {% if infobox.urls %}
17− <div class="urls">
17+ <div class="urls">
18− <ul>
18+ <ul>
19− {% for url in infobox.urls %}
19+ {% for url in infobox.urls %}
20− <li class="url"><a href="{{ url.url }}">{{ url.title }}</a></li>
20+ <li class="url"><a href="{{ url.url }}">{{ url.title }}</a></li>
21− {% endfor %}
21+ {% endfor %}
22− </ul>
22+ </ul>
23− </div>
23+ </div>
24− {% endif %}
24+ {% endif %}
25
25
26− {% if infobox.relatedTopics %}
26+ {% if infobox.relatedTopics %}
27− <div class="relatedTopics">
27+ <div class="relatedTopics">
28− {% for topic in infobox.relatedTopics %}
28+ {% for topic in infobox.relatedTopics %}
29− <div>
29+ <div>
30− <h3>{{ topic.name }}</h3>
30+ <h3>{{ topic.name }}</h3>
31− {% for suggestion in topic.suggestions %}
31+ {% for suggestion in topic.suggestions %}
32− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
32+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
33− <input type="hidden" name="q" value="{{ suggestion }}">
33+ <input type="hidden" name="q" value="{{ suggestion }}">
34− <input type="submit" value="{{ suggestion }}" />
34+ <input type="submit" value="{{ suggestion }}" />
35− </form>
35+ </form>
36− {% endfor %}
36+ {% endfor %}
37− </div>
37+ </div>
38− {% endfor %}
38+ {% endfor %}
39− </div>
39+ </div>
40− {% endif %}
40+ {% endif %}
41
41
42− <br />
42+ <br />
43
43
44</div>
44</div>
searx/templates/default/preferences.html+5−6
@@ -7,9 +7,8 @@
7 <form method="post" action="{{ url_for('preferences') }}" id="search_form">
7 <form method="post" action="{{ url_for('preferences') }}" id="search_form">
8 <fieldset>
8 <fieldset>
9 <legend>{{ _('Default categories') }}</legend>
9 <legend>{{ _('Default categories') }}</legend>
10− <p>
10+ {% set display_tooltip = false %}
11 {% include 'default/categories.html' %}
11 {% include 'default/categories.html' %}
12− </p>
13 </fieldset>
12 </fieldset>
14 <fieldset>
13 <fieldset>
15 <legend>{{ _('Search language') }}</legend>
14 <legend>{{ _('Search language') }}</legend>
@@ -79,9 +78,9 @@
79 <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
78 <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
80 <td>{{ _(categ) }}</td>
79 <td>{{ _(categ) }}</td>
81 <td class="engine_checkbox">
80 <td class="engine_checkbox">
82− <input type="checkbox" id="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}"{% if search_engine.name in blocked_engines %} checked="checked"{% endif %} />
81+ <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}"{% if search_engine.name in blocked_engines %} checked="checked"{% endif %} />
83− <label class="allow" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
82+ <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
84− <label class="deny" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
83+ <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
85 </td>
84 </td>
86 </tr>
85 </tr>
87 {% endif %}
86 {% endif %}
@@ -95,7 +94,7 @@
95 </p>
94 </p>
96
95
97 <input type="submit" value="{{ _('save') }}" />
96 <input type="submit" value="{{ _('save') }}" />
98− <div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
97+ <div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
99 </form>
98 </form>
100</div>
99</div>
101{% endblock %}
100{% endblock %}
searx/templates/default/result_templates/default.html+2−2
@@ -1,6 +1,6 @@
1<div class="result {{ result.class }}">
1<div class="result {{ result.class }}">
2 <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 }}">{{ result.title|safe }}</a></h3>
2 <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 }}">{{ result.title|safe }}</a></h3>
3− <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
3+ <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a>
4− {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
4+ {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
5 <p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
5 <p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
6</div>
6</div>
searx/templates/default/result_templates/images.html+1−1
@@ -1,6 +1,6 @@
1<div class="image_result">
1<div class="image_result">
2 <p>
2 <p>
3 <a href="{{ result.img_src }}"><img src="{{ result.img_src }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
3 <a href="{{ result.img_src }}"><img src="{{ result.img_src }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
4− <span class="url"><a href="{{ result.url }}" class="small_font">original context</a></span>
4+ <span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span>
5 </p>
5 </p>
6</div>
6</div>
searx/templates/default/result_templates/map.html+8−8
@@ -1,13 +1,13 @@
1<div class="result {{ result.class }}">
1<div class="result {{ result.class }}">
2
2
3− {% if "icon_"~result.engine~".ico" in favicons %}
3+ {% if "icon_"~result.engine~".ico" in favicons %}
4 <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
4 <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
5− {% endif %}
5+ {% endif %}
6
6
7− <div>
7+ <div>
8− <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
8+ <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
9− <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
9+ <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a>
10− {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
10+ {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
11− <p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
11+ <p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
12− </div>
12+ </div>
13</div>
13</div>
searx/templates/default/result_templates/torrent.html+5−1
@@ -5,5 +5,9 @@
5 <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
5 <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
6 <p class="url">{{ result.pretty_url }}</p>
6 <p class="url">{{ result.pretty_url }}</p>
7 {% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
7 {% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
8+ <p>
8− <p><a href="{{ result.magnetlink }}" class="magnetlink">magnet link</a> - <span class="stats">Seed: {{ result.seed }}, Leech: {{ result.leech }}</span></p>
9+ {% if result.magnetlink %}<a href="{{ result.magnetlink }}" class="magnetlink">{{ _('magnet link') }}</a>{% endif %}
10+ {% if result.torrentfile %}<a href="{{ result.torrentfile }}" class="torrentfile">{{ _('torrent file') }}</a>{% endif %} -
11+ <span class="stats">{{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }}</span>
12+ </p>
9</div>
13</div>
searx/templates/default/result_templates/videos.html+3−3
@@ -1,6 +1,6 @@
1<div class="result">
1<div class="result">
2 <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 }}">{{ result.title|safe }}</a></h3>
2 <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 }}">{{ result.title|safe }}</a></h3>
3− {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
3+ {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %}
4− <a href="{{ result.url }}"><img class="thumbnail" src="{{ result.thumbnail }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
4+ <a href="{{ result.url }}"><img class="thumbnail" src="{{ result.thumbnail }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
5− <p class="url">{{ result.url }}</p>
5+ <p class="url">{{ result.url }}</p>
6</div>
6</div>
searx/templates/default/results.html+13−10
@@ -1,5 +1,6 @@
1{% extends "default/base.html" %}
1{% extends "default/base.html" %}
2{% block title %}{{ q }} - {% endblock %}
2{% block title %}{{ q }} - {% endblock %}
3+{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}">{% endblock %}
3{% block content %}
4{% block content %}
4<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
5<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
5<div class="small search center">
6<div class="small search center">
@@ -39,12 +40,14 @@
39 {% endif %}
40 {% endif %}
40
41
41 {% if suggestions %}
42 {% if suggestions %}
42− <div id="suggestions"><span>{{ _('Suggestions') }}</span>
43+ <div id="suggestions"><span id="suggestions-title">{{ _('Suggestions') }} : </span>
44+ {% set first = true %}
43 {% for suggestion in suggestions %}
45 {% for suggestion in suggestions %}
44− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
46+ {% if not first %} &bull; {% endif %}<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
45 <input type="hidden" name="q" value="{{ suggestion }}">
47 <input type="hidden" name="q" value="{{ suggestion }}">
46− <input type="submit" value="{{ suggestion }}" />
48+ <input type="submit" class="suggestion" value="{{ suggestion }}" />
47 </form>
49 </form>
50+ {% set first = false %}
48 {% endfor %}
51 {% endfor %}
49 </div>
52 </div>
50 {% endif %}
53 {% endif %}
@@ -55,7 +58,7 @@
55 {% include 'default/infobox.html' %}
58 {% include 'default/infobox.html' %}
56 {% endfor %}
59 {% endfor %}
57 </div>
60 </div>
58− {% endif %}
61+ {% endif %}
59
62
60 {% for result in results %}
63 {% for result in results %}
61 {% if result['template'] %}
64 {% if result['template'] %}
@@ -81,12 +84,12 @@
81 {% endif %}
84 {% endif %}
82 <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
85 <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
83 <div class="right">
86 <div class="right">
84− {% for category in selected_categories %}
87+ {% for category in selected_categories %}
85− <input type="hidden" name="category_{{ category }}" value="1"/>
88+ <input type="hidden" name="category_{{ category }}" value="1"/>
86− {% endfor %}
89+ {% endfor %}
87− <input type="hidden" name="q" value="{{ q }}" />
90+ <input type="hidden" name="q" value="{{ q }}" />
88− <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
91+ <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
89− <input type="submit" value="{{ _('next page') }} >>" />
92+ <input type="submit" value="{{ _('next page') }} >>" />
90 </div>
93 </div>
91 </form>
94 </form>
92
95
searx/templates/default/search.html+6−5
@@ -1,7 +1,8 @@
1<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
1<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
2− <div id="search_wrapper">
2+ <div id="search_wrapper">
3− <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
3+ <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
4− <input type="submit" value="search" id="search_submit" />
4+ <input type="submit" value="search" id="search_submit" />
5− </div>
5+ </div>
6+ {% set display_tooltip = true %}
6− {% include 'default/categories.html' %}
7+ {% include 'default/categories.html' %}
7</form>
8</form>