diff options
| author | a01200356 <a01200356@itesm.mx> | 2016-02-27 19:19:04 -0600 |
|---|---|---|
| committer | a01200356 <a01200356@itesm.mx> | 2016-02-27 19:19:04 -0600 |
| commit | 4267b11a45b7427bcba91259fcda202bd049f004 (patch) | |
| tree | 69280e76e9fc5066111aeb05d33759c0d26f4ad1 /searx/templates/default | |
| parent | 78d3f3d6b116e0aca8af8b939d5a98ea74bb8de3 (diff) | |
[fix] apply changes in infobox's styles
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.
Diffstat (limited to 'searx/templates/default')
| -rw-r--r-- | searx/templates/default/infobox.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html index 1733f7753..178a27e6d 100644 --- a/searx/templates/default/infobox.html +++ b/searx/templates/default/infobox.html @@ -7,7 +7,14 @@ <div class="attributes"> <table> {% for attribute in infobox.attributes %} - <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr> + <tr> + <td>{{ attribute.label }}</td> + {% if attribute.image %} + <td><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td> + {% else %} + <td>{{ attribute.value }}</td> + {% endif %} + </tr> {% endfor %} </table> </div> |