summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/infobox.html
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates/oscar/infobox.html')
-rw-r--r--searx/templates/oscar/infobox.html25
1 files changed, 21 insertions, 4 deletions
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
index 9802f11e2..5ba4aa5f0 100644
--- a/searx/templates/oscar/infobox.html
+++ b/searx/templates/oscar/infobox.html
@@ -1,10 +1,19 @@
{% from 'oscar/macros.html' import result_link with context %}
<div class="panel panel-default infobox">
<div class="panel-heading">{{- "" -}}
- <h4 class="panel-title infobox_part"><bdi>{{ infobox.infobox }}</bdi></h4>{{- "" -}}
+ <div class="infobox_part">
+ <div class="{% if not rtl %}pull-right{% endif %}">
+ {% for engine in infobox.engines %}
+ <span class="label label-default">{{ engine }}</span>
+ {% endfor %}
+ </div>
+ <h4 class="panel-title"><bdi>{{ infobox.infobox }}</bdi></h4>{{- "" -}}
+ {% for u in infobox.urls %}{% if u.official %} <a class="header_url" href="{{ u.url }}">{{ u.url }}</a>{% endif %}{% endfor %}
+ </div>
</div>
- <div class="panel-body">
- {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %}
+ <input type="checkbox" class="infobox_checkbox" id="expand_infobox_{{ infobox.engine }}" hidden>
+ <div class="panel-body infobox_body">
+ {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" />{% endif %}
{% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content | safe }}</p></bdi>{% endif %}
@@ -16,7 +25,11 @@
{%- if attribute.image -%}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{%- else -%}
- <td><bdi>{{ attribute.value }}</bdi></td>
+ {% 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 -%}
{%- endif -%}
</tr>
{% endfor -%}
@@ -33,4 +46,8 @@
</div>
{% endif %}
</div>
+ <label for="expand_infobox_{{ infobox.engine }}" class="infobox_toggle panel-footer">
+ <span class="infobox_label_down glyphicon glyphicon-chevron-down"></span>
+ <span class="infobox_label_up glyphicon glyphicon-chevron-up"></span>
+ </label>
</div>