logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 27c0b39ba3dc69fb93eb0be744c257c35e426a03
parent: 9dc6bb56ca218579f9a1dc2e47bcf6634ed27c9f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 22 Aug 2017 22:05:59 +0200

searx/templates/simple/result_templates/torrent.html: Make it moar suckless

Diffstat:

searx/templates/simple/result_templates/torrent.html | 31++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/searx/templates/simple/result_templates/torrent.html b/searx/templates/simple/result_templates/torrent.html @@ -2,23 +2,20 @@ {{ result_header(result, favicons, image_proxify) -}} {{- result_sub_header(result) -}} - -{% if result.magnetlink %}<p class="altlink"> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</p>{% endif %} -{% if result.torrentfile %}<p class="altlink"> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %} - -{% if result.seed %}<p class="stat"> &bull; {{ icon('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %} - -{%- if result.filesize %}<p class="stat">{{ icon('floppy-disk') }} {{ _('Filesize') }}<span class="badge"> - {%- 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 -%} - </span></p> -{%- endif -%} - -{%- if result.files %}<p class="stat">{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%} - +<ul> +{% if result.magnetlink %}<li class="result_magnetlink">{{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</li>{% endif %} +{% if result.torrentfile %}<li class="result_torrentfile">{{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</li>{% endif %} +{% if result.seed %}<li class="result_seed">{{ _('Seeder') }} {{ result.seed }}</li>{% endif %} +{% if result.leech %}<li class="result_leech">{{ _('Leecher') }} {{ result.leech }}</li>{% endif %} +{%- if result.filesize %}<li class="result_filesize">{{ _('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 -%} +</li>{%- endif -%} +{%- if result.files %}<li class="result_files">{{ _('Number of Files') }} {{ result.files }}</li>{% endif -%} +</ul> {%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%} {{- result_sub_footer(result, proxify) -}} {{- result_footer(result) }}