From 10a24bdc2c3870f07ec62dd710841628d325aaf6 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sun, 12 Feb 2017 15:06:01 +0100 Subject: [enh] add simple theme (WIP) --- .../templates/simple/result_templates/torrent.html | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 searx/templates/simple/result_templates/torrent.html (limited to 'searx/templates/simple/result_templates/torrent.html') diff --git a/searx/templates/simple/result_templates/torrent.html b/searx/templates/simple/result_templates/torrent.html new file mode 100644 index 000000000..3c7fd15e8 --- /dev/null +++ b/searx/templates/simple/result_templates/torrent.html @@ -0,0 +1,24 @@ +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, result_link %} + +{{ result_header(result, favicons, image_proxify) -}} +{{- result_sub_header(result) -}} + +{% if result.magnetlink %}{% endif %} +{% if result.torrentfile %}{% endif %} + +{% if result.seed %}

• {{ icon('arrow-swap') }} {{ _('Seeder') }} {{ result.seed }} • {{ _('Leecher') }} {{ result.leech }}

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

{{ icon('floppy-disk') }} {{ _('Filesize') }} + {%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }} + {%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }} + {%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }} + {%- elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }} + {%- else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif -%} +

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

{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}

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

{{ result.content|safe }}

{% endif -%} +{{- result_sub_footer(result, proxify) -}} +{{- result_footer(result) }} -- cgit v1.2.3