mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[fix] simple-theme templates: polish HTML <img> elements
- <img> [1] element does not have an end tag, no need for a leading `/>`
- add global attribute title[2] to result_templates/images.html (result-images-source)
- in jinja macro 'macro result_header' remove duplicate of class="image"
- in jinja macro 'macro result_header' remove alt attribute (fix [3])::
alt="{{ result.title|striptags }}"
the result.title is already shown in::
<h3>{{ result_link(result.url, result.title|safe) }}</h3>
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title
[3] https://github.com/searxng/searxng/issues/523
Closes: https://github.com/searxng/searxng/issues/523
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
bd285de48a
commit
8fbffb1409
3 changed files with 10 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<aside class="infobox">
|
||||
<h2><bdi>{{ infobox.infobox }}</bdi></h2>
|
||||
{% if infobox.img_src %}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
|
||||
{% if infobox.img_src %}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}">{%- endif -%}
|
||||
<p><bdi>{{ infobox.content | safe }}</bdi></p>
|
||||
{% if infobox.attributes %}
|
||||
<div class="attributes">
|
||||
|
|
@ -8,15 +8,15 @@
|
|||
<dl>
|
||||
<dt><bdi>{{ attribute.label }} :</bdi></dt>
|
||||
{%- if attribute.image -%}
|
||||
<dd><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></dd>
|
||||
<dd><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}"></dd>
|
||||
{%- else -%}
|
||||
<dd><bdi>{{ attribute.value }}</bdi></dd>
|
||||
{%- endif -%}
|
||||
</dl>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if infobox.urls %}
|
||||
<div class="urls">
|
||||
<ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue