Browse Source

[enh] themes - add result.metadata to result sub header

Signed-off-by: Markus Heiser <markus@darmarit.de>
Markus Heiser 4 years ago
parent
commit
213041adc7
2 changed files with 2 additions and 0 deletions
  1. 1 0
      searx/templates/oscar/macros.html
  2. 1 0
      searx/templates/simple/macros.html

+ 1 - 0
searx/templates/oscar/macros.html

@@ -22,6 +22,7 @@
     {%- if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif -%}
     {%- if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif -%}
     {%- if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif -%}
     {%- if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif -%}
     {%- if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif -%}
     {%- if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif -%}
+    {%- if result.metadata %} <div class="highlight">{{ result.metadata|safe }}</div>{% endif -%}
 {%- endmacro %}
 {%- endmacro %}
 
 
 <!-- Draw result footer -->
 <!-- Draw result footer -->

+ 1 - 0
searx/templates/simple/macros.html

@@ -35,6 +35,7 @@
 <!-- Draw result sub header -->
 <!-- Draw result sub header -->
 {%- macro result_sub_header(result) -%}
 {%- macro result_sub_header(result) -%}
   {% if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
   {% if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
+  {%- if result.metadata %} <div class="highlight">{{ result.metadata|safe }}</div>{% endif -%}
 {%- endmacro -%}
 {%- endmacro -%}
 
 
 <!-- Draw result sub footer -->
 <!-- Draw result sub footer -->