diff options
| author | Bnyro <bnyro@tutanota.com> | 2025-10-12 20:18:10 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2025-10-17 15:59:53 +0200 |
| commit | 636738779eb3af5b2756473c7123586d6f72222c (patch) | |
| tree | e3f31e5d93ad9bd0639c3fe26aed716be1d39f15 /searx | |
| parent | 1d138c5968c373c58f2c45fbea7fd30e59bb35a8 (diff) | |
[feat] video results: display video length on video thumbnail
Diffstat (limited to 'searx')
| -rw-r--r-- | searx/templates/simple/macros.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index df8469d72..43be87615 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -30,14 +30,15 @@ {%- endfor %} </div> {{- result_close_link() -}} - {%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" loading="lazy">{{ result_close_link() }}{% endif -%} + {%- if result.thumbnail %}{{ result_open_link(result.url, classes='thumbnail_link') }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" loading="lazy">{%- if result.length -%}<span class="thumbnail_length">{{ result.length }}</span>{%- endif -%}{{ result_close_link() }}{% endif -%} <h3>{{ result_link(result.url, result.title|safe) }}</h3> {%- endmacro -%} <!-- Draw result sub header --> {%- macro result_sub_header(result) -%} {%- if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif -%} - {%- if result.length %}<div class="result_length">{{ _('Length') }}: {{ result.length }}</div>{% endif -%} + <!-- Length is displayed inside the thumbnail if there's any, so don't display it here a second time --> + {%- if result.length and not result.thumbnail %}<div class="result_length">{{ _('Length') }}: {{ result.length }}</div>{% endif -%} {%- if result.views %}<div class="result_views">{{ _('Views') }}: {{ result.views }}</div>{% endif -%} {%- if result.author %}<div class="result_author">{{ _('Author') }}: {{ result.author }}</div>{% endif -%} {%- if result.metadata %}<div class="highlight">{{ result.metadata|safe }}</div>{% endif -%} |