|
@@ -8,34 +8,34 @@
|
|
|
<img width="32" height="32" class="favicon" src="{{ url_for('static', filename='themes/oscar/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
|
|
|
{%- endmacro %}
|
|
|
|
|
|
-{%- macro result_link(url, title, classes='') -%}
|
|
|
-<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a>
|
|
|
+{%- macro result_link(url, title, classes='', id='') -%}
|
|
|
+<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}{% if id %} aria-labelledby="result-{{id}}"{%endif%}>{{ title }}</a>
|
|
|
{%- endmacro -%}
|
|
|
|
|
|
|
|
|
-{% macro result_header(result, favicons) -%}
|
|
|
-<h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe) }}{% else %}{{ result.title|safe}}{% endif %}</h4>
|
|
|
+{% macro result_header(result, favicons, id) -%}
|
|
|
+<h4 class="result_header" id="result-{{id}}">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe, id=id) }}{% else %}{{ result.title|safe}}{% endif %}</h4>
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
|
-{% macro result_sub_header(result) -%}
|
|
|
+{% 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") }}</small>{% endif %}
|
|
|
- {% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% 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 %}
|
|
|
|
|
|
|
|
|
-{% macro result_footer(result) -%}
|
|
|
+{% macro result_footer(result, id) -%}
|
|
|
<div class="clearfix"></div>{{- "" -}}
|
|
|
<div class="pull-right">
|
|
|
{%- for engine in result.engines -%}
|
|
|
<span class="label label-default">{{ engine }}</span>
|
|
|
{%- endfor -%}
|
|
|
{%- if result.url -%}
|
|
|
- <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
|
|
|
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
|
|
|
{%- endif -%}
|
|
|
{%- if proxify -%}
|
|
|
- <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
|
|
|
+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
|
|
|
{%- endif -%}
|
|
|
</div>
|
|
|
{%- if result.pretty_url -%}
|
|
@@ -44,16 +44,16 @@
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
|
-{% macro result_footer_rtl(result) -%}
|
|
|
+{% macro result_footer_rtl(result, id) -%}
|
|
|
<div class="clearfix"></div>{{- "" -}}
|
|
|
{% for engine in result.engines -%}
|
|
|
<span class="label label-default">{{ engine }}</span>
|
|
|
{%- endfor %}
|
|
|
{%- if result.url -%}
|
|
|
- <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
|
|
|
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
|
|
|
{%- endif -%}
|
|
|
{% if proxify -%}
|
|
|
- <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
|
|
|
+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
|
|
|
{%- endif %}
|
|
|
{%- if result.pretty_url -%}
|
|
|
<div class="external-link">{{ result.pretty_url }}</div>
|