From 938391b05013137b3aca066ea4dd7fb883e577ae Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 19 Feb 2024 20:22:21 +0100 Subject: [feat] templates: add package result template Co-authored-by: Markus Heiser --- .../simple/result_templates/packages.html | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 searx/templates/simple/result_templates/packages.html (limited to 'searx/templates') diff --git a/searx/templates/simple/result_templates/packages.html b/searx/templates/simple/result_templates/packages.html new file mode 100644 index 000000000..da7644a29 --- /dev/null +++ b/searx/templates/simple/result_templates/packages.html @@ -0,0 +1,67 @@ +{%- from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context -%} +{{ result_header(result, favicons, image_proxify) -}} + +{%- if result.content -%}

{{- result.content|safe -}}

{%- endif -%} +
{{- '' -}} +
{{- '' -}} + {{ _('Name') }}:{{- '' -}} + {{- result.package_name -}}{{- '' -}} +
+ {%- if result.version -%} +
{{- '' -}} + {{- _('Version') }}:{{- '' -}} + {{ result.version }}{{- '' -}} +
+ {%- endif -%} + {%- if result.maintainer -%} +
{{- '' -}} + {{ _('Maintainer') }}:{{- '' -}} + {{ result.maintainer }}{{- '' -}} +
+ {%- endif -%} + {%- if result.publishedDate -%} +
{{- '' -}} + {{ _('Updated at') }}:{{- '' -}} + {{- '' -}} +
+ {%- endif -%} + {%- if result.tags -%} +
{{- '' -}} + {{ _('Tags') }}:{{- '' -}} + {{ result.tags|join(', ') }}{{- '' -}} +
+ {%- endif -%} + {%- if result.popularity -%} +
{{- '' -}} + {{ _('Popularity') }}:{{- '' -}} + {{ result.popularity }}{{- '' -}} +
+ {%- endif -%} + {%- if result.license_name -%} +
{{- '' -}} + {{- _('License') -}}: + {%- if result.license_url -%} + {{ result.license_name }} + {%- else -%} + {{ result.license_name }} + {%- endif -%} +
+ {%- endif -%} + {%- if result.homepage or result.source_code_url -%} +
{{- '' -}} + {{ _('Project') }} + {{- '' -}} + {%- if result.homepage -%} + {{ _('Project homepage') }} + {%- endif -%} + {%- if result.homepage and result.source_code_url %} | {% endif -%} + {%- if result.source_code_url -%} + {{ _('Source code') }} + {%- endif -%} + {{- '' -}} +
+ {%- endif -%} +
{{- '' -}} +
+ +{{- result_footer(result) }} -- cgit v1.2.3