浏览代码

Lots of courgette modification

Cqoicebordel 10 年前
父节点
当前提交
2fc1de54da

+ 2
- 2
searx/templates/courgette/about.html 查看文件

@@ -1,6 +1,6 @@
1
-{% extends 'default/base.html' %}
1
+{% extends 'courgette/base.html' %}
2 2
 {% block content %}
3
-{% include 'default/github_ribbon.html' %}
3
+{% include 'courgette/github_ribbon.html' %}
4 4
 <div class="row">
5 5
     <h1>About <a href="{{ url_for('index') }}">searx</a></h1>
6 6
 

+ 32
- 31
searx/templates/courgette/base.html 查看文件

@@ -1,33 +1,34 @@
1 1
 <!DOCTYPE html>
2 2
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
3
-<head>
4
-    <meta charset="UTF-8" />
5
-    <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" />
6
-    <meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
7
-    <meta name="generator" content="searx/{{ searx_version }}">
8
-    <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1" />
9
-    <title>{% block title %}{% endblock %}searx</title>
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" />
12
-    {% block styles %}
13
-    {% endblock %}
14
-    {% block head %}
15
-    <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
16
-    {% endblock %}
17
-    <script type="text/javascript">
18
-        searx = {};
19
-        searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
20
-    </script>
21
-</head>
22
-<body>
23
-<div id="container">
24
-{% block content %}
25
-{% endblock %}
26
-{% if autocomplete %}
27
-<script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script>
28
-<script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script>
29
-{% endif %}
30
-<script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
31
-</div>
32
-</body>
33
-</html>
3
+    <head>
4
+        <meta charset="UTF-8" />
5
+        <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" />
6
+        <meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
7
+        <meta name="generator" content="searx/{{ searx_version }}">
8
+        <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1" />
9
+        <title>{% block title %}{% endblock %}searx</title>
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" />
12
+        {% block styles %}
13
+        {% endblock %}
14
+        {% block meta %}{% endblock %}
15
+        {% block head %}
16
+        <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
17
+        {% endblock %}
18
+        <script type="text/javascript">
19
+            searx = {};
20
+            searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
21
+        </script>
22
+    </head>
23
+    <body>
24
+        <div id="container">
25
+            {% block content %}
26
+            {% endblock %}
27
+            {% if autocomplete %}
28
+            <script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script>
29
+            <script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script>
30
+            {% endif %}
31
+            <script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
32
+        </div>
33
+    </body>
34
+</html>

+ 7
- 5
searx/templates/courgette/categories.html 查看文件

@@ -1,7 +1,9 @@
1 1
 <div id="categories">
2
-{% for category in categories %}
3
-    <div class="checkbox_container">
4
-        <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
2
+    <div id="categories_container">
3
+    {% for category in categories %}
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(' ', '_') }}">{{ _(category) }}</label>
6
+        </div>
7
+    {% endfor %}
5 8
     </div>
6
-{% endfor %}
7
-</div>
9
+</div>

+ 1
- 1
searx/templates/courgette/github_ribbon.html 查看文件

@@ -1,3 +1,3 @@
1 1
 <a href="https://github.com/asciimoo/searx" class="github">
2 2
     <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"/>
3
-</a>
3
+</a>

+ 4
- 4
searx/templates/courgette/index.html 查看文件

@@ -1,12 +1,12 @@
1
-{% extends "default/base.html" %}
1
+{% extends "courgette/base.html" %}
2 2
 {% block content %}
3
-{% include 'default/github_ribbon.html' %}
3
+{% include 'courgette/github_ribbon.html' %}
4 4
 <div class="center">
5 5
     <div class="title"><h1>searx</h1></div>
6
-    {% include 'default/search.html' %}
6
+    {% include 'courgette/search.html' %}
7 7
     <p class="top_margin">
8 8
         <a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a>
9 9
         <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a>
10 10
     </p>
11 11
 </div>
12
-{% endblock %}
12
+{% endblock %}

+ 53
- 55
searx/templates/courgette/preferences.html 查看文件

@@ -1,4 +1,4 @@
1
-{% extends "default/base.html" %}
1
+{% extends "courgette/base.html" %}
2 2
 {% block head %} {% endblock %}
3 3
 {% block content %}
4 4
 <div class="row">
@@ -7,95 +7,93 @@
7 7
     <form method="post" action="{{ url_for('preferences') }}" id="search_form">
8 8
     <fieldset>
9 9
         <legend>{{ _('Default categories') }}</legend>
10
-        <p>
11
-        {% include 'default/categories.html' %}
12
-        </p>
10
+        {% include 'courgette/categories.html' %}
13 11
     </fieldset>
14 12
     <fieldset>
15 13
         <legend>{{ _('Search language') }}</legend>
16 14
         <p>
17
-        <select name='language'>
18
-            <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
19
-            {% for lang_id,lang_name,country_name in language_codes %}
20
-            <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
21
-            {% endfor %}
22
-        </select>
15
+            <select name='language'>
16
+                <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
17
+                {% for lang_id,lang_name,country_name in language_codes %}
18
+                <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
19
+                {% endfor %}
20
+            </select>
23 21
         </p>
24 22
     </fieldset>
25 23
     <fieldset>
26 24
         <legend>{{ _('Interface language') }}</legend>
27 25
         <p>
28
-        <select name='locale'>
29
-            {% for locale_id,locale_name in locales.items() %}
30
-            <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
31
-            {% endfor %}
32
-        </select>
26
+            <select name='locale'>
27
+                {% for locale_id,locale_name in locales.items() %}
28
+                <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
29
+                {% endfor %}
30
+            </select>
33 31
         </p>
34 32
     </fieldset>
35 33
     <fieldset>
36 34
         <legend>{{ _('Autocomplete') }}</legend>
37 35
         <p>
38
-        <select name="autocomplete">
39
-            <option value=""> - </option>
40
-            {% for backend in autocomplete_backends %}
41
-            <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
42
-            {% endfor %}
43
-        </select>
36
+            <select name="autocomplete">
37
+                <option value=""> - </option>
38
+                {% for backend in autocomplete_backends %}
39
+                <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
40
+                {% endfor %}
41
+            </select>
44 42
         </p>
45 43
     </fieldset>
46 44
     <fieldset>
47 45
         <legend>{{ _('Method') }}</legend>
48 46
         <p>
49
-        <select name='method'>
50
-            <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
51
-            <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
52
-        </select>
47
+            <select name='method'>
48
+                <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
49
+                <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
50
+            </select>
53 51
         </p>
54 52
     </fieldset>
55 53
     <fieldset>
56 54
         <legend>{{ _('Themes') }}</legend>
57 55
         <p>
58
-        <select name="theme">
59
-            {% for name in themes %}
60
-            <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
61
-            {% endfor %}
62
-        </select>
56
+            <select name="theme">
57
+                {% for name in themes %}
58
+                <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
59
+                {% endfor %}
60
+            </select>
63 61
         </p>
64 62
     </fieldset>
65 63
     <fieldset>
66
-    <legend>{{ _('Currently used search engines') }}</legend>
67
-
68
-    <table>
69
-        <tr>
70
-            <th>{{ _('Engine name') }}</th>
71
-            <th>{{ _('Category') }}</th>
72
-            <th>{{ _('Allow') }} / {{ _('Block') }}</th>
73
-        </tr>
74
-    {% for (categ,search_engines) in categs %}
75
-        {% for search_engine in search_engines %}
64
+        <legend>{{ _('Currently used search engines') }}</legend>
76 65
 
77
-            {% if not search_engine.private %}
66
+        <table>
78 67
             <tr>
79
-                <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
80
-                <td>{{ _(categ) }}</td>
81
-                <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 %} />
83
-                    <label class="allow" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
84
-                    <label class="deny" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
85
-                </td>
68
+                <th>{{ _('Engine name') }}</th>
69
+                <th>{{ _('Category') }}</th>
70
+                <th>{{ _('Allow') }} / {{ _('Block') }}</th>
86 71
             </tr>
87
-            {% endif %}
72
+        {% for (categ,search_engines) in categs %}
73
+            {% for search_engine in search_engines %}
74
+
75
+                {% if not search_engine.private %}
76
+                <tr>
77
+                    <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
78
+                    <td>{{ _(categ) }}</td>
79
+                    <td class="engine_checkbox">
80
+                        <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 %} />
81
+                        <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
82
+                        <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
83
+                    </td>
84
+                </tr>
85
+                {% endif %}
86
+            {% endfor %}
88 87
         {% endfor %}
89
-    {% endfor %}
90
-    </table>
88
+        </table>
91 89
     </fieldset>
92 90
     <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
93
-    <br />
94
-    {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
91
+        <br />
92
+        {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
95 93
     </p>
96 94
 
97 95
     <input type="submit" value="{{ _('save') }}" />
98
-	<div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
96
+    <div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
99 97
     </form>    
100 98
 </div>
101
-{% endblock %}
99
+{% endblock %}

+ 6
- 6
searx/templates/courgette/result_templates/code.html 查看文件

@@ -1,9 +1,9 @@
1 1
 <div class="result {{ result.class }}">
2
-    <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 }}">{{ 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>
4
-    {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
2
+    <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 }}">{{ result.title|safe }}</a></h3>
3
+    {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
5 4
     <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
-    {% if result.repository %}<p class="result-content"><a href="{{ result.repository|safe }}">{{ result.repository }}</a></p>{% endif %}
7
-
5
+    {% if result.repository %}<p class="content"><a href="{{ result.repository|safe }}">{{ result.repository }}</a></p>{% endif %}
8 6
     {{ result.codelines|code_highlighter(result.code_language)|safe }}
9
-</div>
7
+
8
+    <p class="url">{{ result.pretty_url }}</p>
9
+</div>

+ 9
- 9
searx/templates/courgette/result_templates/default.html 查看文件

@@ -1,13 +1,13 @@
1 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 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>
8
-    <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
9
-	{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
10
-    <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p>
11
-    <p class="url">{{ result.pretty_url }}</p>
12
-  </div>
13
-</div>
7
+    <div>
8
+        <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
9
+        {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
10
+        <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p>
11
+        <p class="url">{{ result.pretty_url }}</p>
12
+    </div>
13
+</div>

+ 2
- 2
searx/templates/courgette/result_templates/images.html 查看文件

@@ -1,6 +1,6 @@
1 1
 <div class="image_result">
2 2
     <p>
3 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 5
     </p>
6
-</div>
6
+</div>

+ 10
- 10
searx/templates/courgette/result_templates/map.html 查看文件

@@ -1,13 +1,13 @@
1 1
 <div class="result {{ result.class }}">
2 2
 
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}}" />
5
-  {% endif %}
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}}" />
5
+    {% endif %}
6 6
 
7
-  <div>
8
-    <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
9
-	{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
10
-    <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p>
11
-    <p class="url">{{ result.pretty_url }}</p>
12
-  </div>
13
-</div>
7
+    <div>
8
+        <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
9
+        {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
10
+        <p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p>
11
+        <p class="url">{{ result.pretty_url }}</p>
12
+    </div>
13
+</div>

+ 10
- 4
searx/templates/courgette/result_templates/torrent.html 查看文件

@@ -1,7 +1,13 @@
1 1
 <div class="result torrent_result">
2
+    {% if "icon_"~result.engine~".ico" in favicons %}
3
+    <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
4
+    {% endif %}
2 5
     <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
3
-    {% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
4
-    <p class="stats">Seed: {{ result.seed }}, Leech: {{ result.leech }}</p>
5
-    <p><a href="{{ result.magnetlink }}" class="magnetlink">magnet link</a></p>
6
+    {% if result.content %}<span class="content">{{ result.content|safe }}</span><br />{% endif %}
7
+    <span class="stats">{{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }}</span><br />
8
+    <span>
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>
6 12
     <p class="url">{{ result.pretty_url }}</p>
7
-</div>
13
+</div>

+ 8
- 8
searx/templates/courgette/result_templates/videos.html 查看文件

@@ -1,10 +1,10 @@
1 1
 <div class="result">
2
-  {% if "icon_"~result.engine~".ico" in favicons %}
3
-      <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
4
-  {% endif %}
2
+	{% if "icon_"~result.engine~".ico" in favicons %}
3
+    <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
4
+	{% endif %}
5 5
 
6
-      <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
7
-      {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
8
-      <a href="{{ result.url }}"><img width="400" src="{{ result.thumbnail }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
9
-      <p class="url">{{ result.url }}</p>
10
-</div>
6
+    <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
7
+    {% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %}
8
+    <a href="{{ result.url }}"><img width="400" src="{{ result.thumbnail }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
9
+    <p class="url">{{ result.pretty_url }}</p>
10
+</div>

+ 38
- 29
searx/templates/courgette/results.html 查看文件

@@ -1,9 +1,10 @@
1
-{% extends "default/base.html" %}
1
+{% extends "courgette/base.html" %}
2 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 4
 {% block content %}
4
-<div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
5
+<div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>{{ _('preferences') }}</span></a></div>
5 6
 <div class="small search center">
6
-    {% include 'default/search.html' %}
7
+    {% include 'courgette/search.html' %}
7 8
 </div>
8 9
 <div id="results">
9 10
     <div id="sidebar">
@@ -13,22 +14,30 @@
13 14
             <input type="text" value="{{ base_url }}?q={{ q|urlencode }}&amp;pageno={{ pageno }}{% if selected_categories %}&amp;category_{{ selected_categories|join("&category_")|replace(' ','+') }}{% endif %}" readonly />
14 15
         </div>
15 16
         <div id="apis">
16
-        {{ _('Download results') }}
17
-        {% for output_type in ('csv', 'json', 'rss') %}
18
-        <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
19
-            <div class="left">
20
-            <input type="hidden" name="q" value="{{ q }}" />
21
-            <input type="hidden" name="format" value="{{ output_type }}" />
22
-            {% for category in selected_categories %}
23
-            <input type="hidden" name="category_{{ category }}" value="1"/>
17
+            {{ _('Download results') }}
18
+            {% for output_type in ('csv', 'json', 'rss') %}
19
+            <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
20
+                <div class="left">
21
+                    <input type="hidden" name="q" value="{{ q }}" />
22
+                    <input type="hidden" name="format" value="{{ output_type }}" />
23
+                    {% for category in selected_categories %}
24
+                    <input type="hidden" name="category_{{ category }}" value="1"/>
25
+                    {% endfor %}
26
+                    <input type="hidden" name="pageno" value="{{ pageno }}" />
27
+                    <input type="submit" value="{{ output_type }}" />
28
+                </div>
29
+            </form>
24 30
             {% endfor %}
25
-            <input type="hidden" name="pageno" value="{{ pageno }}" />
26
-            <input type="submit" value="{{ output_type }}" />
27
-            </div>
28
-        </form>
29
-        {% endfor %}
30 31
         </div>
31 32
     </div>
33
+    
34
+    {% if answers %}
35
+    <div id="answers" class=""><span>{{ _('Answers') }}</span>
36
+        {% for answer in answers %}
37
+        <span>{{ answer }}</span>
38
+        {% endfor %}
39
+    </div>
40
+    {% endif %}
32 41
 
33 42
     {% if suggestions %}
34 43
     <div id="suggestions"><span>{{ _('Suggestions') }}</span>
@@ -54,26 +63,26 @@
54 63
         {% if pageno > 1 %}
55 64
             <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
56 65
                 <div class="left">
57
-                <input type="hidden" name="q" value="{{ q }}" />
58
-                {% for category in selected_categories %}
59
-                <input type="hidden" name="category_{{ category }}" value="1"/>
60
-                {% endfor %}
61
-                <input type="hidden" name="pageno" value="{{ pageno-1 }}" />
62
-                <input type="submit" value="<< {{ _('previous page') }}" />
66
+                    <input type="hidden" name="q" value="{{ q }}" />
67
+                    {% for category in selected_categories %}
68
+                    <input type="hidden" name="category_{{ category }}" value="1"/>
69
+                    {% endfor %}
70
+                    <input type="hidden" name="pageno" value="{{ pageno-1 }}" />
71
+                    <input type="submit" value="<< {{ _('previous page') }}" />
63 72
                 </div>
64 73
             </form>
65 74
         {% endif %}
66 75
         <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
67 76
             <div class="left">
68
-            {% for category in selected_categories %}
69
-            <input type="hidden" name="category_{{ category }}" value="1"/>
70
-            {% endfor %}
71
-            <input type="hidden" name="q" value="{{ q }}" />
72
-            <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
73
-            <input type="submit" value="{{ _('next page') }} >>" />
77
+                {% for category in selected_categories %}
78
+                <input type="hidden" name="category_{{ category }}" value="1"/>
79
+                {% endfor %}
80
+                <input type="hidden" name="q" value="{{ q }}" />
81
+                <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
82
+                <input type="submit" value="{{ _('next page') }} >>" />
74 83
             </div>
75 84
         </form>
76 85
     </div>
77 86
     {% endif %}
78 87
 </div>
79
-{% endblock %}
88
+{% endblock %}

+ 6
- 6
searx/templates/courgette/search.html 查看文件

@@ -1,7 +1,7 @@
1 1
 <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
2
-  <div id="search_wrapper">
3
-    <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
4
-    <input type="submit" value="search" id="search_submit" />
5
-  </div>
6
-  {% include 'default/categories.html' %}
7
-</form>
2
+    <div id="search_wrapper">
3
+        <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
4
+        <input type="submit" value="search" id="search_submit" />
5
+    </div>
6
+    {% include 'courgette/categories.html' %}
7
+</form>

+ 4
- 4
searx/templates/courgette/stats.html 查看文件

@@ -1,4 +1,4 @@
1
-{% extends "default/base.html" %}
1
+{% extends "courgette/base.html" %}
2 2
 {% block head %} {% endblock %}
3 3
 {% block content %}
4 4
 <h2>{{ _('Engine stats') }}</h2>
@@ -6,8 +6,8 @@
6 6
 {% for stat_name,stat_category in stats %}
7 7
 <div class="left">
8 8
     <table>
9
-        <tr colspan="3">
10
-            <th>{{ stat_name }}</th>
9
+        <tr>
10
+            <th colspan="3">{{ stat_name }}</th>
11 11
         </tr>
12 12
         {% for engine in stat_category %}
13 13
         <tr>
@@ -19,4 +19,4 @@
19 19
     </table>
20 20
 </div>
21 21
 {% endfor %}
22
-{% endblock %}
22
+{% endblock %}