diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-09-24 16:13:36 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-09-24 16:13:36 +0200 |
commit | b424ee255e2d117c74a6a110c50e895a069bc269 (patch) | |
tree | d545420f1b62d3eee6864147847eaedbfee12c82 /searx/templates/simple/result_templates | |
parent | bfd6f6184911b5f4e7dcc8ee040daa9b790a28cb (diff) | |
download | searxng-b424ee255e2d117c74a6a110c50e895a069bc269.tar.gz searxng-b424ee255e2d117c74a6a110c50e895a069bc269.zip |
[mod] paper.html: simplify template by using result_link macro
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates/simple/result_templates')
-rw-r--r-- | searx/templates/simple/result_templates/paper.html | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/searx/templates/simple/result_templates/paper.html b/searx/templates/simple/result_templates/paper.html index 2c9717edd..dd610b903 100644 --- a/searx/templates/simple/result_templates/paper.html +++ b/searx/templates/simple/result_templates/paper.html @@ -30,15 +30,9 @@ {%- if result.content -%}<p class="content">{{- result.content | safe -}}</p>{%- endif -%} {%- if result.comments -%}<p class="comments">{{- result.comments -}}</p>{%- endif -%} <p class="altlink"> - {%- if result.pdf_url -%} - <a href="{{ result.pdf_url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('PDF') }}</a> - {%- endif -%} - {%- if result.html_url -%} - <a href="{{ result.html_url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('HTML') }}</a> - {%- endif -%} - {%- if result.doi %} - <a href="https://www.altmetric.com/details/doi/{{result.doi}}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>Altmetric</a> - {% endif -%} + {%- if result.pdf_url -%}{{ result_link(result.pdf_url, _('PDF')) }}{%- endif -%} + {%- if result.html_url -%}{{ result_link(result.html_url, _('HTML')) }}{%- endif -%} + {%- if result.doi %}{{ result_link('https://www.altmetric.com/details/doi/' + result.doi, 'Altmetric') }}{% endif -%} </p> {{- result_sub_footer(result, proxify) -}} {{- result_footer(result) }} |