mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
theme add?
This commit is contained in:
parent
cdd2000bd3
commit
0058a112cc
122 changed files with 8127 additions and 32 deletions
32
searx/templates/kvanDark/result_templates/code.html
Normal file
32
searx/templates/kvanDark/result_templates/code.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
{{- result_sub_header(result) -}}
|
||||
|
||||
{%- if result.content -%}
|
||||
<p class="content">
|
||||
{{- result.content|safe -}}
|
||||
</p>
|
||||
{%- endif -%}
|
||||
{%- if result.repository -%}
|
||||
<p class="content">{{- '' -}}
|
||||
{{ _('repo') }}: {{- ' ' -}}
|
||||
<a href="{{ result.repository|safe }}"{{- ' ' -}}
|
||||
{% if results_on_new_tab %}
|
||||
target="_blank" {{- ' ' -}}
|
||||
rel="noopener noreferrer"
|
||||
{%- else -%}
|
||||
rel="noreferrer"
|
||||
{%- endif -%}
|
||||
>
|
||||
{{- result.repository -}}
|
||||
</a>{{- '' -}}
|
||||
</p>
|
||||
{%- endif -%}
|
||||
|
||||
<div dir="ltr" class="codelines">
|
||||
{{- result.codelines|code_highlighter(result.code_language)|safe -}}
|
||||
</div>
|
||||
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{{- result_footer(result) -}}
|
||||
28
searx/templates/kvanDark/result_templates/default.html
Normal file
28
searx/templates/kvanDark/result_templates/default.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
{{- result_sub_header(result) -}}
|
||||
{% if result.iframe_src -%}
|
||||
<p class="altlink"><a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music-note') }} {{ _('show media') }}</a></p>
|
||||
{%- endif %}
|
||||
{%- if result.content %}
|
||||
<p class="content">
|
||||
{{ result.content|safe }}
|
||||
</p>
|
||||
{%- else %}
|
||||
<p class="content empty_element">
|
||||
{{ _('This site did not provide any description.')|safe }}
|
||||
</p>
|
||||
{% endif -%}
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{% if result.iframe_src -%}
|
||||
<div id="result-media-{{ index }}" class="embedded-content invisible">
|
||||
<iframe data-src="{{result.iframe_src}}" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{% if result.audio_src -%}
|
||||
<div id="result-media-{{ index }}" class="audio-control">
|
||||
<audio controls><source src="{{result.audio_src}}"></audio>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{{- result_footer(result) }}
|
||||
25
searx/templates/kvanDark/result_templates/images.html
Normal file
25
searx/templates/kvanDark/result_templates/images.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<article class="result result-images {% if result['category'] %}category-{{ result['category'] }}{% endif %}">{{- "" -}}
|
||||
<a {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">{{- "" -}}
|
||||
<img class="image_thumbnail" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}" loading="lazy" width="200" height="200">{{- "" -}}
|
||||
<span class="title">{{ result.title|striptags }}</span>{{- "" -}}
|
||||
<span class="source">{{ result.parsed_url.netloc }}</span>{{- "" -}}
|
||||
</a>{{- "" -}}
|
||||
<div class="detail">{{- "" -}}
|
||||
<a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}}
|
||||
<a class="result-detail-previous" href="#">{{ icon('chevron-left') }}</a>{{- "" -}}
|
||||
<a class="result-detail-next" href="#">{{ icon('chevron-right') }}</a>{{- "" -}}
|
||||
<a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">
|
||||
<img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">{{- "" -}}
|
||||
</a>{{- "" -}}
|
||||
<div class="result-images-labels">{{- "" -}}
|
||||
<h4>{{ result.title|striptags }}</h4>{{- "" -}}
|
||||
<p class="result-content">{%- if result.content %}{{ result.content|striptags }}{% else %} {% endif -%}</p>{{- "" -}}
|
||||
<hr>{{- "" -}}
|
||||
<p class="result-author">{%- if result.author %}<span>{{ _('Author') }}:</span>{{ result.author|striptags }}{% else %} {% endif -%}</p>{{- "" -}}
|
||||
<p class="result-format">{%- if result.img_format %}<span>{{ _('Format') }}:</span>{{ result.img_format }}{% else %} {% endif -%}</p>{{- "" -}}
|
||||
<p class="result-source">{%- if result.source %}<span>{{ _('Source') }}:</span>{{ result.source }}{% else %} {% endif -%}</p>{{- "" -}}
|
||||
<p class="result-engine"><span>{{ _('Engine') }}:</span>{{ result.engine }}</p>{{- "" -}}{{- "" -}}
|
||||
<p class="result-url"><span>{{ _('View source') }}:</span><a {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.url }}">{{ result.url }}</a></p>{{- "" -}}
|
||||
</div>{{- "" -}}
|
||||
</div>{{- "" -}}
|
||||
</article>
|
||||
11
searx/templates/kvanDark/result_templates/key-value.html
Normal file
11
searx/templates/kvanDark/result_templates/key-value.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<table>
|
||||
{% for key, value in result.items() %}
|
||||
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions', 'pretty_url', 'parsed_url'] %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td><b>{{ key|upper }}</b>: {{ value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="engines">{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}</div>{{- '' -}}
|
||||
52
searx/templates/kvanDark/result_templates/map.html
Normal file
52
searx/templates/kvanDark/result_templates/map.html
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'simple/icons.html' import icon_small %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
{{- result_sub_header(result) -}}
|
||||
|
||||
{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
|
||||
|
||||
<table>
|
||||
{%- if result.address -%}
|
||||
<tr>
|
||||
<th scope="row">{{ result.address_label or _('address') }}</th>
|
||||
<td itemscope itemtype="http://schema.org/PostalAddress">
|
||||
{%- if result.address.name -%}
|
||||
<strong itemprop="name" class="hidden">{{ result.address.name }}</strong>
|
||||
{%- endif -%}
|
||||
{% if result.address.road -%}
|
||||
<span itemprop="streetAddress">
|
||||
{%- if result.address.house_number -%}{{- result.address.house_number -}}, {% endif %}
|
||||
{{- result.address.road -}}
|
||||
</span><br/>
|
||||
{%- endif %}
|
||||
{%- if result.address.locality -%}
|
||||
<span itemprop="addressLocality">{{- result.address.locality -}}</span>
|
||||
{%- if result.address.postcode -%}, <span itemprop="postalCode">{{- result.address.postcode -}}</span>{% endif %}
|
||||
<br/>
|
||||
{%- endif -%}
|
||||
{%- if result.address.country -%}
|
||||
<span itemprop="addressCountry">{{- result.address.country -}}</span>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endif %}
|
||||
{%- for info in result.data -%}
|
||||
<tr><th scope="row">{{ info.label }}</th><td>{{ info.value|safe }}</td></tr>
|
||||
{%- endfor -%}
|
||||
{%- for link in result.links -%}
|
||||
<tr><th scope="row">{{ link.label }}</th><td><a class="text-info cursor-pointer" href="{{ link.url }}">{{ link.url_label|safe }}</a></td></tr>
|
||||
{%- endfor -%}
|
||||
</table>
|
||||
|
||||
{%- if (result.latitude and result.longitude) or result.boundingbox -%}
|
||||
<small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon_small( 'globe-outline') }} {{ _('show map') }}</a></small>
|
||||
{%- endif -%}
|
||||
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
|
||||
{% if (result.latitude and result.longitude) or result.boundingbox -%}
|
||||
<div id="result-map-{{ index }}" class="invisible"><div id="osm-map-{{ index }}" class="osm-map-box"></div></div>
|
||||
{%- endif %}
|
||||
|
||||
{{- result_footer(result) }}
|
||||
38
searx/templates/kvanDark/result_templates/paper.html
Normal file
38
searx/templates/kvanDark/result_templates/paper.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
<div class="attributes">
|
||||
{%- if result.publishedDate %}<div class="result_publishedDate"><span>{{ _("Published date") }}:</span><span><time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time></span></div>{% endif -%}
|
||||
{%- if result.authors %}<div class="result_authors"><span>{{ _("Author") }}:</span><span>{{ result.authors | join(", ") }}</span></div>{% endif -%}
|
||||
{%- if result.journal -%}
|
||||
<div class="result_journal">
|
||||
<span>{{- _("Journal") }}:</span><span>{{ result.journal -}}
|
||||
{%- if result.volume -%}
|
||||
{{- result.volume -}}
|
||||
{%- if result.number -%}
|
||||
.{{- result.number -}}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- if result.pages -%}
|
||||
{{- result.pages -}}
|
||||
{%- endif -%}
|
||||
</span>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- if result.editor %}<div class="result_editor"><span>{{ _("Editor") }}:</span><span>{{ result.editor }}</span></div>{% endif -%}
|
||||
{%- if result.publisher %}<div class="result_publisher"><span>{{ _("Publisher") }}:</span><span>{{ result.publisher }}</span></div>{% endif -%}
|
||||
{%- if result.type %}<div class="result_type"><span>{{ _("Type") }}:</span><span>{{ result.type }}</span></div>{% endif -%}
|
||||
{%- if result.tags %}<div class="result_tags"><span>{{ _("Tags") }}:</span><span>{{ result.tags | join(", ")}}</span></div>{%- endif -%}
|
||||
{%- if result.doi %}<div class="result_doi"><span>{{ _("DOI") }}:</span><span>{{ result_link(doi_resolver + result.doi, result.doi) }}</span></div>{% endif -%}
|
||||
{%- if result.issn %}<div class="result_issn"><span>{{ _("ISSN") }}:</span><span>{{ result.issn | join(", ") }}</span></div>{% endif -%}
|
||||
{%- if result.isbn %}<div class="result_isbn"><span>{{ _("ISBN") }}:</span><span>{{ result.isbn | join(", ") }}</span></div>{% endif -%}
|
||||
</div>
|
||||
{%- 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 -%}{{ 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) }}
|
||||
14
searx/templates/kvanDark/result_templates/products.html
Normal file
14
searx/templates/kvanDark/result_templates/products.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
{{- result_sub_header(result) -}}
|
||||
{% if result.price %}<div class="result_price">{{ result.price }}</div></br>{% endif %}
|
||||
{% if result.shipping %}<div class="result_shipping">{{ result.shipping }}</div></br>{% endif %}
|
||||
{% if result.source_country %}<div class="result_source_country">{{ result.source_country }}</div></br>{% endif %}
|
||||
{%- if result.content %}
|
||||
<p class="content">
|
||||
{{ result.content }}
|
||||
</p>
|
||||
{% endif -%}
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{{- result_footer(result) }}
|
||||
24
searx/templates/kvanDark/result_templates/torrent.html
Normal file
24
searx/templates/kvanDark/result_templates/torrent.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
{{- result_sub_header(result) -}}
|
||||
|
||||
{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon_big('magnet-outline') + _('magnet link'), "magnetlink") }}</p>{% endif %}
|
||||
{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon_big('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %}
|
||||
|
||||
{% if result.seed is defined %}<p class="stat"> • {{ icon_big('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %}
|
||||
|
||||
{%- if result.filesize %}<p class="stat">{{ icon_big('floppy-disk') }} {{ _('Filesize') }}<span class="badge">
|
||||
{%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }}
|
||||
{%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }}
|
||||
{%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
|
||||
{%- elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }}
|
||||
{%- else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif -%}
|
||||
</span></p>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if result.files %}<p class="stat">{{ icon_big('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%}
|
||||
|
||||
{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{{- result_footer(result) }}
|
||||
24
searx/templates/kvanDark/result_templates/videos.html
Normal file
24
searx/templates/kvanDark/result_templates/videos.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) }}
|
||||
{{ result_sub_header(result) }}
|
||||
{% if result.iframe_src -%}
|
||||
<p class="altlink"> <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film-outline') }} {{ _('show video') }}</a></p>
|
||||
{%- endif %}
|
||||
{%- if result.content %}
|
||||
<p class="content">
|
||||
{{ result.content|safe }}
|
||||
</p>
|
||||
{%- else %}
|
||||
<p class="content empty_element">
|
||||
{{ _('This site did not provide any description.')|safe }}
|
||||
</p>
|
||||
{% endif -%}
|
||||
</p>
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{% if result.iframe_src -%}
|
||||
<div id="result-video-{{ index }}" class="embedded-video invisible">
|
||||
<iframe data-src="{{result.iframe_src}}" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{{ result_footer(result) }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue