summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/result_templates/torrent.html
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-03-18 09:50:52 +0100
committerGitHub <noreply@github.com>2021-03-18 09:50:52 +0100
commit7e5553ddb6662c9f6eb46adf77cee84dbcedf2aa (patch)
tree4d434568583920d93272017e900fe4744cb2a221 /searx/templates/oscar/result_templates/torrent.html
parent11070e57449caf86fd6087116e24bed8bea54e63 (diff)
parent2b0dd96bd34a086b9bc4e008823b73bf4fcd8133 (diff)
downloadsearxng-7e5553ddb6662c9f6eb46adf77cee84dbcedf2aa.tar.gz
searxng-7e5553ddb6662c9f6eb46adf77cee84dbcedf2aa.zip
Merge pull request #2662 from dalf/oscar-trim-space
[mod] oscar: remove space
Diffstat (limited to 'searx/templates/oscar/result_templates/torrent.html')
-rw-r--r--searx/templates/oscar/result_templates/torrent.html30
1 files changed, 15 insertions, 15 deletions
diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html
index 0bba61417..9f6671549 100644
--- a/searx/templates/oscar/result_templates/torrent.html
+++ b/searx/templates/oscar/result_templates/torrent.html
@@ -1,25 +1,25 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
-{{ result_header(result, favicons, loop.index) }}
-{{ result_sub_header(result, loop.index) }}
+{{- result_header(result, favicons, loop.index) -}}
+{{- result_sub_header(result, loop.index) -}}
-{% if result.seed is defined %}<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>{% endif %}
-{% if result.filesize %}<br />{{ icon('floppy-disk') }} {{ _('Filesize') }}
+{%- if result.seed is defined %}<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>{% endif -%}
+{%- 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.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 %}
+{%- if result.content %}<br />{{ result.content|safe }}{% endif -%}
</p>
-{% if rtl %}
+{%- if rtl -%}
{{ result_footer_rtl(result, loop.index) }}
-{% else %}
+{%- else -%}
{{ result_footer(result, loop.index) }}
-{% endif %}
+{%- endif -%}