Преглед изворни кода

[enh] submittable suggestions

asciimoo пре 11 година
родитељ
комит
e136832770
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 2
    1
      searx/static/css/style.css
  2. 1
    1
      searx/templates/results.html

+ 2
- 1
searx/static/css/style.css Прегледај датотеку

@@ -138,4 +138,5 @@ tr:hover td { background: #DDDDDD; }
138 138
 #results { margin-left: 10px; margin-top: 10px; }
139 139
 
140 140
 #suggestions { max-width: 50em;}
141
-#suggestions span { padding: 2px 6px; margin: 2px 4px;  font-size: 0.8em; display: inline-block; background: #E4E4E4; border-radius: 4px; }
141
+#suggestions form { display: inline; }
142
+#suggestions input { padding: 2px 6px; margin: 2px 4px;  font-size: 0.8em; display: inline-block; background: #E4E4E4; border-radius: 4px; border: 0; }

+ 1
- 1
searx/templates/results.html Прегледај датотеку

@@ -6,7 +6,7 @@
6 6
 </div>
7 7
 <div id="results">
8 8
     {% if suggestions %}
9
-    <div id="suggestions">Suggestions: {% for suggestion in suggestions %}<span>{{ suggestion }}</span>{% endfor %}</div>
9
+    <div id="suggestions">Suggestions: {% for suggestion in suggestions %}<form method="post" action=""><input type="hidden" name="q" value="{{suggestion}}"><input type="submit" value="{{ suggestion }}" /></form>{% endfor %}</div>
10 10
     {% endif %}
11 11
     <div>
12 12
         Number of results: {{ number_of_results }}