From 29a526ff0e33030fc9d1416a9ccfeba93e376664 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 10 Jan 2015 15:24:21 +0100 Subject: [enh] add rss-link which can be detected by browsers --- searx/templates/oscar/base.html | 1 + searx/templates/oscar/results.html | 1 + 2 files changed, 2 insertions(+) (limited to 'searx/templates') diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index e46024d17..466756b6f 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -7,6 +7,7 @@ + {% block meta %}{% endblock %} {% block title %}{% endblock %}searx diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 380947ca0..46c230695 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -1,5 +1,6 @@ {% extends "oscar/base.html" %} {% block title %}{{ q }} - {% endblock %} +{% block meta %}{% endblock %} {% block content %}
-- cgit v1.2.3 From 830f70a6bc2a6e0b7a78d0a13277b28f03c18504 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 10 Jan 2015 19:40:27 +0100 Subject: [enh] improve torrent results --- searx/templates/oscar/result_templates/torrent.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html index bfb6cdbe6..f62a7a85b 100644 --- a/searx/templates/oscar/result_templates/torrent.html +++ b/searx/templates/oscar/result_templates/torrent.html @@ -5,9 +5,19 @@ {% if result.publishedDate %}{% endif %} {{ icon('link') }} {{ _('cached') }} -

{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }}, {{ _('Leecher') }} {{ result.leech }} -
-{{ icon('magnet') }} magnet link

+

{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }} • {{ _('Leecher') }} {{ result.leech }} +{% if result.filesize %}
{{ icon('floppy-disk') }} {{ _('Filesize') }} + + {% if result.filesize < 1024 %}{{ result.filesize }} Byte + {% elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} kb + {% elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} MB + {% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} GB{% endif %} + {% endif %} +{% if result.files %}
{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}{% endif %}

+

+ {{ icon('magnet') }} magnet link + {% if result.torrentfile %}
{{ icon('download-alt') }} torrent file{% endif %} +

{% if result.content %}

{{ result.content|safe }}

{% endif %} -- cgit v1.2.3 From 08f820d74c7de4309fe8227da5c10e4179cef54f Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 10 Jan 2015 19:42:41 +0100 Subject: [enh] make some torrent strings translatable --- searx/templates/oscar/result_templates/torrent.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html index f62a7a85b..5268869ca 100644 --- a/searx/templates/oscar/result_templates/torrent.html +++ b/searx/templates/oscar/result_templates/torrent.html @@ -15,8 +15,8 @@ {% endif %} {% if result.files %}
{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}{% endif %}

- {{ icon('magnet') }} magnet link - {% if result.torrentfile %}
{{ icon('download-alt') }} torrent file{% endif %} + {{ icon('magnet') }} {{ _('magnet link') }} + {% if result.torrentfile %}
{{ icon('download-alt') }} {{ _('torrent file') }}{% endif %}

{% if result.content %}

{{ result.content|safe }}

{% endif %} -- cgit v1.2.3 From eb6f3348c43f3456fa40716589967ec8a5ec53e2 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 10 Jan 2015 19:44:08 +0100 Subject: [enh] display filesize greater 1TB --- searx/templates/oscar/result_templates/torrent.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html index 5268869ca..9258a0cb7 100644 --- a/searx/templates/oscar/result_templates/torrent.html +++ b/searx/templates/oscar/result_templates/torrent.html @@ -11,7 +11,8 @@ {% if result.filesize < 1024 %}{{ result.filesize }} Byte {% elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} kb {% elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} MB - {% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} GB{% endif %} + {% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} GB + {% else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} TB{% endif %} {% endif %} {% if result.files %}
{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}{% endif %}

-- cgit v1.2.3 From 9109686c4e7208e0c228afcc8dfe5e20e24d598d Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 10 Jan 2015 20:26:17 +0100 Subject: [enh] using less html code to disable autoescaping for embeded results --- searx/templates/oscar/result_templates/default.html | 4 +--- searx/templates/oscar/result_templates/videos.html | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 25506b2f5..b2430ed6a 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -11,9 +11,7 @@ {% if result.embedded %}

-{% autoescape false %} - {{ result.embedded }} -{% endautoescape %} + {{ result.embedded|safe }}
{% endif %} diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html index 32000e662..c3d02c14d 100644 --- a/searx/templates/oscar/result_templates/videos.html +++ b/searx/templates/oscar/result_templates/videos.html @@ -11,9 +11,7 @@ {% if result.embedded %}
-{% autoescape false %} - {{ result.embedded }} -{% endautoescape %} + {{ result.embedded|safe }}
{% endif %} -- cgit v1.2.3