1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 12:50:11 +01:00
searxng/searx/templates/oscar/result_templates/torrent.html
Adam Tauber a04fafd419 Merge branch 'code_results' of https://github.com/pointhi/searx into pointhi-code_results
Conflicts:
	searx/static/themes/default/css/style.css
	searx/static/themes/oscar/css/oscar.min.css
	searx/templates/oscar/result_templates/torrent.html
2015-01-15 18:26:00 +01:00

22 lines
1.2 KiB
HTML

{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>
{% if result.filesize %}<br />{{ 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>{% endif %}
{% if result.files %}<br />{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span>{% endif %}
{% if result.content %}<br />{{ result.content|safe }}{% endif %}
</p>
{{ result_footer(result) }}