From 77ba28cf505e7f0cdde294e8ad10f9c07db43f6a Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Fri, 13 Feb 2015 01:03:18 +0100 Subject: [PATCH] Some RTL fixes - Pull the suggestions to the right in oscar - Add `‎` to a few places to print good url - Always LTR code display - Order pref label and info in pref for mobile view And add `sort` for ui languages and languages to find them more easily. --- searx/templates/courgette/preferences.html | 4 ++-- searx/templates/courgette/result_templates/code.html | 4 +++- searx/templates/courgette/result_templates/default.html | 2 +- searx/templates/courgette/result_templates/map.html | 2 +- searx/templates/courgette/result_templates/torrent.html | 2 +- searx/templates/courgette/result_templates/videos.html | 2 +- searx/templates/courgette/results.html | 2 +- searx/templates/default/preferences.html | 4 ++-- searx/templates/default/result_templates/code.html | 6 ++++-- searx/templates/default/result_templates/default.html | 2 +- searx/templates/default/result_templates/map.html | 2 +- searx/templates/default/result_templates/torrent.html | 2 +- searx/templates/default/result_templates/videos.html | 2 +- searx/templates/oscar/macros.html | 6 +++--- searx/templates/oscar/preferences.html | 4 ++-- searx/templates/oscar/result_templates/code.html | 2 ++ searx/templates/oscar/results.html | 4 ++-- 17 files changed, 29 insertions(+), 23 deletions(-) diff --git a/searx/templates/courgette/preferences.html b/searx/templates/courgette/preferences.html index efa0f65f..2abfafb1 100644 --- a/searx/templates/courgette/preferences.html +++ b/searx/templates/courgette/preferences.html @@ -14,7 +14,7 @@

@@ -24,7 +24,7 @@ {{ _('Interface language') }}

diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html index 6721bd0f..382ce2a5 100644 --- a/searx/templates/courgette/result_templates/code.html +++ b/searx/templates/courgette/result_templates/code.html @@ -3,7 +3,9 @@ {% if result.publishedDate %}{{ result.publishedDate }}{% endif %}

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

{% if result.repository %}

{{ result.repository }}

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

{{ result.pretty_url }}

+

{{ result.pretty_url }}‎

diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html index efd9778d..f5f5acef 100644 --- a/searx/templates/courgette/result_templates/default.html +++ b/searx/templates/courgette/result_templates/default.html @@ -8,6 +8,6 @@

{{ result.title|safe }}

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

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

-

{{ result.pretty_url }}

+

{{ result.pretty_url }}‎

\ 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 efd9778d..f5f5acef 100644 --- a/searx/templates/courgette/result_templates/map.html +++ b/searx/templates/courgette/result_templates/map.html @@ -8,6 +8,6 @@

{{ result.title|safe }}

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

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

-

{{ result.pretty_url }}

+

{{ 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 607c1de0..b961eb09 100644 --- a/searx/templates/courgette/result_templates/torrent.html +++ b/searx/templates/courgette/result_templates/torrent.html @@ -9,5 +9,5 @@ {% if result.magnetlink %}{{ _('magnet link') }}{% endif %} {% if result.torrentfile %}{{ _('torrent file') }}{% endif %} -

{{ result.pretty_url }}

+

{{ 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 891b69f2..4e0174ba 100644 --- a/searx/templates/courgette/result_templates/videos.html +++ b/searx/templates/courgette/result_templates/videos.html @@ -6,5 +6,5 @@

{{ result.title|safe }}

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

{{ result.pretty_url }}

+

{{ result.pretty_url }}‎

diff --git a/searx/templates/courgette/results.html b/searx/templates/courgette/results.html index 6d603fde..619c9976 100644 --- a/searx/templates/courgette/results.html +++ b/searx/templates/courgette/results.html @@ -13,7 +13,7 @@
- {{ _('Download results') }} + {{ _('Download results') }}
{% for output_type in ('csv', 'json', 'rss') %}
diff --git a/searx/templates/default/preferences.html b/searx/templates/default/preferences.html index 43180fd5..e03c18e3 100644 --- a/searx/templates/default/preferences.html +++ b/searx/templates/default/preferences.html @@ -15,7 +15,7 @@

@@ -25,7 +25,7 @@ {{ _('Interface language') }}

diff --git a/searx/templates/default/result_templates/code.html b/searx/templates/default/result_templates/code.html index 751fb3b5..78eda188 100644 --- a/searx/templates/default/result_templates/code.html +++ b/searx/templates/default/result_templates/code.html @@ -1,9 +1,11 @@

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

-

{{ result.pretty_url }} {{ _('cached') }}

+

{{ result.pretty_url }}‎ {{ _('cached') }}

{% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %}

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

{% if result.repository %}

{{ result.repository }}

{% endif %} - + +
{{ result.codelines|code_highlighter(result.code_language)|safe }} +
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html index 167db888..4cbf231f 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') }} +

{{ 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/map.html b/searx/templates/default/result_templates/map.html index b0eda2be..e2d00f92 100644 --- a/searx/templates/default/result_templates/map.html +++ b/searx/templates/default/result_templates/map.html @@ -6,7 +6,7 @@

{{ result.title|safe }}

-

{{ result.pretty_url }} {{ _('cached') }} +

{{ 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 6a71f9ac..b91babfc 100644 --- a/searx/templates/default/result_templates/torrent.html +++ b/searx/templates/default/result_templates/torrent.html @@ -3,7 +3,7 @@ {{result.engine}} {% endif %}

{{ result.title|safe }}

-

{{ result.pretty_url }}

+

{{ result.pretty_url }}‎

{% if result.content %}

{{ result.content|safe }}

{% endif %}

{% if result.magnetlink %}{{ _('magnet link') }}{% endif %} diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/default/result_templates/videos.html index 29879919..b85b4cf5 100644 --- a/searx/templates/default/result_templates/videos.html +++ b/searx/templates/default/result_templates/videos.html @@ -2,5 +2,5 @@

{% 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.url }}‎

diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index 42721a81..1ba1617a 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -33,13 +33,14 @@ {% macro result_footer_rtl(result) -%}
{{ result.engine }} -

{{ result.pretty_url }}

+

{{ result.pretty_url }}‎

{%- endmacro %} {% macro preferences_item_header(info, label, rtl) -%} {% if rtl %}
- {{ info }} + + {{ info }}
{% else %}
@@ -51,7 +52,6 @@ {% macro preferences_item_footer(info, label, rtl) -%} {% if rtl %}
-
{% else %}
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index b98100e8..126bdbd7 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -44,7 +44,7 @@ {{ preferences_item_header(language_info, language_label, rtl) }} @@ -54,7 +54,7 @@ {% set locale_info = _('Change the language of the layout') %} {{ preferences_item_header(locale_info, locale_label, rtl) }} diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html index 0ec0983b..6890c785 100644 --- a/searx/templates/oscar/result_templates/code.html +++ b/searx/templates/oscar/result_templates/code.html @@ -7,7 +7,9 @@ {% if result.repository %}

{{ icon('file') }} {{ result.repository }}

{% endif %} +
{{ result.codelines|code_highlighter(result.code_language)|safe }} +
{% if rtl %} {{ result_footer_rtl(result) }} diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 8303573f..a7582561 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -91,7 +91,7 @@
{% for suggestion in suggestions %} - + @@ -115,7 +115,7 @@
{% for output_type in ('csv', 'json', 'rss') %} -
+ {% for category in selected_categories %}{% endfor %}