summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorpw3t <romain@berthor.fr>2014-01-02 19:52:21 +0100
committerpw3t <romain@berthor.fr>2014-01-02 19:52:21 +0100
commitefb6eca39e9dd851645f76bd72ac076f61a11c09 (patch)
tree04b571f5d56967d63c213b45d35cfda08c4d2769 /searx/templates
parent6f2b8aca5e36196f6370951d915b06356a2549db (diff)
parentd2898b08187101aad477ef48c8ea7518cee8b925 (diff)
Merge branch 'master' of https://github.com/asciimoo/searx
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/base.html1
-rw-r--r--searx/templates/categories.html5
-rw-r--r--searx/templates/index.html1
-rw-r--r--searx/templates/preferences.html19
-rw-r--r--searx/templates/results.html7
-rw-r--r--searx/templates/search.html6
6 files changed, 31 insertions, 8 deletions
diff --git a/searx/templates/base.html b/searx/templates/base.html
index 9aa40297e..8175836ec 100644
--- a/searx/templates/base.html
+++ b/searx/templates/base.html
@@ -18,6 +18,7 @@
<div id="container">
{% block content %}
{% endblock %}
+<script src="/static/js/searx.js" ></script>
</div>
</body>
</html>
diff --git a/searx/templates/categories.html b/searx/templates/categories.html
new file mode 100644
index 000000000..4c693f3dd
--- /dev/null
+++ b/searx/templates/categories.html
@@ -0,0 +1,5 @@
+{% for category in categories %}
+ <div class="checkbox_container">
+ <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="cb"></label><label for="checkbox_{{ category|replace(' ', '_') }}">{{ category }}</label>
+ </div>
+{% endfor %}
diff --git a/searx/templates/index.html b/searx/templates/index.html
index 4d13b77e7..bdb31e844 100644
--- a/searx/templates/index.html
+++ b/searx/templates/index.html
@@ -6,6 +6,7 @@
{% include 'search.html' %}
<p class="top_margin">
<a href="/about" class="hmarg">about</a>
+ <a href="/preferences" class="hmarg">preferences</a>
</p>
</div>
{% endblock %}
diff --git a/searx/templates/preferences.html b/searx/templates/preferences.html
new file mode 100644
index 000000000..705139e58
--- /dev/null
+++ b/searx/templates/preferences.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+{% block head %} {% endblock %}
+{% block content %}
+<div class="row">
+ <h2>Preferences</h2>
+
+
+ <fieldset>
+ <legend>Default categories</legend>
+ <form method="post" action="/preferences" id="search_form">
+ <p>
+ {% include 'categories.html' %}
+ </p>
+ <input type="submit" value="save" />
+ </form>
+ </fieldset>
+ <div class="right"><a href="/">back</a></div>
+</div>
+{% endblock %}
diff --git a/searx/templates/results.html b/searx/templates/results.html
index a939bde22..c20f2d862 100644
--- a/searx/templates/results.html
+++ b/searx/templates/results.html
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% block title %}{{ q }} - {% endblock %}
{% block content %}
+<div class="right"><a href="/preferences">preferences</a></div>
<div class="small">
{% include 'search.html' %}
</div>
<div id="results">
{% if suggestions %}
- <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>
+ <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>
{% endif %}
<div>
Number of results: {{ number_of_results }}
@@ -18,14 +19,14 @@
{% include 'result_templates/default.html' %}
{% endif %}
{% endfor %}
- <form method="post" action="">
+ <form method="post" action="/">
<div class="left">
<input type="hidden" name="q" value="{{ q }}" />
<input type="hidden" name="format" value="csv" />
<input type="submit" value="download results in csv" />
</div>
</form>
- <form method="post" action="">
+ <form method="post" action="/">
<div class="">
<input type="hidden" name="q" value="{{ q }}" />
<input type="hidden" name="format" value="json" />
diff --git a/searx/templates/search.html b/searx/templates/search.html
index 64f0d8f73..51522b45c 100644
--- a/searx/templates/search.html
+++ b/searx/templates/search.html
@@ -4,10 +4,6 @@
<input type="submit" value="" id="search_submit" />
</div>
<div>
- {% for category in categories %}
- <div class="checkbox_container">
- <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="cb"></label><label for="checkbox_{{ category|replace(' ', '_') }}">{{ category }}</label>
- </div>
- {% endfor %}
+ {% include 'categories.html' %}
</div>
</form>