瀏覽代碼

Merge pull request #173 from Cqoicebordel/default-UXUI

Default theme - a few UIUX
Adam Tauber 10 年之前
父節點
當前提交
a85be12275
共有 30 個檔案被更改,包括 151 行新增196 行删除
  1. 1
    86
      searx/static/themes/default/css/style.css
  2. 二進制
      searx/static/themes/default/img/icons/icon_500px.ico
  3. 二進制
      searx/static/themes/default/img/icons/icon_bing.ico
  4. 二進制
      searx/static/themes/default/img/icons/icon_deezer.ico
  5. 二進制
      searx/static/themes/default/img/icons/icon_digg.ico
  6. 二進制
      searx/static/themes/default/img/icons/icon_duckduckgo.ico
  7. 二進制
      searx/static/themes/default/img/icons/icon_flickr.ico
  8. 二進制
      searx/static/themes/default/img/icons/icon_google play apps.ico
  9. 二進制
      searx/static/themes/default/img/icons/icon_google play movies.ico
  10. 二進制
      searx/static/themes/default/img/icons/icon_google play music.ico
  11. 二進制
      searx/static/themes/default/img/icons/icon_google.ico
  12. 二進制
      searx/static/themes/default/img/icons/icon_openstreetmap.ico
  13. 二進制
      searx/static/themes/default/img/icons/icon_searchcode.ico
  14. 二進制
      searx/static/themes/default/img/icons/icon_startpage.ico
  15. 二進制
      searx/static/themes/default/img/icons/icon_subtitleseeker.ico
  16. 二進制
      searx/static/themes/default/img/icons/icon_wikipedia.ico
  17. 二進制
      searx/static/themes/default/img/icons/icon_yahoo.ico
  18. 9
    3
      searx/static/themes/default/less/definitions.less
  19. 26
    0
      searx/static/themes/default/less/style.less
  20. 31
    30
      searx/templates/default/base.html
  21. 3
    3
      searx/templates/default/categories.html
  22. 38
    38
      searx/templates/default/infobox.html
  23. 5
    6
      searx/templates/default/preferences.html
  24. 2
    2
      searx/templates/default/result_templates/default.html
  25. 1
    1
      searx/templates/default/result_templates/images.html
  26. 8
    8
      searx/templates/default/result_templates/map.html
  27. 5
    1
      searx/templates/default/result_templates/torrent.html
  28. 3
    3
      searx/templates/default/result_templates/videos.html
  29. 13
    10
      searx/templates/default/results.html
  30. 6
    5
      searx/templates/default/search.html

+ 1
- 86
searx/static/themes/default/css/style.css
文件差異過大導致無法顯示
查看文件


二進制
searx/static/themes/default/img/icons/icon_500px.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_bing.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_deezer.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_digg.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_duckduckgo.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_flickr.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_google play apps.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_google play movies.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_google play music.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_google.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_openstreetmap.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_searchcode.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_startpage.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_subtitleseeker.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_wikipedia.ico 查看文件


二進制
searx/static/themes/default/img/icons/icon_yahoo.ico 查看文件


+ 9
- 3
searx/static/themes/default/less/definitions.less 查看文件

@@ -15,6 +15,9 @@
15 15
 /// General
16 16
 
17 17
 @color-font: #444;
18
+@color-font-light: #888;
19
+
20
+@color-red: #C0392B;
18 21
 
19 22
 @color-url-font: #1a11be;
20 23
 @color-url-visited-font: #8E44AD;
@@ -44,6 +47,9 @@
44 47
 
45 48
 @color-autocompleter-choices-font: #444;
46 49
 
50
+/// Answers
51
+@color-answers-border: @color-base-dark;
52
+
47 53
 // Selected
48 54
 @color-autocompleter-selected-background: #444;
49 55
 @color-autocompleter-selected-font: #FFF;
@@ -78,10 +84,10 @@
78 84
 @color-result-link-visited-font: @color-url-visited-font;
79 85
 
80 86
 // Url to result
81
-@color-result-url-font: #C0392B;
87
+@color-result-url-font: @color-red;
82 88
 
83 89
 // Publish Date
84
-@color-result-publishdate-font: #888;
90
+@color-result-publishdate-font: @color-font-light;
85 91
 
86 92
 // Images
87 93
 @color-result-image-span-background-hover: rgba(0, 0, 0, 0.6);
@@ -109,5 +115,5 @@
109 115
 
110 116
 /// Other
111 117
 
112
-@color-engines-font: #888;
118
+@color-engines-font: @color-font-light;
113 119
 @color-percentage-div-background: #444;

+ 26
- 0
searx/static/themes/default/less/style.less 查看文件

@@ -342,6 +342,18 @@ a {
342 342
 		margin: 3px;
343 343
 		font-size: 0.8em;
344 344
 	}
345
+	
346
+	a { 
347
+		color: @color-result-link-font;
348
+
349
+		&:hover {
350
+			text-decoration: underline;
351
+		}
352
+
353
+		&:visited {
354
+			color: @color-result-link-visited-font;
355
+		}
356
+	}
345 357
 }
346 358
 
347 359
 .definition_result {
@@ -434,6 +446,20 @@ tr {
434 446
 
435 447
 }
436 448
 
449
+#suggestions-title {
450
+
451
+color: @color-font-light;
452
+
453
+	
454
+}
455
+
456
+#answers {
457
+	
458
+	border: 2px solid @color-answers-border;
459
+	padding: 20px;
460
+	
461
+}
462
+
437 463
 #answers, #infoboxes {
438 464
 	form {
439 465
                 min-width: 210px;

+ 31
- 30
searx/templates/default/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
-</head>
18
-<body>
19
-<div id="container">
20
-{% block content %}
21
-{% endblock %}
22
-{% 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-autocompleter-1.1.2-min.js') }}" ></script>
25
-{% endif %}
26
-<script type="text/javascript">
27
-        searx = {};
28
-        searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
29
-</script>
30
-<script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
31
-</div>
32
-</body>
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
+    </head>
19
+    <body>
20
+        <div id="container">
21
+            {% block content %}
22
+            {% endblock %}
23
+            {% if autocomplete %}
24
+            <script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script>
25
+            <script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script>
26
+            {% endif %}
27
+            <script type="text/javascript">
28
+                    searx = {};
29
+                    searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
30
+            </script>
31
+            <script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
32
+        </div>
33
+    </body>
33 34
 </html>

+ 3
- 3
searx/templates/default/categories.html 查看文件

@@ -1,10 +1,10 @@
1 1
 <div id="categories">
2 2
     <div id="categories_container">
3
-{% for category in categories %}
3
+        {% for category in categories %}
4 4
         <div class="checkbox_container">
5 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 6
         </div>
7
-{% endfor %}
8
-    <div class="hidden">{{ _('Click on the magnifier to perform search') }}</div>
7
+        {% endfor %}
8
+        {% if display_tooltip %}<div class="hidden">{{ _('Click on the magnifier to perform search') }}</div>{% endif %}
9 9
     </div>
10 10
 </div>

+ 38
- 38
searx/templates/default/infobox.html 查看文件

@@ -1,44 +1,44 @@
1 1
 <div class="infobox">
2
-  <h2>{{ infobox.infobox }}</h2>
3
-  {% if infobox.img_src %}<img src="{{ infobox.img_src }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
4
-  <p>{{ infobox.entity }}</p>
5
-  <p>{{ infobox.content | safe }}</p>
6
-  {% if infobox.attributes %}
7
-  <div class="attributes">
8
-    <table>
9
-      {% for attribute in infobox.attributes %}
10
-      <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr>
11
-      {% endfor %}
12
-    </table>
13
-  </div>
14
-  {% endif %}
2
+    <h2>{{ infobox.infobox }}</h2>
3
+    {% if infobox.img_src %}<img src="{{ infobox.img_src }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
4
+    <p>{{ infobox.entity }}</p>
5
+    <p>{{ infobox.content | safe }}</p>
6
+    {% if infobox.attributes %}
7
+    <div class="attributes">
8
+        <table>
9
+            {% for attribute in infobox.attributes %}
10
+            <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr>
11
+            {% endfor %}
12
+        </table>
13
+    </div>
14
+    {% endif %}
15 15
 
16
-  {% if infobox.urls %}
17
-  <div class="urls">
18
-    <ul>
19
-      {% for url in infobox.urls %}
20
-      <li class="url"><a href="{{ url.url }}">{{ url.title }}</a></li>
21
-      {% endfor %}
22
-    </ul>
23
-  </div>
24
-  {% endif %}
16
+    {% if infobox.urls %}
17
+    <div class="urls">
18
+        <ul>
19
+            {% for url in infobox.urls %}
20
+            <li class="url"><a href="{{ url.url }}">{{ url.title }}</a></li>
21
+            {% endfor %}
22
+        </ul>
23
+    </div>
24
+    {% endif %}
25 25
 
26
-  {% if infobox.relatedTopics %}
27
-  <div class="relatedTopics">
28
-      {% for topic in infobox.relatedTopics %}
29
-      <div>
30
-	<h3>{{ topic.name }}</h3>
31
-	{% for suggestion in topic.suggestions %}
32
-	<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
33
-            <input type="hidden" name="q" value="{{ suggestion }}">
34
-            <input type="submit" value="{{ suggestion }}" />
35
-        </form>
36
-	{% endfor %}
37
-      </div>
38
-      {% endfor %}
39
-  </div>
40
-  {% endif %}
26
+    {% if infobox.relatedTopics %}
27
+    <div class="relatedTopics">
28
+        {% for topic in infobox.relatedTopics %}
29
+        <div>
30
+            <h3>{{ topic.name }}</h3>
31
+            {% for suggestion in topic.suggestions %}
32
+            <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
33
+                <input type="hidden" name="q" value="{{ suggestion }}">
34
+                <input type="submit" value="{{ suggestion }}" />
35
+            </form>
36
+            {% endfor %}
37
+        </div>
38
+        {% endfor %}
39
+    </div>
40
+    {% endif %}
41 41
 
42
-  <br />
42
+    <br />
43 43
   
44 44
 </div>

+ 5
- 6
searx/templates/default/preferences.html 查看文件

@@ -7,9 +7,8 @@
7 7
     <form method="post" action="{{ url_for('preferences') }}" id="search_form">
8 8
     <fieldset>
9 9
         <legend>{{ _('Default categories') }}</legend>
10
-        <p>
10
+        {% set display_tooltip = false %}
11 11
         {% include 'default/categories.html' %}
12
-        </p>
13 12
     </fieldset>
14 13
     <fieldset>
15 14
         <legend>{{ _('Search language') }}</legend>
@@ -79,9 +78,9 @@
79 78
                 <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
80 79
                 <td>{{ _(categ) }}</td>
81 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 %} />
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>
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 %} />
82
+                    <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
83
+                    <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
85 84
                 </td>
86 85
             </tr>
87 86
             {% endif %}
@@ -95,7 +94,7 @@
95 94
     </p>
96 95
 
97 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 98
     </form>    
100 99
 </div>
101 100
 {% endblock %}

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

@@ -1,6 +1,6 @@
1 1
 <div class="result {{ result.class }}">
2 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>
4
-    {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
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 %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
5 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 6
 </div>

+ 1
- 1
searx/templates/default/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 6
 </div>

+ 8
- 8
searx/templates/default/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 %}
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
-    <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
10
-	{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
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>
7
+    <div>
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>
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>
12
+    </div>
13 13
 </div>

+ 5
- 1
searx/templates/default/result_templates/torrent.html 查看文件

@@ -5,5 +5,9 @@
5 5
     <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
6 6
     <p class="url">{{ result.pretty_url }}</p>
7 7
     {% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
8
-    <p><a href="{{ result.magnetlink }}" class="magnetlink">magnet link</a> - <span class="stats">Seed: {{ result.seed }}, Leech: {{ result.leech }}</span></p>
8
+    <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 13
 </div>

+ 3
- 3
searx/templates/default/result_templates/videos.html 查看文件

@@ -1,6 +1,6 @@
1 1
 <div class="result">
2 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 %}
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>
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>
5
+    <p class="url">{{ result.url }}</p>
6 6
 </div>

+ 13
- 10
searx/templates/default/results.html 查看文件

@@ -1,5 +1,6 @@
1 1
 {% extends "default/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 5
 <div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
5 6
 <div class="small search center">
@@ -39,12 +40,14 @@
39 40
     {% endif %}
40 41
 
41 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 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 47
             <input type="hidden" name="q" value="{{ suggestion }}">
46
-            <input type="submit" value="{{ suggestion }}" />
48
+            <input type="submit" class="suggestion" value="{{ suggestion }}" />
47 49
         </form>
50
+        {% set first = false %}
48 51
         {% endfor %}
49 52
     </div>
50 53
     {% endif %}
@@ -55,7 +58,7 @@
55 58
          {% include 'default/infobox.html' %}
56 59
       {% endfor %}
57 60
     </div>
58
-    {% endif %}    
61
+    {% endif %}
59 62
 
60 63
     {% for result in results %}
61 64
         {% if result['template'] %}
@@ -81,12 +84,12 @@
81 84
         {% endif %}
82 85
         <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
83 86
             <div class="right">
84
-            {% for category in selected_categories %}
85
-            <input type="hidden" name="category_{{ category }}" value="1"/>
86
-            {% endfor %}
87
-            <input type="hidden" name="q" value="{{ q }}" />
88
-            <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
89
-            <input type="submit" value="{{ _('next page') }} >>" />
87
+                {% for category in selected_categories %}
88
+                <input type="hidden" name="category_{{ category }}" value="1"/>
89
+                {% endfor %}
90
+                <input type="hidden" name="q" value="{{ q }}" />
91
+                <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
92
+                <input type="submit" value="{{ _('next page') }} >>" />
90 93
             </div>
91 94
         </form>
92 95
 

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

@@ -1,7 +1,8 @@
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" size="100" {% if q %}value="{{ q }}"{% endif %}/>
4
-    <input type="submit" value="search" id="search_submit" />
5
-  </div>
6
-  {% include 'default/categories.html' %}
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 %}/>
4
+        <input type="submit" value="search" id="search_submit" />
5
+    </div>
6
+    {% set display_tooltip = true %}
7
+    {% include 'default/categories.html' %}
7 8
 </form>