diff options
author | Bnyro <bnyro@tutanota.com> | 2024-02-19 20:22:21 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-02-25 14:56:57 +0100 |
commit | 938391b05013137b3aca066ea4dd7fb883e577ae (patch) | |
tree | 5f0fc75dccb70d90f4375c03f0510cb11ee486aa /searx/templates | |
parent | a85907a98f699b64d74d19b45e131bc2f18eb905 (diff) | |
download | searxng-938391b05013137b3aca066ea4dd7fb883e577ae.tar.gz searxng-938391b05013137b3aca066ea4dd7fb883e577ae.zip |
[feat] templates: add package result template
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/simple/result_templates/packages.html | 67 |
1 files changed, 67 insertions, 0 deletions
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 -%}<p class="content">{{- result.content|safe -}}</p>{%- endif -%} +<div class="attributes">{{- '' -}} + <div class="result_package_name">{{- '' -}} + <span>{{ _('Name') }}:</span>{{- '' -}} + <span><code>{{- result.package_name -}}</code></span>{{- '' -}} + </div> + {%- if result.version -%} + <div class="result_version">{{- '' -}} + <span>{{- _('Version') }}:</span>{{- '' -}} + <span><strong>{{ result.version }}</strong></span>{{- '' -}} + </div> + {%- endif -%} + {%- if result.maintainer -%} + <div class="result_maintainer">{{- '' -}} + <span>{{ _('Maintainer') }}:</span>{{- '' -}} + <span>{{ result.maintainer }}</span>{{- '' -}} + </div> + {%- endif -%} + {%- if result.publishedDate -%} + <div class="result_pubdate">{{- '' -}} + <span>{{ _('Updated at') }}:</span>{{- '' -}} + <span><time datetime="{{ result.pubdate }}">{{ result.publishedDate }}</time></span>{{- '' -}} + </div> + {%- endif -%} + {%- if result.tags -%} + <div class="result_tags">{{- '' -}} + <span>{{ _('Tags') }}:</span>{{- '' -}} + <span>{{ result.tags|join(', ') }}</span>{{- '' -}} + </div> + {%- endif -%} + {%- if result.popularity -%} + <div class="result_popularity">{{- '' -}} + <span>{{ _('Popularity') }}:</span>{{- '' -}} + <span>{{ result.popularity }}</span>{{- '' -}} + </div> + {%- endif -%} + {%- if result.license_name -%} + <div class="result_license">{{- '' -}} + <span>{{- _('License') -}}:</span> + {%- if result.license_url -%} + <span><a href="{{ result.license_url }}" target="_blank">{{ result.license_name }}</a></span> + {%- else -%} + <span>{{ result.license_name }}</span> + {%- endif -%} + </div> + {%- endif -%} + {%- if result.homepage or result.source_code_url -%} + <div class="result_project">{{- '' -}} + <span>{{ _('Project') }}</span> + <span>{{- '' -}} + {%- if result.homepage -%} + <a href="{{ result.homepage }}" target="_blank">{{ _('Project homepage') }}</a> + {%- endif -%} + {%- if result.homepage and result.source_code_url %} | {% endif -%} + {%- if result.source_code_url -%} + <a href="{{ result.source_code_url }}" target="_blank">{{ _('Source code') }}</a> + {%- endif -%} + </span>{{- '' -}} + </div> + {%- endif -%} +</div>{{- '' -}} +<div class="break"></div> + +{{- result_footer(result) }} |