diff --git a/searx/static/themes/simple/src/less/style.less b/searx/static/themes/simple/src/less/style.less index 92682db33..7b067a170 100644 --- a/searx/static/themes/simple/src/less/style.less +++ b/searx/static/themes/simple/src/less/style.less @@ -306,7 +306,8 @@ article[data-vim-selected].category-social { } } -.result-paper { +.result-paper, +.result-packages { .attributes { display: table; border-spacing: 0.125rem; @@ -349,6 +350,12 @@ article[data-vim-selected].category-social { } } +.result-packages { + .attributes { + margin-top: 0.3rem; + } +} + .template_group_images { display: flex; flex-wrap: wrap; @@ -1076,7 +1083,8 @@ summary.title { display: none; } - .result-paper { + .result-paper, + .result-packages { .attributes { display: block; 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) }}