on master help sign in
[enh] about page added
commit9ead6546a431f78e887c47f130be54a4893d2a1f authorasciimoo <asciimoo@gmail.com> dateMon 21 Oct 2013, 00:28 (13 years ago) parent0b28f3f
4 files changed+39−41
searx/static/css/style.css+11 searx/templates/about.html+19−39 searx/templates/index.html+2−1 searx/webapp.py+7−1
searx/static/css/style.css+11
@@ -4,6 +4,17 @@ html {
44 -ms-text-size-adjust: 100%;
55 color: #444444;
66}
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+
718.center { text-align: center; }
819
920h1 { font-size: 5em; }
searx/templates/about.html+19−39
@@ -1,47 +1,27 @@
1−<h1>About searx</h1>
1+{% extends 'base.html' %}
2+{% block content %}
3+{% include 'header.html' %}
4+<div class="row">
5+ <h1>About <a href="/">searx</a></h1>
26
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>
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>
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>
88
99<h2>Supported engines</h2>
1010
11−<h3>General Category</h3>
12−<ul>
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>
21−<li>flickr</li>
22−<li>gimages</li>
23−<li>deviantart</li>
24−</ul>
11+{% for (categ,search_engines) in categs %}
12+ <h3>{{ categ.capitalize() }} category</h3>
13+ <ul>
14+ {% for search_engine in search_engines %}
15+ <li>{{ search_engine.name }}</li>
16+ {% endfor %}
17+ </ul>
18+{% endfor %}
2519
26−<h3>Sound Category</h3>
27−<ul>
28−<li>soundcloud</li>
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>
20+<h2>FAQ</h2>
21+<h3>Trust</h3>
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>
4123
42−<h3>Social media Category</h3>
43−<ul>
44−<li>twitter</li>
45−</ul>
4624
4725<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 @@
11{% extends "base.html" %}
22{% block content %}
3+{% include 'header.html' %}
34<a href="https://github.com/asciimoo/searx" class="github">
45 <img style="position: absolute; top: 0; right: 0; border: 0;" src="/static/img/github_ribbon.png" alt="Fork me on GitHub" class="github"/>
56</a>
67<div class="center">
7− <h1>searx</h1>
8+ <h1 class="title">searx</h1>
89 {% include 'search.html' %}
910</div>
1011{% endblock %}
searx/webapp.py+7−1
@@ -22,7 +22,7 @@ if __name__ == "__main__":
2222 from os.path import realpath, dirname
2323 path.append(realpath(dirname(realpath(__file__))+'/../'))
2424
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
2626from searx.engines import search, categories
2727from searx import settings
2828import json
@@ -102,10 +102,16 @@ def index():
102102def fav():
103103 return ''
104104
105+@app.route('/about', methods=['GET'])
106+def about():
107+ global categories
108+ return render('about.html', categs=categories.items())
109+
105110@app.route('/opensearch.xml', methods=['GET'])
106111def opensearch():
107112 global opensearch_xml
108113 method = 'post'
114+ # chrome/chromium only supports HTTP GET....
109115 if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
110116 method = 'get'
111117 ret = opensearch_xml.format(method=method, host=url_for('index', _external=True))