summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/result_templates/torrent.html
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-01-15 18:26:00 +0100
committerAdam Tauber <asciimoo@gmail.com>2015-01-15 18:26:00 +0100
commita04fafd419bd465c533cc223e4036e1ca0997d5f (patch)
treef739d7d4567fcc8b1691bbef24deb9cb13ce7e14 /searx/templates/oscar/result_templates/torrent.html
parentc5599e3c7c790ac2674b68f99919c0ec284327a3 (diff)
parent400b54191c590663f0cfe91045f70a5d9223aa19 (diff)
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
Diffstat (limited to 'searx/templates/oscar/result_templates/torrent.html')
-rw-r--r--searx/templates/oscar/result_templates/torrent.html49
1 files changed, 21 insertions, 28 deletions
diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html
index 9e39776e0..53d8ed6fa 100644
--- a/searx/templates/oscar/result_templates/torrent.html
+++ b/searx/templates/oscar/result_templates/torrent.html
@@ -1,28 +1,21 @@
-{% from 'oscar/macros.html' import icon %}
-
-<h4 class="result_header">{% if result.engine~".png" in favicons %}<img width="32" height="32" class="favicon" src="{{ url_for('static', filename='img/icons/'+result.engine+'.png') }}" alt="{{ result.engine }}" /> {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h4>
-
-{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
-<small><a class="text-info" href="https://web.archive.org/web/{{ result.url }}">{{ icon('link') }} {{ _('cached') }}</a></small>
-{% if result.magnetlink %}<small> &bull; <a href="{{ result.magnetlink }}" class="magnetlink">{{ icon('magnet') }} {{ _('magnet link') }}</a></small>{% endif %}
-{% if result.torrentfile %}<small> &bull; <a href="{{ result.torrentfile }}" class="torrentfile">{{ icon('download-alt') }} {{ _('torrent file') }}</a></small>{% endif %}
-
-<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>
-
-<div class="clearfix"></div>
-
-<span class="label label-default pull-right">{{ result.engine }}</span>
-<p class="text-muted">{{ result.pretty_url }}</p>
+{% 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) }}