searxng/searx/templates/oscar/infobox.html

41 lines
1.7 KiB
HTML
Raw Normal View History

{% from 'oscar/macros.html' import result_link with context %}
2014-10-05 13:29:21 +00:00
<div class="panel panel-default infobox">
2019-08-06 09:41:16 +00:00
<div class="panel-heading">{{- "" -}}
<h4 class="panel-title infobox_part"><bdi>{{ infobox.infobox }}</bdi></h4>{{- "" -}}
2014-10-05 13:29:21 +00:00
</div>
<div class="panel-body">
2015-01-17 21:36:48 +00:00
{% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %}
2014-10-05 13:29:21 +00:00
{% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content | safe }}</p></bdi>{% endif %}
2019-08-06 09:41:16 +00:00
{% if infobox.attributes -%}
2014-10-05 13:29:21 +00:00
<table class="table table-striped infobox_part">
2019-08-06 09:41:16 +00:00
{% for attribute in infobox.attributes -%}
<tr>{{- "" -}}
<td><bdi>{{ attribute.label }}</bdi></td>
2019-08-06 09:41:16 +00:00
{%- if attribute.image -%}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
2019-08-06 09:41:16 +00:00
{%- else -%}
{% if attribute.label == 'Instance of' %}
<td><bdi><a href="https://wikidata.org/wiki/{{ attribute.value.id }}">{{ attribute.value.id }}</a></bdi></td>
{% else %}
<td><bdi>{{ attribute.value }}</bdi></td>
{%- endif -%}
2019-08-06 09:41:16 +00:00
{%- endif -%}
2014-10-05 13:29:21 +00:00
</tr>
2019-08-06 09:41:16 +00:00
{% endfor -%}
2014-10-05 13:29:21 +00:00
</table>
{% endif %}
2019-08-06 09:41:16 +00:00
{% if infobox.urls -%}
<div class="infobox_part">{{- "\n" -}}
<bdi>
2019-08-06 09:41:16 +00:00
{%- for url in infobox.urls -%}
<p class="btn btn-default btn-xs">{{ result_link(url.url, url.title) }}</p>
{% endfor -%}
</bdi>{{- "" -}}
2014-10-05 13:29:21 +00:00
</div>
{% endif %}
</div>
</div>