mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 12:51:02 +00:00
98cab4cf75
Embedded HTML breaks SearXNG architecture. To modularize, HTML is generated in the templates (oscar & simple) and result parameter 'embedded' is replaced by 'data_src' (and 'audio_src'), an URL for embedded content (<iframe>). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
28 lines
1.2 KiB
HTML
28 lines
1.2 KiB
HTML
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl with context %}
|
|
|
|
{{ result_header(result, favicons, image_proxify) -}}
|
|
{{- result_sub_header(result) -}}
|
|
{% if result.data_src -%}
|
|
<p class="altlink"> • <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music-note') }} {{ _('show media') }}</a></p>
|
|
{%- endif %}
|
|
{%- if result.content %}
|
|
<p class="content">
|
|
{{ result.content|safe }}
|
|
</p>
|
|
{%- else %}
|
|
<p class="content empty_element">
|
|
{{ _('This site did not provide any description.')|safe }}
|
|
</p>
|
|
{% endif -%}
|
|
{{- result_sub_footer(result, proxify) -}}
|
|
{% if result.data_src -%}
|
|
<div id="result-media-{{ index }}" class="embedded-content invisible">
|
|
<iframe data-src="{{result.data_src}}" frameborder="0" allowfullscreen></iframe>
|
|
</div>
|
|
{%- endif %}
|
|
{% if result.audio_src -%}
|
|
<div id="result-media-{{ index }}" class="audio-control">
|
|
<audio controls><source src="{{result.audio_src}}"></audio>
|
|
</div>
|
|
{%- endif %}
|
|
{{- result_footer(result) }}
|