diff options
author | Markus Heiser <markus.heiser@darmarIT.de> | 2019-12-10 16:02:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-10 16:02:54 +0000 |
commit | 50e1fcaa5e7369a64829552fc96cd24c787706c9 (patch) | |
tree | f1350147393a2153246e76f5438613c2f3725c53 /searx/templates/oscar/infobox.html | |
parent | f7a0510ac0e1853e3662b39254f3eb9be0efa2b0 (diff) | |
parent | 7fbb15e05070de26c3b5b1958a2c2a42208bbe8b (diff) | |
download | searxng-50e1fcaa5e7369a64829552fc96cd24c787706c9.tar.gz searxng-50e1fcaa5e7369a64829552fc96cd24c787706c9.zip |
Merge pull request #1671 from dalf/tidy-oscar
[mod] tidy oscar HTML output
Diffstat (limited to 'searx/templates/oscar/infobox.html')
-rw-r--r-- | searx/templates/oscar/infobox.html | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html index c98fb0e63..9f5e58d2b 100644 --- a/searx/templates/oscar/infobox.html +++ b/searx/templates/oscar/infobox.html @@ -1,34 +1,35 @@ {% 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="panel-heading">{{- "" -}} + <h4 class="panel-title infobox_part"><bdi>{{ infobox.infobox }}</bdi></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 %}<bdi><p class="infobox_part">{{ infobox.content }}</bdi></p>{% endif %} - {% if infobox.attributes %} + {% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content }}</p></bdi>{% endif %} + + {% if infobox.attributes -%} <table class="table table-striped infobox_part"> - {% for attribute in infobox.attributes %} - <tr> + {% for attribute in infobox.attributes -%} + <tr>{{- "" -}} <td><bdi>{{ attribute.label }}</bdi></td> - {% if attribute.image %} + {%- if attribute.image -%} <td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td> - {% else %} + {%- else -%} <td><bdi>{{ attribute.value }}</bdi></td> - {% endif %} + {%- endif -%} </tr> - {% endfor %} + {% endfor -%} </table> {% endif %} - {% if infobox.urls %} - <div class="infobox_part"> + {% if infobox.urls -%} + <div class="infobox_part">{{- "\n" -}} <bdi> - {% for url in infobox.urls %} - <p class="btn btn-default btn-xs">{{ result_link(url.url, url.title) }}</a></p> - {% endfor %} - </bdi> + {%- for url in infobox.urls -%} + <p class="btn btn-default btn-xs">{{ result_link(url.url, url.title) }}</p> + {% endfor -%} + </bdi>{{- "" -}} </div> {% endif %} </div> |