on master help sign in
[enh] about page added
9ead654asciimoo
searx/static/css/style.css+11
@@ -4,6 +4,17 @@ html {
4 -ms-text-size-adjust: 100%;
4 -ms-text-size-adjust: 100%;
5 color: #444444;
5 color: #444444;
6}
6}
7+
8+#header { position: absolute; top: 0; left: 0; width: 100%; padding: 0 16px; background: #444444; line-height: 40px; }
9+#header a { color: #CCCCCC; padding: 0 8px; }
10+#header a:hover { color: #FFFFFF; }
11+
12+.row { max-width: 800px; margin: auto; text-align: justify; }
13+.row h1 { font-size: 3em; margin-top: 50px; }
14+.row p { padding: 0 10px; }
15+
16+h1.title { margin-top: 80px; }
17+
7.center { text-align: center; }
18.center { text-align: center; }
8
19
9h1 { font-size: 5em; }
20h1 { font-size: 5em; }
searx/templates/about.html+19−39
@@ -1,47 +1,27 @@
1+{% extends 'base.html' %}
2+{% block content %}
3+{% include 'header.html' %}
4+<div class="row">
1−<h1>About searx</h1>
5+ <h1>About <a href="/">searx</a></h1>
2
6
3−<p>searx is a meta-search engine inspired by the seeks-project. You can add it to your browsers search bar and even make it your default search engine. It tries to provide basic privacy by mixing your queries with queries from others while avoiding logging of queries. For all browsers (except chrom*) queries are made using a POST request. Thus they don't show up in our logs, nor in your url history. For chrome users there is an exception searx is used from the search bar, it issues GET requests.</p>
7+ <p>searx is a meta-search engine inspired by the seeks-project.<br />You can add it to your browsers search bar and even make it your default search engine.<br />It tries to provide basic privacy by mixing your queries with queries from others while avoiding logging of queries. For all browsers (except chrom*) queries are made using a POST request. Thus they don't show up in our logs, nor in your url history. For chrome users there is an exception searx is used from the search bar, it issues GET requests.</p>
4−
5−<h2>FAQ</h2>
6−<h3>Trust</h3>
7−<p>It's ok if you don't trust us regarding the logs, <a href="https://github.com/asciimoo/searx">take the code</a> and run it yourself for your friends! decentralize!</p>
8
8
9<h2>Supported engines</h2>
9<h2>Supported engines</h2>
10
10
11−<h3>General Category</h3>
11+{% for (categ,search_engines) in categs %}
12−<ul>
12+ <h3>{{ categ.capitalize() }} category</h3>
13−<li>duckduckgo definitions</li>
14−<li>duckduckgo</li>
15−<li>startpage</li>
16−<li>wikipedia</li>
17−</ul>
18−
19−<h3>Images Category</h3>
20−<ul>
13+ <ul>
21−<li>flickr</li>
14+ {% for search_engine in search_engines %}
22−<li>gimages</li>
15+ <li>{{ search_engine.name }}</li>
23−<li>deviantart</li>
16+ {% endfor %}
24−</ul>
17+ </ul>
18+{% endfor %}
25
19
26−<h3>Sound Category</h3>
20+<h2>FAQ</h2>
27−<ul>
21+<h3>Trust</h3>
28−<li>soundcloud</li>
22+<p>It's ok if you don't trust us regarding the logs, <a href="https://github.com/asciimoo/searx">take the code</a> and run it yourself for your friends! decentralize!</p>
29−</ul>
30−
31−<h3>Video Category</h3>
32−<ul>
33−<li>youtube</li>
34−</ul>
35−
36−<h3>IT Category</h3>
37−<ul>
38−<li>stackoverflow</li>
39−<li>github</li>
40−</ul>
41
23
42−<h3>Social media Category</h3>
43−<ul>
44−<li>twitter</li>
45−</ul>
46
24
47<p>please add more engines to this list, pull request are welcome!</p>
25<p>please add more engines to this list, pull request are welcome!</p>
26+</div>
27+{% endblock %}
searx/templates/index.html+2−1
@@ -1,10 +1,11 @@
1{% extends "base.html" %}
1{% extends "base.html" %}
2{% block content %}
2{% block content %}
3+{% include 'header.html' %}
3<a href="https://github.com/asciimoo/searx" class="github">
4<a href="https://github.com/asciimoo/searx" class="github">
4 <img style="position: absolute; top: 0; right: 0; border: 0;" src="/static/img/github_ribbon.png" alt="Fork me on GitHub" class="github"/>
5 <img style="position: absolute; top: 0; right: 0; border: 0;" src="/static/img/github_ribbon.png" alt="Fork me on GitHub" class="github"/>
5</a>
6</a>
6<div class="center">
7<div class="center">
7− <h1>searx</h1>
8+ <h1 class="title">searx</h1>
8 {% include 'search.html' %}
9 {% include 'search.html' %}
9</div>
10</div>
10{% endblock %}
11{% endblock %}
searx/webapp.py+7−1
@@ -22,7 +22,7 @@ if __name__ == "__main__":
22 from os.path import realpath, dirname
22 from os.path import realpath, dirname
23 path.append(realpath(dirname(realpath(__file__))+'/../'))
23 path.append(realpath(dirname(realpath(__file__))+'/../'))
24
24
25−from flask import Flask, request, flash, render_template, url_for, Response, make_response
25+from flask import Flask, request, render_template, url_for, Response, make_response
26from searx.engines import search, categories
26from searx.engines import search, categories
27from searx import settings
27from searx import settings
28import json
28import json
@@ -102,10 +102,16 @@ def index():
102def fav():
102def fav():
103 return ''
103 return ''
104
104
105+@app.route('/about', methods=['GET'])
106+def about():
107+ global categories
108+ return render('about.html', categs=categories.items())
109+
105@app.route('/opensearch.xml', methods=['GET'])
110@app.route('/opensearch.xml', methods=['GET'])
106def opensearch():
111def opensearch():
107 global opensearch_xml
112 global opensearch_xml
108 method = 'post'
113 method = 'post'
114+ # chrome/chromium only supports HTTP GET....
109 if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
115 if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
110 method = 'get'
116 method = 'get'
111 ret = opensearch_xml.format(method=method, host=url_for('index', _external=True))
117 ret = opensearch_xml.format(method=method, host=url_for('index', _external=True))