diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-10-17 01:53:52 +0200 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-10-17 01:53:52 +0200 |
| commit | 053170628739dc63b87711dd79b580e3d41bebb0 (patch) | |
| tree | 2c3b38da3ab258c0fc901984e1e2267889473e50 | |
| parent | 3373b2c2987302087777c89c4419fd7b67ca579e (diff) | |
[enh][mod] template refactor
| -rw-r--r-- | searx/templates/index.html | 10 | ||||
| -rw-r--r-- | searx/templates/results.html | 5 | ||||
| -rw-r--r-- | searx/templates/search.html | 9 |
3 files changed, 11 insertions, 13 deletions
diff --git a/searx/templates/index.html b/searx/templates/index.html index a25b84164..daff22b42 100644 --- a/searx/templates/index.html +++ b/searx/templates/index.html @@ -5,14 +5,6 @@ </a> <div class="center"> <h1>searx</h1> - <form method="post" action=""> - <input type="text" name="q" tabindex="1" autocomplete="off" /> - <input type="submit" value="search" /> - <p> - {% for engine in engines %} - {{ engine }}: <input type="checkbox" name="engine_{{ engine }}" checked="checked"/> - {% endfor %} - </p> - </form> + {% include 'search.html' %} </div> {% endblock %} diff --git a/searx/templates/results.html b/searx/templates/results.html index 8d2683a74..c5eee4dd1 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -1,9 +1,6 @@ {% extends "base.html" %} {% block content %} -<form method="post" action=""> - <input type="text" name="q" value="{{ q }}" autocomplete="off" /> - <input type="submit" value="search" /> -</form> +{% include 'search.html' %} {% for result in results %} <div class="result"> <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3> diff --git a/searx/templates/search.html b/searx/templates/search.html new file mode 100644 index 000000000..49331a141 --- /dev/null +++ b/searx/templates/search.html @@ -0,0 +1,9 @@ +<form method="post" action=""> + <input type="text" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/> + <input type="submit" value="search" /> + <p> + {% for engine in engines %} + {{ engine }}: <input type="checkbox" name="engine_{{ engine }}" checked="checked"/> + {% endfor %} + </p> +</form> |