|
|
|
@ -15,28 +15,13 @@ |
|
|
|
|
<!-- Draw result header --> |
|
|
|
|
{% macro result_header(result) -%} |
|
|
|
|
<h3>{% if result.url %}{{ result_link(result.url, result.title|safe) }}{% else %}{{ result.title|safe}}{% endif %}</h3> |
|
|
|
|
<p>{{ result.url }}</p> |
|
|
|
|
<p>{{ result.url }} |
|
|
|
|
<span>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + 'cached') }}</span> |
|
|
|
|
<span>{{ result_link("https://haku.ahmia.fi/morty/post?mortyurl=" + result.url, icon('link') + 'proxy') }}</span> |
|
|
|
|
</p> |
|
|
|
|
{%- endmacro %} |
|
|
|
|
|
|
|
|
|
<!-- Draw result sub header --> |
|
|
|
|
{% macro result_sub_header(result, id) -%} |
|
|
|
|
{%- if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif -%} |
|
|
|
|
{%- if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif -%} |
|
|
|
|
{%- if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif -%} |
|
|
|
|
{%- endmacro %} |
|
|
|
|
|
|
|
|
|
<!-- Draw result footer --> |
|
|
|
|
{% macro result_footer(result) -%} |
|
|
|
|
<div> |
|
|
|
|
{%- if result.url -%} |
|
|
|
|
{%- if result.cached_url -%} |
|
|
|
|
<small>{{ result_link(result.cached_url, icon('link') + _('cached')) }}</small> |
|
|
|
|
{%- elif not result.is_onion -%} |
|
|
|
|
<small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached')) }}</small> |
|
|
|
|
{%- endif -%} |
|
|
|
|
{%- endif -%} |
|
|
|
|
</div> |
|
|
|
|
{%- if result.pretty_url -%} |
|
|
|
|
<div class="external-link">{{ result.pretty_url }}</div> |
|
|
|
|
{%- endif -%} |
|
|
|
|
{%- endmacro %} |
|
|
|
|