From 2fc1de54da6c81ab99240b2f69319dfc62d6dd2e Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Fri, 16 Jan 2015 00:56:54 +0100 Subject: [PATCH] Lots of courgette modification --- searx/templates/courgette/about.html | 4 +- searx/templates/courgette/base.html | 63 +++++----- searx/templates/courgette/categories.html | 12 +- searx/templates/courgette/github_ribbon.html | 2 +- searx/templates/courgette/index.html | 8 +- searx/templates/courgette/preferences.html | 108 +++++++++--------- .../courgette/result_templates/code.html | 12 +- .../courgette/result_templates/default.html | 18 +-- .../courgette/result_templates/images.html | 4 +- .../courgette/result_templates/map.html | 20 ++-- .../courgette/result_templates/torrent.html | 14 ++- .../courgette/result_templates/videos.html | 16 +-- searx/templates/courgette/results.html | 67 ++++++----- searx/templates/courgette/search.html | 12 +- searx/templates/courgette/stats.html | 8 +- 15 files changed, 192 insertions(+), 176 deletions(-) diff --git a/searx/templates/courgette/about.html b/searx/templates/courgette/about.html index 19aba1905..1c2e0635d 100644 --- a/searx/templates/courgette/about.html +++ b/searx/templates/courgette/about.html @@ -1,6 +1,6 @@ -{% extends 'default/base.html' %} +{% extends 'courgette/base.html' %} {% block content %} -{% include 'default/github_ribbon.html' %} +{% include 'courgette/github_ribbon.html' %}

About searx

diff --git a/searx/templates/courgette/base.html b/searx/templates/courgette/base.html index 382b8d5ed..89e9ea8bd 100644 --- a/searx/templates/courgette/base.html +++ b/searx/templates/courgette/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 %} + +
+ + \ No newline at end of file diff --git a/searx/templates/courgette/categories.html b/searx/templates/courgette/categories.html index 57e63c85d..b8d6a75e0 100644 --- a/searx/templates/courgette/categories.html +++ b/searx/templates/courgette/categories.html @@ -1,7 +1,9 @@
-{% for category in categories %} -
- +
+ {% for category in categories %} +
+ +
+ {% endfor %}
-{% endfor %} -
+
\ No newline at end of file diff --git a/searx/templates/courgette/github_ribbon.html b/searx/templates/courgette/github_ribbon.html index bdd9cf180..67c6e678f 100644 --- a/searx/templates/courgette/github_ribbon.html +++ b/searx/templates/courgette/github_ribbon.html @@ -1,3 +1,3 @@ Fork me on GitHub - + \ No newline at end of file diff --git a/searx/templates/courgette/index.html b/searx/templates/courgette/index.html index b4f55608b..810d75165 100644 --- a/searx/templates/courgette/index.html +++ b/searx/templates/courgette/index.html @@ -1,12 +1,12 @@ -{% extends "default/base.html" %} +{% extends "courgette/base.html" %} {% block content %} -{% include 'default/github_ribbon.html' %} +{% include 'courgette/github_ribbon.html' %}

searx

- {% include 'default/search.html' %} + {% include 'courgette/search.html' %}

{{ _('about') }} {{ _('preferences') }}

-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/searx/templates/courgette/preferences.html b/searx/templates/courgette/preferences.html index 7d35de7c3..c492e3751 100644 --- a/searx/templates/courgette/preferences.html +++ b/searx/templates/courgette/preferences.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "courgette/base.html" %} {% block head %} {% endblock %} {% block content %}
@@ -7,95 +7,93 @@
{{ _('Default categories') }} -

- {% include 'default/categories.html' %} -

+ {% include 'courgette/categories.html' %}
{{ _('Search language') }}

- +

{{ _('Interface language') }}

- +

{{ _('Autocomplete') }}

- +

{{ _('Method') }}

- +

{{ _('Themes') }}

- +

- {{ _('Currently used search engines') }} + {{ _('Currently used search engines') }} - - - - - - - {% for (categ,search_engines) in categs %} - {% for search_engine in search_engines %} - - {% if not search_engine.private %} +
{{ _('Engine name') }}{{ _('Category') }}{{ _('Allow') }} / {{ _('Block') }}
- - - + + + - {% endif %} + {% for (categ,search_engines) in categs %} + {% for search_engine in search_engines %} + + {% if not search_engine.private %} + + + + + + {% endif %} + {% endfor %} {% endfor %} - {% endfor %} -
{{ search_engine.name }} ({{ shortcuts[search_engine.name] }}){{ _(categ) }} - - - - {{ _('Engine name') }}{{ _('Category') }}{{ _('Allow') }} / {{ _('Block') }}
{{ search_engine.name }} ({{ shortcuts[search_engine.name] }}){{ _(categ) }} + + + +
+

{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} -
- {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} +
+ {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}

- +
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html index 616b7ea62..444366b85 100644 --- a/searx/templates/courgette/result_templates/code.html +++ b/searx/templates/courgette/result_templates/code.html @@ -1,9 +1,9 @@
-

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

-

{{ result.pretty_url }} cached

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} +

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

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

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

- {% if result.repository %}

{{ result.repository }}

{% endif %} - + {% if result.repository %}

{{ result.repository }}

{% endif %} {{ result.codelines|code_highlighter(result.code_language)|safe }} -
+ +

{{ result.pretty_url }}

+
\ No newline at end of file diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html index 710b0a8e7..efd9778dc 100644 --- a/searx/templates/courgette/result_templates/default.html +++ b/searx/templates/courgette/result_templates/default.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 }}

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} -

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

-

{{ result.pretty_url }}

-
-
+
+

{{ result.title|safe }}

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

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

+

{{ result.pretty_url }}

+
+ \ No newline at end of file diff --git a/searx/templates/courgette/result_templates/images.html b/searx/templates/courgette/result_templates/images.html index ebda5380b..0ff887101 100644 --- a/searx/templates/courgette/result_templates/images.html +++ b/searx/templates/courgette/result_templates/images.html @@ -1,6 +1,6 @@

{{ result.title|striptags }} - original context + {{ _('original context') }}

-
+ \ No newline at end of file diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html index 4919954e0..efd9778dc 100644 --- a/searx/templates/courgette/result_templates/map.html +++ b/searx/templates/courgette/result_templates/map.html @@ -1,13 +1,13 @@
- {% if "icon_"~result.engine~".ico" in favicons %} - {{result.engine}} - {% endif %} + {% if "icon_"~result.engine~".ico" in favicons %} + {{result.engine}} + {% endif %} -
-

{{ result.title|safe }}

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} -

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

-

{{ result.pretty_url }}

-
-
+
+

{{ result.title|safe }}

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

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

+

{{ result.pretty_url }}

+
+ \ No newline at end of file diff --git a/searx/templates/courgette/result_templates/torrent.html b/searx/templates/courgette/result_templates/torrent.html index 6c62793a5..607c1de02 100644 --- a/searx/templates/courgette/result_templates/torrent.html +++ b/searx/templates/courgette/result_templates/torrent.html @@ -1,7 +1,13 @@
+ {% if "icon_"~result.engine~".ico" in favicons %} + {{result.engine}} + {% endif %}

{{ result.title|safe }}

- {% if result.content %}

{{ result.content|safe }}

{% endif %} -

Seed: {{ result.seed }}, Leech: {{ result.leech }}

-

magnet link

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

{{ result.pretty_url }}

-
+ \ No newline at end of file diff --git a/searx/templates/courgette/result_templates/videos.html b/searx/templates/courgette/result_templates/videos.html index bb711caab..ebb7af4e4 100644 --- a/searx/templates/courgette/result_templates/videos.html +++ b/searx/templates/courgette/result_templates/videos.html @@ -1,10 +1,10 @@
- {% if "icon_"~result.engine~".ico" in favicons %} - {{result.engine}} - {% endif %} + {% if "icon_"~result.engine~".ico" in favicons %} + {{result.engine}} + {% endif %} -

{{ result.title|safe }}

- {% if result.publishedDate %}

{{ result.publishedDate }}

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

{{ result.url }}

-
+

{{ result.title|safe }}

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

{{ result.pretty_url }}

+ \ No newline at end of file diff --git a/searx/templates/courgette/results.html b/searx/templates/courgette/results.html index 8b5135c02..de3c4e678 100644 --- a/searx/templates/courgette/results.html +++ b/searx/templates/courgette/results.html @@ -1,9 +1,10 @@ -{% extends "default/base.html" %} +{% extends "courgette/base.html" %} {% block title %}{{ q }} - {% endblock %} +{% block meta %}{% endblock %} {% block content %} -
preferences
+
{{ _('preferences') }}
- {{ _('Download results') }} - {% for output_type in ('csv', 'json', 'rss') %} -
-
- - - {% for category in selected_categories %} - + {{ _('Download results') }} + {% for output_type in ('csv', 'json', 'rss') %} + +
+ + + {% for category in selected_categories %} + + {% endfor %} + + +
+ {% endfor %} - - -
- - {% endfor %}
+ + {% if answers %} +
{{ _('Answers') }} + {% for answer in answers %} + {{ answer }} + {% endfor %} +
+ {% endif %} {% if suggestions %}
{{ _('Suggestions') }} @@ -54,26 +63,26 @@ {% if pageno > 1 %}
- - {% for category in selected_categories %} - - {% endfor %} - - + + {% for category in selected_categories %} + + {% endfor %} + +
{% endif %}
- {% for category in selected_categories %} - - {% endfor %} - - - + {% for category in selected_categories %} + + {% endfor %} + + +
{% endif %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/searx/templates/courgette/search.html b/searx/templates/courgette/search.html index 8a9965582..bd4efd42f 100644 --- a/searx/templates/courgette/search.html +++ b/searx/templates/courgette/search.html @@ -1,7 +1,7 @@
-
- - -
- {% include 'default/categories.html' %} -
+
+ + +
+ {% include 'courgette/categories.html' %} + \ No newline at end of file diff --git a/searx/templates/courgette/stats.html b/searx/templates/courgette/stats.html index 70fe98ac7..b9aafbb79 100644 --- a/searx/templates/courgette/stats.html +++ b/searx/templates/courgette/stats.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "courgette/base.html" %} {% block head %} {% endblock %} {% block content %}

{{ _('Engine stats') }}

@@ -6,8 +6,8 @@ {% for stat_name,stat_category in stats %}
- - + + {% for engine in stat_category %} @@ -19,4 +19,4 @@
{{ stat_name }}
{{ stat_name }}
{% endfor %} -{% endblock %} +{% endblock %} \ No newline at end of file