forked from zaclys/searxng
4267b11a45
changes were made for wolframalpha infobox: - wrap text inside infobox. for example, there's a hill in New Zealand called Taumatawhakatangihangakoauauotamateapokaiwhenuakitanatahu (don't blame me, blame the Kiwis) and now it doesn't break the infobox. - add an optional image field for infobox's attributes. (doesn't affect ddg infobox at all) - table is now always split in half. needed so that images stay inside infobox. (max-width doesn't work for inline elements, it's the table that has to set the width. if you don't like how the table width looks now in ddg/wiki's infobox, i can change that code so that the style only applies when using wolframalpha.
33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
<div class="panel panel-default infobox">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title infobox_part">{{ infobox.infobox }}</h4>
|
|
</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 %}
|
|
{% if infobox.content %}<p class="infobox_part">{{ infobox.content }}</p>{% endif %}
|
|
|
|
{% if infobox.attributes %}
|
|
<table class="table table-striped infobox_part">
|
|
{% for attribute in infobox.attributes %}
|
|
<tr>
|
|
<td>{{ attribute.label }}</td>
|
|
{% if attribute.image %}
|
|
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
|
|
{% else %}
|
|
<td>{{ attribute.value }}</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if infobox.urls %}
|
|
<div class="infobox_part">
|
|
{% for url in infobox.urls %}
|
|
<p class="btn btn-default btn-xs"><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></p>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|