From 389fc3b8b27e52a0959c4008ad303337f1c3c827 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Thu, 15 Jan 2015 01:48:46 +0100 Subject: [PATCH] Few fixes - Whitespaces - Change a few

in - Add RSS to allow browser detection - A few UIUX changes - Add a few more allowed translations --- searx/templates/default/base.html | 61 +++++++-------- searx/templates/default/categories.html | 6 +- searx/templates/default/infobox.html | 76 +++++++++---------- searx/templates/default/preferences.html | 11 ++- .../default/result_templates/default.html | 4 +- .../default/result_templates/images.html | 2 +- .../default/result_templates/map.html | 16 ++-- .../default/result_templates/torrent.html | 6 +- .../default/result_templates/videos.html | 6 +- searx/templates/default/results.html | 23 +++--- searx/templates/default/search.html | 11 +-- 11 files changed, 115 insertions(+), 107 deletions(-) diff --git a/searx/templates/default/base.html b/searx/templates/default/base.html index bc7f0972e..4bca6a7e0 100644 --- a/searx/templates/default/base.html +++ b/searx/templates/default/base.html @@ -1,33 +1,34 @@ - - - - - - - {% block title %}{% endblock %}searx - - - {% block styles %} - {% endblock %} - {% block head %} - - {% endblock %} - - -

-{% block content %} -{% endblock %} -{% if autocomplete %} - - -{% endif %} - - -
- + + + + + + + {% block title %}{% endblock %}searx + + + {% block styles %} + {% endblock %} + {% block meta %}{% endblock %} + {% block head %} + + {% endblock %} + + +
+ {% block content %} + {% endblock %} + {% if autocomplete %} + + + {% endif %} + + +
+ diff --git a/searx/templates/default/categories.html b/searx/templates/default/categories.html index 017898ea7..1c466781b 100644 --- a/searx/templates/default/categories.html +++ b/searx/templates/default/categories.html @@ -1,10 +1,10 @@
-{% for category in categories %} + {% for category in categories %}
-{% endfor %} - + {% endfor %} + {% if display_tooltip %}{% endif %}
diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html index d3ff8f06d..1511cae06 100644 --- a/searx/templates/default/infobox.html +++ b/searx/templates/default/infobox.html @@ -1,44 +1,44 @@
-

{{ infobox.infobox }}

- {% if infobox.img_src %}{{ infobox.infobox|striptags }}{% endif %} -

{{ infobox.entity }}

-

{{ infobox.content | safe }}

- {% if infobox.attributes %} -
- - {% for attribute in infobox.attributes %} - - {% endfor %} -
{{ attribute.label }}{{ attribute.value }}
-
- {% endif %} +

{{ infobox.infobox }}

+ {% if infobox.img_src %}{{ infobox.infobox|striptags }}{% endif %} +

{{ infobox.entity }}

+

{{ infobox.content | safe }}

+ {% if infobox.attributes %} +
+ + {% for attribute in infobox.attributes %} + + {% endfor %} +
{{ attribute.label }}{{ attribute.value }}
+
+ {% endif %} - {% if infobox.urls %} -
- -
- {% endif %} + {% if infobox.urls %} +
+ +
+ {% endif %} - {% if infobox.relatedTopics %} -
- {% for topic in infobox.relatedTopics %} -
-

{{ topic.name }}

- {% for suggestion in topic.suggestions %} -
- - -
- {% endfor %} -
- {% endfor %} -
- {% endif %} + {% if infobox.relatedTopics %} +
+ {% for topic in infobox.relatedTopics %} +
+

{{ topic.name }}

+ {% for suggestion in topic.suggestions %} +
+ + +
+ {% endfor %} +
+ {% endfor %} +
+ {% endif %} -
+
diff --git a/searx/templates/default/preferences.html b/searx/templates/default/preferences.html index 7d35de7c3..639877d47 100644 --- a/searx/templates/default/preferences.html +++ b/searx/templates/default/preferences.html @@ -7,9 +7,8 @@
{{ _('Default categories') }} -

+ {% set display_tooltip = false %} {% include 'default/categories.html' %} -

{{ _('Search language') }} @@ -79,9 +78,9 @@ {{ search_engine.name }} ({{ shortcuts[search_engine.name] }}) {{ _(categ) }} - - - + + + {% endif %} @@ -95,7 +94,7 @@

- + {% endblock %} diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html index 85882e56a..79b00d8de 100644 --- a/searx/templates/default/result_templates/default.html +++ b/searx/templates/default/result_templates/default.html @@ -1,6 +1,6 @@

{% if "icon_"~result.engine~".ico" in favicons %}{{result.engine}}{% endif %}{{ result.title|safe }}

-

{{ result.pretty_url }} cached

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} +

{{ result.pretty_url }} cached + {% if result.publishedDate %}{{ result.publishedDate }}{% endif %}

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/default/result_templates/images.html index 4c6d59e01..9cb82ba51 100644 --- a/searx/templates/default/result_templates/images.html +++ b/searx/templates/default/result_templates/images.html @@ -1,6 +1,6 @@ diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/default/result_templates/map.html index d37c2f374..59885a58c 100644 --- a/searx/templates/default/result_templates/map.html +++ b/searx/templates/default/result_templates/map.html @@ -1,13 +1,13 @@
- {% if "icon_"~result.engine~".ico" in favicons %} + {% if "icon_"~result.engine~".ico" in favicons %} {{result.engine}} - {% endif %} + {% endif %} -
-

{{ result.title|safe }}

-

{{ result.pretty_url }} cached

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} -

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

-
+
+

{{ result.title|safe }}

+

{{ result.pretty_url }} cached + {% if result.publishedDate %}{{ result.publishedDate }}{% endif %}

+

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

+
diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/default/result_templates/torrent.html index 4c79a0a39..6a71f9ac6 100644 --- a/searx/templates/default/result_templates/torrent.html +++ b/searx/templates/default/result_templates/torrent.html @@ -5,5 +5,9 @@

{{ result.title|safe }}

{{ result.pretty_url }}

{% if result.content %}

{{ result.content|safe }}

{% endif %} -

magnet link - Seed: {{ result.seed }}, Leech: {{ result.leech }}

+

+ {% if result.magnetlink %}{{ _('magnet link') }}{% endif %} + {% if result.torrentfile %}{{ _('torrent file') }}{% endif %} - + {{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }} +

diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/default/result_templates/videos.html index 75f965c80..ef6a1f505 100644 --- a/searx/templates/default/result_templates/videos.html +++ b/searx/templates/default/result_templates/videos.html @@ -1,6 +1,6 @@

{% if "icon_"~result.engine~".ico" in favicons %}{{result.engine}}{% endif %}{{ result.title|safe }}

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} - {{ result.title|striptags }} -

{{ result.url }}

+ {% if result.publishedDate %}{{ result.publishedDate }}
{% endif %} + {{ result.title|striptags }} +

{{ result.url }}

diff --git a/searx/templates/default/results.html b/searx/templates/default/results.html index 822960593..c83bf5c5d 100644 --- a/searx/templates/default/results.html +++ b/searx/templates/default/results.html @@ -1,5 +1,6 @@ {% extends "default/base.html" %} {% block title %}{{ q }} - {% endblock %} +{% block meta %}{% endblock %} {% block content %}