diff options
author | Frank de Lange <github-f@unternet.org> | 2019-08-06 09:31:24 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2019-08-06 09:31:24 +0200 |
commit | e4e8e6da4c90d3d65418aeaf1d7ebfc64c497685 (patch) | |
tree | 7f84eb6def9566d030113718bd6d18f2d891c0f6 /searx/templates/oscar/result_templates | |
parent | 88261e111ca2186f080c4048ab41b4c54cd5cf87 (diff) | |
download | searxng-e4e8e6da4c90d3d65418aeaf1d7ebfc64c497685.tar.gz searxng-e4e8e6da4c90d3d65418aeaf1d7ebfc64c497685.zip |
Add image format and source information to display (#1567)
Add image format and source information to display - needs changes to engines to actually display something.
Displays result.source (website from which the image was taken) and result.img_format (image type and size).
Result is styled with result-format and result-source classes. See PR #1566 for an example of an engine which has the necessary changes.
Strip <span class="highlight">...</span> in the oscar image template.
Diffstat (limited to 'searx/templates/oscar/result_templates')
-rw-r--r-- | searx/templates/oscar/result_templates/images.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index b23f34915..b3292f448 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -16,7 +16,17 @@ {% if result.author %}<span class="photo-author">{{ result.author }}</span><br />{% endif %}
{% if result.content %}
<p class="result-content">
- {{ result.content }}
+ {{ result.content|striptags }}
+ </p>
+ {% endif %}
+ {% if result.img_format %}
+ <p class="result-format">
+ {{ result.img_format }}
+ </p>
+ {% endif %}
+ {% if result.source %}
+ <p class="result-source">
+ {{ result.source }}
</p>
{% endif %}
</div>
|