From 9ead6546a431f78e887c47f130be54a4893d2a1f Mon Sep 17 00:00:00 2001 From: asciimoo Date: Mon, 21 Oct 2013 00:28:48 +0200 Subject: [PATCH] [enh] about page added --- searx/static/css/style.css | 11 ++++++++ searx/templates/about.html | 58 +++++++++++++------------------------- searx/templates/index.html | 3 +- searx/webapp.py | 8 +++++- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/searx/static/css/style.css b/searx/static/css/style.css index b045379b..9ebb06c1 100644 --- a/searx/static/css/style.css +++ b/searx/static/css/style.css @@ -4,6 +4,17 @@ html { -ms-text-size-adjust: 100%; color: #444444; } + +#header { position: absolute; top: 0; left: 0; width: 100%; padding: 0 16px; background: #444444; line-height: 40px; } +#header a { color: #CCCCCC; padding: 0 8px; } +#header a:hover { color: #FFFFFF; } + +.row { max-width: 800px; margin: auto; text-align: justify; } +.row h1 { font-size: 3em; margin-top: 50px; } +.row p { padding: 0 10px; } + +h1.title { margin-top: 80px; } + .center { text-align: center; } h1 { font-size: 5em; } diff --git a/searx/templates/about.html b/searx/templates/about.html index ae33f93e..14679bdd 100644 --- a/searx/templates/about.html +++ b/searx/templates/about.html @@ -1,47 +1,27 @@ -

About searx

+{% extends 'base.html' %} +{% block content %} +{% include 'header.html' %} +
+

About searx

-

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.

+

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.

+ +

Supported engines

+ +{% for (categ,search_engines) in categs %} +

{{ categ.capitalize() }} category

+ +{% endfor %}

FAQ

Trust

It's ok if you don't trust us regarding the logs, take the code and run it yourself for your friends! decentralize!

-

Supported engines

- -

General Category

- - -

Images Category

- - -

Sound Category

- - -

Video Category

- - -

IT Category

- - -

Social media Category

-

please add more engines to this list, pull request are welcome!

+
+{% endblock %} diff --git a/searx/templates/index.html b/searx/templates/index.html index daff22b4..58cec7fe 100644 --- a/searx/templates/index.html +++ b/searx/templates/index.html @@ -1,10 +1,11 @@ {% extends "base.html" %} {% block content %} +{% include 'header.html' %} Fork me on GitHub
-

searx

+

searx

{% include 'search.html' %}
{% endblock %} diff --git a/searx/webapp.py b/searx/webapp.py index fd208504..3c398457 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -22,7 +22,7 @@ if __name__ == "__main__": from os.path import realpath, dirname path.append(realpath(dirname(realpath(__file__))+'/../')) -from flask import Flask, request, flash, render_template, url_for, Response, make_response +from flask import Flask, request, render_template, url_for, Response, make_response from searx.engines import search, categories from searx import settings import json @@ -102,10 +102,16 @@ def index(): def fav(): return '' +@app.route('/about', methods=['GET']) +def about(): + global categories + return render('about.html', categs=categories.items()) + @app.route('/opensearch.xml', methods=['GET']) def opensearch(): global opensearch_xml method = 'post' + # chrome/chromium only supports HTTP GET.... if request.headers.get('User-Agent', '').lower().find('webkit') >= 0: method = 'get' ret = opensearch_xml.format(method=method, host=url_for('index', _external=True))