@@ -8,34 +8,34 @@
88 <img width="32" height="32" class="favicon" src="{{ url_for('static', filename='themes/oscar/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
99{%- endmacro %}
1010
11−{%- macro result_link(url, title, classes='') -%}
12−<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a>
11+{%- macro result_link(url, title, classes='', id='') -%}
12+<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>
1313{%- endmacro -%}
1414
1515<!-- Draw result header -->
16−{% macro result_header(result, favicons) -%}
17−<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>
16+{% macro result_header(result, favicons, id) -%}
17+<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>
1818{%- endmacro %}
1919
2020<!-- Draw result sub header -->
21−{% macro result_sub_header(result) -%}
21+{% macro result_sub_header(result, id) -%}
2222 {% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
23− {% if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %}
24− {% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %}
23+ {% if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif %}
24+ {% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif %}
2525{%- endmacro %}
2626
2727<!-- Draw result footer -->
28−{% macro result_footer(result) -%}
28+{% macro result_footer(result, id) -%}
2929 <div class="clearfix"></div>{{- "" -}}
3030 <div class="pull-right">
3131 {%- for engine in result.engines -%}
3232 <span class="label label-default">{{ engine }}</span>
3333 {%- endfor -%}
3434 {%- if result.url -%}
35− <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
35+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
3636 {%- endif -%}
3737 {%- if proxify -%}
38− <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
38+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
3939 {%- endif -%}
4040 </div>
4141 {%- if result.pretty_url -%}
@@ -44,16 +44,16 @@
4444{%- endmacro %}
4545
4646<!-- Draw result footer -->
47−{% macro result_footer_rtl(result) -%}
47+{% macro result_footer_rtl(result, id) -%}
4848 <div class="clearfix"></div>{{- "" -}}
4949 {% for engine in result.engines -%}
5050 <span class="label label-default">{{ engine }}</span>
5151 {%- endfor %}
5252 {%- if result.url -%}
53− <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
53+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
5454 {%- endif -%}
5555 {% if proxify -%}
56− <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
56+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
5757 {%- endif %}
5858 {%- if result.pretty_url -%}
5959 <div class="external-link">{{ result.pretty_url }}</div>