diff options
Diffstat (limited to 'searx/templates/simple/result_templates')
5 files changed, 29 insertions, 13 deletions
diff --git a/searx/templates/simple/result_templates/default.html b/searx/templates/simple/result_templates/default.html index 8cd985b1b..7c74a06d0 100644 --- a/searx/templates/simple/result_templates/default.html +++ b/searx/templates/simple/result_templates/default.html @@ -5,9 +5,15 @@ {% if result.embedded -%} <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 %} -<p class="content"> - {%- if result.content %}{{ result.content|safe }}{% endif -%} -</p> +{%- 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.embedded -%} <div id="result-media-{{ index }}" class="invisible"> diff --git a/searx/templates/simple/result_templates/images.html b/searx/templates/simple/result_templates/images.html index f905cd6d7..82cfcdde5 100644 --- a/searx/templates/simple/result_templates/images.html +++ b/searx/templates/simple/result_templates/images.html @@ -5,8 +5,8 @@ </a>{{- "" -}} <div class="detail">{{- "" -}} <a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}} - <a class="result-detail-previous" href="#">{{ icon_small('chevron-left') }}</a>{{- "" -}} - <a class="result-detail-next" href="#">{{ icon_small('chevron-right') }}</a>{{- "" -}} + <a class="result-detail-previous" href="#">{{ icon('chevron-left') }}</a>{{- "" -}} + <a class="result-detail-next" href="#">{{ icon('chevron-right') }}</a>{{- "" -}} <a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}"> {%- if result.thumbnail_src -%} <img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}"> diff --git a/searx/templates/simple/result_templates/map.html b/searx/templates/simple/result_templates/map.html index 244483a1d..3492d5d5f 100644 --- a/searx/templates/simple/result_templates/map.html +++ b/searx/templates/simple/result_templates/map.html @@ -1,4 +1,5 @@ -{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, icon with context %} +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl with context %} +{% from 'simple/icons.html' import icon_small %} {{ result_header(result, favicons, image_proxify) -}} {{- result_sub_header(result) -}} @@ -39,7 +40,7 @@ </table> {%- if (result.latitude and result.longitude) or result.boundingbox -%} - <small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon( 'globe') }} {{ _('show map') }}</a></small> + <small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon_small( 'globe-outline') }} {{ _('show map') }}</a></small> {%- endif -%} {{- result_sub_footer(result, proxify) -}} diff --git a/searx/templates/simple/result_templates/torrent.html b/searx/templates/simple/result_templates/torrent.html index ffb51588b..ecca0fdec 100644 --- a/searx/templates/simple/result_templates/torrent.html +++ b/searx/templates/simple/result_templates/torrent.html @@ -3,12 +3,12 @@ {{ result_header(result, favicons, image_proxify) -}} {{- result_sub_header(result) -}} -{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</p>{% endif %} -{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %} +{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon_big('magnet-outline') + _('magnet link'), "magnetlink") }}</p>{% endif %} +{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon_big('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %} -{% if result.seed is defined %}<p class="stat"> • {{ icon('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %} +{% if result.seed is defined %}<p class="stat"> • {{ icon_big('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %} -{%- if result.filesize %}<p class="stat">{{ icon('floppy-disk') }} {{ _('Filesize') }}<span class="badge"> +{%- if result.filesize %}<p class="stat">{{ icon_big('floppy-disk') }} {{ _('Filesize') }}<span class="badge"> {%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }} {%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }} {%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }} @@ -17,7 +17,7 @@ </span></p> {%- endif -%} -{%- if result.files %}<p class="stat">{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%} +{%- if result.files %}<p class="stat">{{ icon_big('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%} {%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%} {{- result_sub_footer(result, proxify) -}} diff --git a/searx/templates/simple/result_templates/videos.html b/searx/templates/simple/result_templates/videos.html index 8127b3d4e..1b2e1c84e 100644 --- a/searx/templates/simple/result_templates/videos.html +++ b/searx/templates/simple/result_templates/videos.html @@ -5,7 +5,16 @@ {% if result.embedded -%} <p class="altlink"> • <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film-outline') }} {{ _('show video') }}</a></p> {%- endif %} -{% if result.content %}<p class="content">{{ result.content|safe }}</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 -%} +</p> {{- result_sub_footer(result, proxify) -}} {% if result.embedded -%} <div id="result-video-{{ index }}" class="invisible"> |