mirror of
https://github.com/searxng/searxng.git
synced 2024-11-17 18:00:12 +01:00
[feat] templates: add package result template
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
a85907a98f
commit
938391b050
@ -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;
|
||||
|
||||
|
67
searx/templates/simple/result_templates/packages.html
Normal file
67
searx/templates/simple/result_templates/packages.html
Normal file
@ -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) }}
|
Loading…
Reference in New Issue
Block a user