Browse Source

[enh] linkable search url display

Adam Tauber 11 years ago
parent
commit
6ff57dfbe1
3 changed files with 7 additions and 0 deletions
  1. 2
    0
      searx/static/css/style.css
  2. 4
    0
      searx/templates/results.html
  3. 1
    0
      searx/webapp.py

+ 2
- 0
searx/static/css/style.css View File

@@ -165,6 +165,8 @@ tr:hover { background: #DDDDDD; }
165 165
 #suggestions span { display: block; margin: 0 2px 2px 2px; padding: 0; }
166 166
 #suggestions form { display: block; }
167 167
 #suggestions input { padding: 2px 6px; margin: 2px 4px;  font-size: 0.8em; display: inline-block; background: #3498DB; color: #FFFFFF; border-radius: 4px; border: 0; cursor: pointer; }
168
+#search_url { margin-top: 8px; }
169
+#search_url input { border: 1px solid #888888; padding: 4px; color: #444444; width: 20em; display: block; margin: 4px; }
168 170
 
169 171
 #preferences {
170 172
     top: 10px;

+ 4
- 0
searx/templates/results.html View File

@@ -18,6 +18,10 @@
18 18
         </div>
19 19
         {% endif %}
20 20
 
21
+        <div id="search_url">
22
+            {{ _('Search URL') }}:
23
+            <input type="text" value="{{ base_url }}?q={{ q|urlencode }}&pageno={{ pageno }}" readonly="" />
24
+        </div>
21 25
         <div id="apis">
22 26
         {{ _('Download results') }}
23 27
         {% for output_type in ('csv', 'json', 'rss') %}

+ 1
- 0
searx/webapp.py View File

@@ -182,6 +182,7 @@ def index():
182 182
         selected_categories=search.categories,
183 183
         paging=search.paging,
184 184
         pageno=search.pageno,
185
+        base_url=get_base_url(),
185 186
         suggestions=search.suggestions
186 187
     )
187 188