mirror of
https://github.com/searxng/searxng.git
synced 2026-01-17 03:55:29 +00:00
[mod] result_templates/videos.html: replace embedded HTML by data_src
Embedded HTML breaks SearXNG architecture. To modularize, HTML is generated in the templates (oscar & simple) and result parameter 'embedded' is replaced by 'data_src', an URL for embedded content (<iframe>). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
{{- result_header(result, favicons, loop.index) -}}
|
||||
{{- result_sub_header(result, loop.index) -}}
|
||||
|
||||
{%- if result.embedded -%}
|
||||
{%- if result.data_src -%}
|
||||
<small> • <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}" aria-labelledby="result-{{loop.index}}">{{ icon('film') }} {{ _('show video') }}</a></small>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if result.embedded -%}
|
||||
<div id="result-video-{{ index }}" class="collapse">
|
||||
{{- result.embedded|safe -}}
|
||||
{% if result.data_src -%}
|
||||
<div id="result-video-{{ index }}" class="embedded-video collapse">
|
||||
<iframe data-src="{{result.data_src}}" width="540" height="304" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
||||
|
||||
<div class="container-fluid">{{- "" -}}
|
||||
<div class="row">{{- "" -}}
|
||||
|
||||
Reference in New Issue
Block a user