mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Add theme required fixes
This commit is contained in:
parent
0058a112cc
commit
281d0aac91
40 changed files with 998 additions and 886 deletions
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -8,4 +8,8 @@
|
|||
],
|
||||
"python.testing.pytestEnabled": false,
|
||||
"python.testing.unittestEnabled": true,
|
||||
"[less]": {
|
||||
"editor.tabSize": 2,
|
||||
"editor.insertSpaces": true
|
||||
}
|
||||
}
|
2
Makefile
2
Makefile
|
@ -86,7 +86,7 @@ MANAGE += pyenv pyenv.install pyenv.uninstall
|
|||
MANAGE += pypi.upload pypi.upload.test
|
||||
MANAGE += format.python
|
||||
MANAGE += test.yamllint test.pylint test.pyright test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean
|
||||
MANAGE += themes.all themes.simple themes.simple.test themes.kvanDark themes.kvanDark.test pygments.less
|
||||
MANAGE += themes.all themes.simple themes.simple.test themes.kvanDark themes.kvanDark.test themes.kvanDark.stylelint pygments.less
|
||||
MANAGE += static.build.commit static.build.drop static.build.restore
|
||||
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -145,7 +145,7 @@ module.exports = function (grunt) {
|
|||
svgo: ['--config', 'svg4web.svgo.js']
|
||||
},
|
||||
files: {
|
||||
'<%= _templates %>/simple/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg',
|
||||
'<%= _templates %>/kvanDark/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg',
|
||||
'img/searxng.svg': '<%= _brand %>/searxng.svg',
|
||||
'img/img_load_error.svg': '<%= _brand %>/img_load_error.svg'
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ module.exports = function (grunt) {
|
|||
'heart-outline': 'node_modules/ionicons/dist/svg/heart-outline.svg',
|
||||
'information-circle-outline': 'src/svg/information-circle-outline.svg',
|
||||
},
|
||||
dest: '../../../templates/simple/icons.html',
|
||||
dest: '../../../templates/kvanDark/icons.html',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -229,7 +229,7 @@ module.exports = function (grunt) {
|
|||
grunt.log.error(err);
|
||||
}
|
||||
}
|
||||
const template = `{# this file was generated by searx/static/themes/simple/gruntfile.js #}
|
||||
const template = `{# this file was generated by searx/static/themes/kvanDark/gruntfile.js #}
|
||||
{%- set icons = {
|
||||
<% for (const iconName in icons) { %> '<%- iconName %>':'<%- icons[iconName] %>',
|
||||
<% } %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#main_results #results.image-detail-open.only_template_images {
|
||||
#main_kvanDark\/results #results.image-detail-open.only_template_images {
|
||||
width: min(98%, 59.25rem) !important;
|
||||
}
|
||||
|
||||
#main_results #results.only_template_images.image-detail-open #backToTop {
|
||||
#main_kvanDark\/results #results.only_template_images.image-detail-open #backToTop {
|
||||
.ltr-left(56.75rem) !important;
|
||||
.ltr-right(inherit);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#main_index {
|
||||
#main_index,
|
||||
#main_kvanDark\/index {
|
||||
margin-top: 26vh;
|
||||
}
|
||||
|
||||
|
@ -45,7 +46,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
#main_index {
|
||||
#main_index,
|
||||
#main_kvanDark\/index {
|
||||
margin-top: 6em;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,8 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
#main_preferences {
|
||||
#main_preferences,
|
||||
#main_kvanDark\/preferences {
|
||||
form {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -248,7 +248,8 @@ html.no-js #clear_search.hide_if_nojs {
|
|||
|
||||
@media screen and (max-width: @tablet) and (hover: none) {
|
||||
#main_index,
|
||||
#main_results {
|
||||
#main_kvanDark\/index,
|
||||
#main_kvanDark\/results {
|
||||
#categories_container {
|
||||
width: max-content;
|
||||
|
||||
|
@ -348,7 +349,7 @@ html.no-js #clear_search.hide_if_nojs {
|
|||
}
|
||||
}
|
||||
|
||||
#main_results #q:placeholder-shown ~ #send_search {
|
||||
#main_kvanDark\/results #q:placeholder-shown ~ #send_search {
|
||||
.ltr-margin-right(2.6rem);
|
||||
transition: margin 0.1s;
|
||||
}
|
||||
|
|
|
@ -4,31 +4,31 @@ see the CSS rules for #results in style.less ( grid-template-columns and gap).
|
|||
|
||||
In this file, the --center-page-width values comes from the Oscar theme (Bootstrap 3).
|
||||
|
||||
All rules starts with ".center-aligment-yes #main_results" to be enabled only
|
||||
All rules starts with ".center-aligment-yes #main_kvanDark\/results" to be enabled only
|
||||
on the /search URL and when the "center alignment" preference is enabled.
|
||||
*/
|
||||
|
||||
@media screen and (min-width: @phone) {
|
||||
.center-aligment-yes #main_results {
|
||||
.center-aligment-yes #main_kvanDark\/results {
|
||||
--center-page-width: 48rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 62rem) {
|
||||
.center-aligment-yes #main_results {
|
||||
.center-aligment-yes #main_kvanDark\/results {
|
||||
--center-page-width: 60rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: @tablet) {
|
||||
.center-aligment-yes #main_results {
|
||||
.center-aligment-yes #main_kvanDark\/results {
|
||||
--center-page-width: 73rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: @phone) and (max-width: @tablet) {
|
||||
// any change must be reset in @media screen and (min-width: @tablet) { ... }
|
||||
.center-aligment-yes #main_results {
|
||||
.center-aligment-yes #main_kvanDark\/results {
|
||||
#results {
|
||||
grid-template-columns: 60% calc(40% - @results-gap);
|
||||
margin-left: 0;
|
||||
|
@ -50,7 +50,7 @@ on the /search URL and when the "center alignment" preference is enabled.
|
|||
}
|
||||
|
||||
@media screen and (min-width: @tablet) {
|
||||
.center-aligment-yes #main_results {
|
||||
.center-aligment-yes #main_kvanDark\/results {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
@ -86,7 +86,7 @@ on the /search URL and when the "center alignment" preference is enabled.
|
|||
&.image-detail-open {
|
||||
// * grid-template-columns and .ltr-margin-left are set in style.less
|
||||
// * With .image-detail-open.only_template_images, the width is set in detail.less
|
||||
// * #results is going to be centered because of the #main_results rules,
|
||||
// * #results is going to be centered because of the #main_kvanDark\/results rules,
|
||||
// align-self aligns the results on the left or right according to the language.
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
}
|
||||
|
||||
// Image flexbox
|
||||
#main_results div#results.only_template_images #urls {
|
||||
#main_kvanDark\/results div#results.only_template_images #urls {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,7 @@
|
|||
|
||||
// Logo on the right
|
||||
#main_preferences h1,
|
||||
#main_kvanDark\/preferences h1,
|
||||
#main_stats h1 {
|
||||
background-position-x: 100%;
|
||||
}
|
||||
|
|
|
@ -917,7 +917,7 @@ summary.title {
|
|||
margin: 2rem 0 0 0 !important;
|
||||
}
|
||||
|
||||
#main_results div#results {
|
||||
#main_kvanDark\/results div#results {
|
||||
margin: 0 auto;
|
||||
justify-content: center;
|
||||
display: grid;
|
||||
|
@ -963,7 +963,7 @@ summary.title {
|
|||
|
||||
/* Misc */
|
||||
|
||||
#main_results div#results.only_template_images {
|
||||
#main_kvanDark\/results div#results.only_template_images {
|
||||
margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
|
||||
display: grid;
|
||||
grid-template-columns: 100%;
|
||||
|
@ -1013,7 +1013,7 @@ summary.title {
|
|||
background-color: var(--color-base-background-mobile);
|
||||
}
|
||||
|
||||
#main_results div#results {
|
||||
#main_kvanDark\/results div#results {
|
||||
grid-template-columns: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
@ -1023,7 +1023,8 @@ summary.title {
|
|||
.ltr-right(10px);
|
||||
}
|
||||
|
||||
#main_index #links_on_top {
|
||||
#main_index #links_on_top,
|
||||
#main_kvanDark\/index {
|
||||
top: 0.5rem;
|
||||
.ltr-right(0.5rem);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{% extends "simple/base.html" %}
|
||||
{% extends "kvanDark/base.html" %}
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<h1>{{ _('Page not found') }}</h1>
|
||||
{% autoescape false %}
|
||||
<p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
|
||||
<p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}
|
||||
</p>
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,5 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js theme-{{ preferences.get_value('simple_style') or 'auto' }} center-aligment-{{ preferences.get_value('center_alignment') and 'yes' or 'no' }}" lang="{{ locale_rfc5646 }}" {% if rtl %} dir="rtl"{% endif %}>
|
||||
<html
|
||||
class="no-js theme-{{ preferences.get_value('kvanDark_style') or 'dark' }} center-aligment-{{ preferences.get_value('center_alignment') and 'yes' or 'no' }}"
|
||||
lang="{{ locale_rfc5646 }}" {% if rtl %} dir="rtl" {% endif %}>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="SearXNG — a privacy-respecting, open metasearch engine">
|
||||
|
@ -13,25 +16,31 @@
|
|||
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
|
||||
{% block meta %}{% endblock %}
|
||||
{% if rtl %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng-rtl.min.css') }}" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng-rtl.min.css') }}" type="text/css"
|
||||
media="screen" />
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css"
|
||||
media="screen" />
|
||||
{% endif %}
|
||||
{% if get_setting('server.limiter') %}
|
||||
<link rel="stylesheet" href="{{ url_for('client_token', token=link_token) }}" type="text/css" />
|
||||
{% endif %}
|
||||
{% block styles %}{% endblock %}
|
||||
<!--[if gte IE 9]>-->
|
||||
<script src="{{ url_for('static', filename='js/searxng.head.min.js') }}" client_settings="{{ client_settings }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/searxng.head.min.js') }}"
|
||||
client_settings="{{ client_settings }}"></script>
|
||||
<!--<![endif]-->
|
||||
{% block head %}
|
||||
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}"/>
|
||||
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search"
|
||||
href="{{ opensearch_url }}" />
|
||||
{% endblock %}
|
||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}" sizes="any">
|
||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.svg') }}" type="image/svg+xml">
|
||||
</head>
|
||||
<body class="{{ endpoint }}_endpoint" >
|
||||
<main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}" class="{{body_class}}">
|
||||
|
||||
<body class="{{ endpoint }}_endpoint">
|
||||
<main id="main_{{ self._TemplateReference__context.name|replace(" kvanDark/", "" )|replace(".html", "" ) }}"
|
||||
class="{{body_class}}">
|
||||
{% if errors %}
|
||||
<div class="dialog-error" role="alert">
|
||||
<a href="#" class="close" aria-label="close" title="close">×</a>
|
||||
|
@ -44,17 +53,20 @@
|
|||
{% endif %}
|
||||
|
||||
<nav id="links_on_top">
|
||||
{%- from 'simple/icons.html' import icon_big -%}
|
||||
{%- from 'kvanDark/icons.html' import icon_big -%}
|
||||
{%- block linkto_about -%}
|
||||
<a href="{{ url_for('info', pagename='about') }}" class="link_on_top_about">{{ icon_big('information-circle-outline') }}<span>{{ _('About') }}</span></a>
|
||||
<a href="{{ url_for('info', pagename='about') }}" class="link_on_top_about">{{
|
||||
icon_big('information-circle-outline') }}<span>{{ _('About') }}</span></a>
|
||||
{%- endblock -%}
|
||||
{%- block linkto_donate -%}
|
||||
{%- if donation_url -%}
|
||||
<a href="{{ donation_url }}" class="link_on_top_donate">{{ icon_big('heart-outline') }}<span>{{ _('Donate') }}</span></a>
|
||||
<a href="{{ donation_url }}" class="link_on_top_donate">{{ icon_big('heart-outline') }}<span>{{ _('Donate')
|
||||
}}</span></a>
|
||||
{%- endif -%}
|
||||
{%- endblock -%}
|
||||
{%- block linkto_preferences -%}
|
||||
<a href="{{ url_for('preferences') }}" class="link_on_top_preferences">{{ icon_big('menu-outline') }}<span>{{ _('Preferences') }}</span></a>
|
||||
<a href="{{ url_for('preferences') }}" class="link_on_top_preferences">{{ icon_big('menu-outline')
|
||||
}}<span>{{ _('Preferences') }}</span></a>
|
||||
{%- endblock -%}
|
||||
</nav>
|
||||
{% block header %}
|
||||
|
@ -64,7 +76,8 @@
|
|||
</main>
|
||||
<footer>
|
||||
<p>
|
||||
{{ _('Powered by') }} <a href="{{ url_for('info', pagename='about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, open metasearch engine') }}<br/>
|
||||
{{ _('Powered by') }} <a href="{{ url_for('info', pagename='about') }}">searxng</a> - {{ searx_version }} —
|
||||
{{ _('a privacy-respecting, open metasearch engine') }}<br />
|
||||
<a href="{{ searx_git_url }}">{{ _('Source code') }}</a>
|
||||
| <a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a>
|
||||
{% if enable_metrics %}| <a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a>{% endif %}
|
||||
|
@ -83,4 +96,5 @@
|
|||
<script src="{{ url_for('static', filename='js/searxng.min.js') }}"></script>
|
||||
<!--<![endif]-->
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,22 +1,23 @@
|
|||
{% from 'simple/icons.html' import icon_big %}
|
||||
{% from 'kvanDark/icons.html' import icon_big %}
|
||||
{%- set category_icons = {
|
||||
'general': 'search-outline',
|
||||
'images': 'image-outline',
|
||||
'videos': 'play-outline',
|
||||
'news': 'newspaper-outline',
|
||||
'map': 'location-outline',
|
||||
'music': 'musical-notes-outline',
|
||||
'it': 'layers-outline',
|
||||
'science': 'school-outline',
|
||||
'files': 'file-tray-full-outline',
|
||||
'social media': 'people-outline',
|
||||
'general': 'search-outline',
|
||||
'images': 'image-outline',
|
||||
'videos': 'play-outline',
|
||||
'news': 'newspaper-outline',
|
||||
'map': 'location-outline',
|
||||
'music': 'musical-notes-outline',
|
||||
'it': 'layers-outline',
|
||||
'science': 'school-outline',
|
||||
'files': 'file-tray-full-outline',
|
||||
'social media': 'people-outline',
|
||||
} -%}
|
||||
<div id="categories" class="search_categories">{{- '' -}}
|
||||
<div id="categories_container">
|
||||
{%- if not search_on_category_select or not display_tooltip -%}
|
||||
{%- for category in categories_as_tabs -%}
|
||||
<div class="category category_checkbox">{{- '' -}}
|
||||
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
|
||||
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if
|
||||
category in selected_categories %} checked="checked" {% endif %} />
|
||||
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||
<div class="category_name">{{- _(category) -}}</div>
|
||||
|
@ -26,7 +27,8 @@
|
|||
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
||||
{%- else -%}
|
||||
{%- for category in categories_as_tabs -%}{{- '\n' -}}
|
||||
<button type="submit" name="category_{{ category }}" class="category category_button {% if category in selected_categories %}selected{% endif %}">
|
||||
<button type="submit" name="category_{{ category }}"
|
||||
class="category category_button {% if category in selected_categories %}selected{% endif %}">
|
||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||
<div class="category_name">{{- _(category) -}}</div>{{- '' -}}
|
||||
</button>{{- '' -}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{# this file was generated by searx/static/themes/simple/gruntfile.js #}
|
||||
{# this file was generated by searx/static/themes/kvanDark/gruntfile.js #}
|
||||
{%- set icons = {
|
||||
'warning':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 80c-8.66 0-16.58 7.36-16 16l8 216a8 8 0 008 8h0a8 8 0 008-8l8-216c.58-8.64-7.34-16-16-16z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><circle cx="256" cy="416" r="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||
'close':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>',
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{% extends "simple/base.html" %}
|
||||
{% from 'simple/icons.html' import icon_big %}
|
||||
{% extends "kvanDark/base.html" %}
|
||||
{% from 'kvanDark/icons.html' import icon_big %}
|
||||
{% block content %}
|
||||
<div class="index">
|
||||
<div class="title"><h1>SearXNG</h1></div>
|
||||
{% include 'simple/simple_search.html' %}
|
||||
<div class="title">
|
||||
<h1>SearXNG</h1>
|
||||
</div>
|
||||
{% include 'kvanDark/kvanDark_search.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,14 +1,15 @@
|
|||
{% extends 'simple/page_with_header.html' %}
|
||||
{% extends 'kvanDark/page_with_header.html' %}
|
||||
{% block title %}{{ active_page.title }} - {% endblock %}
|
||||
{% block linkto_about %}{% endblock %}
|
||||
{% block linkto_donate %}{% endblock %}
|
||||
{% block content %}
|
||||
<ul class="tabs">
|
||||
{% for pagename, locale, page in all_pages %}
|
||||
{% for pagename, locale, page in all_pages %}
|
||||
<li>
|
||||
<a href="{{ url_for('info', pagename=pagename, locale=locale) }}" {% if pagename == active_pagename %}class="active"{% endif %}>{{page.title}}</a>
|
||||
<a href="{{ url_for('info', pagename=pagename, locale=locale) }}" {% if pagename==active_pagename
|
||||
%}class="active" {% endif %}>{{page.title}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="info-page {{pagename}}">
|
||||
{{- active_page.html | safe -}}
|
||||
|
|
|
@ -1,63 +1,70 @@
|
|||
{% from 'simple/icons.html' import icon_small %}
|
||||
{% from 'kvanDark/icons.html' import icon_small %}
|
||||
|
||||
<!-- Draw favicon -->
|
||||
{% macro draw_favicon(favicon) -%}
|
||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}">
|
||||
<img width="14" height="14" class="favicon"
|
||||
src="{{ url_for('static', filename='themes/kvanDark/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}">
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro result_open_link(url, classes='') -%}
|
||||
<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>
|
||||
{%- endmacro %}
|
||||
<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank"
|
||||
rel="noopener noreferrer" {% else %}rel="noreferrer" {% endif %}>
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro result_close_link() -%}
|
||||
</a>
|
||||
{%- macro result_close_link() -%}
|
||||
</a>
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro result_link(url, title, classes='') -%}
|
||||
{{ result_open_link(url, classes) }}{{ title }}{{ result_close_link() }}
|
||||
{{ result_open_link(url, classes) }}{{ title }}{{ result_close_link() }}
|
||||
{%- endmacro -%}
|
||||
|
||||
<!-- Draw result header -->
|
||||
{% macro result_header(result, favicons, image_proxify) -%}
|
||||
<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||
<article
|
||||
class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||
{{- result_open_link(result.url, "url_wrapper") -}}
|
||||
{%- for part in get_pretty_url(result.parsed_url) -%}
|
||||
<span class="url_o{{loop.index}}"><span class="url_i{{loop.index}}">{{- part -}}</span></span>
|
||||
{%- endfor %}
|
||||
{{- result_close_link() -}}
|
||||
{%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" loading="lazy" width="200" height="200">{{ result_close_link() }}{% endif -%}
|
||||
{%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" loading="lazy" width="200" height="200">{{ result_close_link() }}{% endif -%}
|
||||
{%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image"
|
||||
src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" loading="lazy" width="200"
|
||||
height="200">{{ result_close_link() }}{% endif -%}
|
||||
{%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail"
|
||||
src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" loading="lazy" width="200"
|
||||
height="200">{{ result_close_link() }}{% endif -%}
|
||||
<h3>{{ result_link(result.url, result.title|safe) }}</h3>
|
||||
{%- endmacro -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
<!-- Draw result sub header -->
|
||||
{%- macro result_sub_header(result) -%}
|
||||
{%- if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif -%}
|
||||
<!-- Draw result sub header -->
|
||||
{%- macro result_sub_header(result) -%}
|
||||
{%- if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}">{{ result.publishedDate
|
||||
}}</time>{% endif -%}
|
||||
{%- if result.length %}<div class="result_length">{{ _('Length') }}: {{ result.length }}</div>{% endif -%}
|
||||
{%- if result.author %}<div class="result_author">{{ _('Author') }}: {{ result.author }}</div>{% endif -%}
|
||||
{%- if result.metadata %}<div class="highlight">{{ result.metadata|safe }}</div>{% endif -%}
|
||||
{%- endmacro -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
<!-- Draw result sub footer -->
|
||||
{%- macro result_sub_footer(result, proxify) -%}
|
||||
<div class="engines">
|
||||
<!-- Draw result sub footer -->
|
||||
{%- macro result_sub_footer(result, proxify) -%}
|
||||
<div class="engines">
|
||||
{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}
|
||||
{{ result_link(cache_url + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}
|
||||
</div>{{- '' -}}
|
||||
<div class="break"></div>{{- '' -}}
|
||||
{%- endmacro -%}
|
||||
{{ result_link(cache_url + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link")
|
||||
}}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'),
|
||||
"proxyfied_link") }} {% endif %}
|
||||
</div>{{- '' -}}
|
||||
<div class="break"></div>{{- '' -}}
|
||||
{%- endmacro -%}
|
||||
|
||||
<!-- Draw result footer -->
|
||||
{%- macro result_footer(result) -%}
|
||||
<!-- Draw result footer -->
|
||||
{%- macro result_footer(result) -%}
|
||||
</article>
|
||||
{%- endmacro -%}
|
||||
|
||||
<!-- input checkbox, on/off slider user can tap-->
|
||||
{%- macro checkbox_onoff(name, checked) -%}
|
||||
<input type="checkbox" {{- ' ' -}}
|
||||
name="{{ name }}" {{- ' ' -}}
|
||||
id="{{ name }}" {{- ' ' -}}
|
||||
aria-labelledby="pref_{{ name }}"{{- ' ' -}}
|
||||
class="checkbox-onoff"{{- ' ' -}}
|
||||
{%- if checked -%} checked{%- endif -%}/>
|
||||
<input type="checkbox" {{- ' ' -}} name="{{ name }}" {{- ' ' -}} id="{{ name }}" {{- ' ' -}}
|
||||
aria-labelledby="pref_{{ name }}" {{- ' ' -}} class="checkbox-onoff" {{- ' ' -}} {%- if checked -%} checked{%- endif
|
||||
-%} />
|
||||
{%- endmacro -%}
|
|
@ -1,4 +1,4 @@
|
|||
{% from 'simple/icons.html' import icon %}
|
||||
{% from 'kvanDark/icons.html' import icon %}
|
||||
<div class="alert alert-info fade in" role="alert">
|
||||
<strong class="lead">{{ icon('info-sign') }} {{ _('Information!') }}</strong>
|
||||
{{ _('currently, there are no cookies defined.') }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% from 'simple/icons.html' import icon_big %}
|
||||
{% from 'kvanDark/icons.html' import icon_big %}
|
||||
<div class="dialog-error-block" role="alert">
|
||||
<p><strong>{{ _('Sorry!') }}</strong></p>
|
||||
<p>{{ _("No results were found. You can try to:") }}</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{%- set body_class = "page_with_header" -%}
|
||||
{%- extends "simple/base.html" -%}
|
||||
{%- extends "kvanDark/base.html" -%}
|
||||
{%- block header -%}
|
||||
<a href="{{ url_for('index') }}">{{- '' -}}
|
||||
<a href="{{ url_for('index') }}">{{- '' -}}
|
||||
<img class="logo" src="{{ url_for('static', filename='img/searxng.png') }}" alt="SearXNG">{{- '' -}}
|
||||
</a>{{- '' -}}
|
||||
</a>{{- '' -}}
|
||||
{%- endblock -%}
|
|
@ -1,39 +1,39 @@
|
|||
{%- from 'simple/icons.html' import icon_small, icon_big -%}
|
||||
{%- extends "simple/page_with_header.html" -%}
|
||||
{%- from 'kvanDark/icons.html' import icon_small, icon_big -%}
|
||||
{%- extends "kvanDark/page_with_header.html" -%}
|
||||
|
||||
{%- macro tabs_open() -%}
|
||||
<div class="tabs" role="tablist">
|
||||
{%- endmacro -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro tab_header(name, id, label, checked) -%}
|
||||
<input type="radio" name="{{ name }}" id="tab-{{ id }}" {% if checked is sameas true %}checked="checked"{% endif %} />
|
||||
<label id="tab-label-{{ id }}" for="tab-{{ id }}" role="tab" aria-controls="tab-content-{{ id }}">{{ label }}</label>
|
||||
<section id="tab-content-{{ id }}" role="tabpanel" aria-labelledby="tab-label-{{ id }}" aria-hidden="false">
|
||||
{%- endmacro -%}
|
||||
{%- macro tab_header(name, id, label, checked) -%}
|
||||
<input type="radio" name="{{ name }}" id="tab-{{ id }}" {% if checked is sameas true %}checked="checked" {% endif
|
||||
%} />
|
||||
<label id="tab-label-{{ id }}" for="tab-{{ id }}" role="tab" aria-controls="tab-content-{{ id }}">{{ label
|
||||
}}</label>
|
||||
<section id="tab-content-{{ id }}" role="tabpanel" aria-labelledby="tab-label-{{ id }}" aria-hidden="false">
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro tab_footer() -%}
|
||||
</section>
|
||||
{%- endmacro -%}
|
||||
{%- macro tab_footer() -%}
|
||||
</section>
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro tabs_close() -%}
|
||||
{%- macro tabs_close() -%}
|
||||
</div>
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro checkbox(name, checked, disabled) -%}
|
||||
{%- if checked == '?' -%}
|
||||
{{- icon_small('warning') -}}
|
||||
{%- else -%}
|
||||
<input type="checkbox" {%- if name %} name="{{ name }}" {%- endif %} value="None" {%- if checked %} checked {%- endif -%}{%- if disabled %} disabled {%- endif -%}/>
|
||||
{%- endif -%}
|
||||
{%- if checked == '?' -%}
|
||||
{{- icon_small('warning') -}}
|
||||
{%- else -%}
|
||||
<input type="checkbox" {%- if name %} name="{{ name }}" {%- endif %} value="None" {%- if checked %} checked {%- endif
|
||||
-%}{%- if disabled %} disabled {%- endif -%} />
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro checkbox_onoff_reversed(name, checked) -%}
|
||||
<input type="checkbox" {{- ' ' -}}
|
||||
name="{{ name }}" {{- ' ' -}}
|
||||
id="{{ name }}" {{- ' ' -}}
|
||||
aria-labelledby="pref_{{ name }}"{{- ' ' -}}
|
||||
class="checkbox-onoff reversed-checkbox"{{- ' ' -}}
|
||||
{%- if checked -%} checked{%- endif -%}/>
|
||||
<input type="checkbox" {{- ' ' -}} name="{{ name }}" {{- ' ' -}} id="{{ name }}" {{- ' ' -}}
|
||||
aria-labelledby="pref_{{ name }}" {{- ' ' -}} class="checkbox-onoff reversed-checkbox" {{- ' ' -}} {%- if checked
|
||||
-%} checked{%- endif -%} />
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro plugin_preferences(section) -%}
|
||||
|
@ -54,12 +54,13 @@
|
|||
|
||||
{%- macro engine_about(search_engine) -%}
|
||||
{%- if search_engine.about is defined -%}
|
||||
{%- set about = search_engine.about -%}
|
||||
<div class="engine-tooltip" role="tooltip">{{- '' -}}
|
||||
{%- set about = search_engine.about -%}
|
||||
<div class="engine-tooltip" role="tooltip">{{- '' -}}
|
||||
<p class="engine-description"></p>{{- '' -}}
|
||||
<p><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></p>{{- '' -}}
|
||||
{%- if about.wikidata_id -%}
|
||||
<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>
|
||||
<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}"
|
||||
rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>
|
||||
{%- endif -%}
|
||||
{%- if search_engine.enable_http -%}
|
||||
<p>{{- icon_big('exclamation-sign', 'No HTTPS') -}}{{- _('No HTTPS')-}}</p>
|
||||
|
@ -82,19 +83,24 @@
|
|||
<span class="bang">{{ '!' + bang.replace(' ', '_') }}</span>
|
||||
{%- endfor -%}
|
||||
</p>{{- '' -}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro engine_time(engine_name) -%}
|
||||
<td class="{{ label }}">{{- '' -}}
|
||||
<td class="{{ label }}">{{- '' -}}
|
||||
{%- if stats[engine_name].time != None -%}
|
||||
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- '' -}}
|
||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
||||
{%- if max_rate95 is not none and max_rate95 > 0 -%}
|
||||
<div class="stacked-bar-chart-median bar{{ (100 * (stats[engine_name].time / max_rate95))|round }}"></div>{{- '' -}}
|
||||
<div class="stacked-bar-chart-rate80 bar{{ (100 * ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95))|round }}"></div>{{- '' -}}
|
||||
<div class="stacked-bar-chart-rate95 bar{{ (100 * ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95))|round }}"></div>{{- '' -}}
|
||||
<div class="stacked-bar-chart-median bar{{ (100 * (stats[engine_name].time / max_rate95))|round }}"></div>{{- ''
|
||||
-}}
|
||||
<div
|
||||
class="stacked-bar-chart-rate80 bar{{ (100 * ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95))|round }}">
|
||||
</div>{{- '' -}}
|
||||
<div
|
||||
class="stacked-bar-chart-rate95 bar{{ (100 * ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95))|round }}">
|
||||
</div>{{- '' -}}
|
||||
<span class="stacked-bar-chart-rate100"></span>
|
||||
{%- endif -%}
|
||||
</span>{{- '' -}}
|
||||
|
@ -104,28 +110,17 @@
|
|||
<p>{{ _('P95') }}: {{ stats[engine_name].rate95 }}</p>{{- '' -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
</td>
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro engine_reliability(engine_name) -%}
|
||||
{%- set r = reliabilities.get(engine_name, {}).get('reliability', None) -%}
|
||||
{%- set checker_result = reliabilities.get(engine_name, {}).get('checker', []) -%}
|
||||
{%- set errors = reliabilities.get(engine_name, {}).get('errors', []) -%}
|
||||
{%- if r != None -%}
|
||||
{%- if r <= 50 -%}
|
||||
{% set label = 'danger' -%}
|
||||
{%- elif r < 80 -%}
|
||||
{%- set label = 'warning' -%}
|
||||
{%- elif r < 90 %}
|
||||
{%- set label = '' -%}
|
||||
{%- else -%}
|
||||
{%- set label = 'success' -%}
|
||||
{%- endif -%}
|
||||
{% else %}
|
||||
{%- set r = '' -%}
|
||||
{%- endif -%}
|
||||
{%- if checker_result or errors -%}
|
||||
<td class="{{ label }} column-reliability">{{- '' -}}
|
||||
{%- set r = reliabilities.get(engine_name, {}).get('reliability', None) -%}
|
||||
{%- set checker_result = reliabilities.get(engine_name, {}).get('checker', []) -%}
|
||||
{%- set errors = reliabilities.get(engine_name, {}).get('errors', []) -%}
|
||||
{%- if r != None -%}
|
||||
{%- if r <= 50 -%} {% set label='danger' -%} {%- elif r < 80 -%} {%- set label='warning' -%} {%- elif r < 90 %} {%- set
|
||||
label='' -%} {%- else -%} {%- set label='success' -%} {%- endif -%} {% else %} {%- set r='' -%} {%- endif -%} {%- if
|
||||
checker_result or errors -%} <td class="{{ label }} column-reliability">{{- '' -}}
|
||||
<a href="{{ url_for('stats', engine=engine_name|e) }}">{{- '' -}}
|
||||
<span aria-labelledby="{{engine_name}}_reliability">
|
||||
{{- icon_big('warning', 'The engine is not reliabled') }} {{ r -}}
|
||||
|
@ -146,12 +141,12 @@
|
|||
{%- endif -%}
|
||||
</td>
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- block head -%}{%- endblock -%}
|
||||
{%- block linkto_preferences -%}{%- endblock -%}
|
||||
{%- block head -%}{%- endblock -%}
|
||||
{%- block linkto_preferences -%}{%- endblock -%}
|
||||
|
||||
{%- block content -%}
|
||||
{%- block content -%}
|
||||
|
||||
<h1>{{ _('Preferences') }}</h1>
|
||||
|
||||
|
@ -164,56 +159,56 @@
|
|||
<fieldset>
|
||||
<legend>{{- _('Default categories') -}}</legend>
|
||||
{% set display_tooltip = false %}
|
||||
{% include 'simple/categories.html' %}
|
||||
{% include 'kvanDark/categories.html' %}
|
||||
</fieldset>
|
||||
{%- endif -%}
|
||||
{%- if 'language' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/language.html' -%}
|
||||
{%- include 'kvanDark/preferences/language.html' -%}
|
||||
{% endif %}
|
||||
{%- if 'autocomplete' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/autocomplete.html' -%}
|
||||
{%- include 'kvanDark/preferences/autocomplete.html' -%}
|
||||
{%- endif -%}
|
||||
{% if 'safesearch' not in locked_preferences %}
|
||||
{%- include 'simple/preferences/safesearch.html' -%}
|
||||
{%- include 'kvanDark/preferences/safesearch.html' -%}
|
||||
{%- endif -%}
|
||||
{{- plugin_preferences('general') -}}
|
||||
{%- if 'doi_resolver' not in locked_preferences %}
|
||||
{%- include 'simple/preferences/doi_resolver.html' -%}
|
||||
{%- include 'kvanDark/preferences/doi_resolver.html' -%}
|
||||
{%- endif -%}
|
||||
{%- include 'simple/preferences/tokens.html' -%}
|
||||
{%- include 'kvanDark/preferences/tokens.html' -%}
|
||||
{{- tab_footer() -}}
|
||||
|
||||
|
||||
{{- tab_header('maintab', 'ui', _('User interface')) -}}
|
||||
{%- if 'locale' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/ui_locale.html' -%}
|
||||
{%- include 'kvanDark/preferences/ui_locale.html' -%}
|
||||
{%- endif -%}
|
||||
{%- if 'theme' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/theme.html' -%}
|
||||
{%- include 'kvanDark/preferences/theme.html' -%}
|
||||
{%- endif -%}
|
||||
{%- if 'results_on_new_tab' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/results_on_new_tab.html' -%}
|
||||
{%- include 'kvanDark/preferences/results_on_new_tab.html' -%}
|
||||
{%- endif -%}
|
||||
{%- if 'infinite_scroll' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/infinite_scroll.html' -%}
|
||||
{%- include 'kvanDark/preferences/infinite_scroll.html' -%}
|
||||
{%- endif -%}
|
||||
{%- if 'search_on_category_select' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/search_on_category_select.html' -%}
|
||||
{%- include 'kvanDark/preferences/search_on_category_select.html' -%}
|
||||
{%- endif -%}
|
||||
{%- include 'simple/preferences/hotkeys.html' -%}
|
||||
{%- include 'kvanDark/preferences/hotkeys.html' -%}
|
||||
{{- plugin_preferences('ui') -}}
|
||||
{{- tab_footer() -}}
|
||||
|
||||
|
||||
{{- tab_header('maintab', 'privacy', _('Privacy')) -}}
|
||||
{%- if 'method' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/method.html' -%}
|
||||
{%- include 'kvanDark/preferences/method.html' -%}
|
||||
{%- endif -%}
|
||||
{%- if 'image_proxy' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/image_proxy.html' -%}
|
||||
{%- include 'kvanDark/preferences/image_proxy.html' -%}
|
||||
{%- endif -%}
|
||||
{%- if 'query_in_title' not in locked_preferences -%}
|
||||
{%- include 'simple/preferences/query_in_title.html' -%}
|
||||
{%- include 'kvanDark/preferences/query_in_title.html' -%}
|
||||
{%- endif -%}
|
||||
{{- plugin_preferences('privacy') -}}
|
||||
{{- tab_footer() -}}
|
||||
|
@ -223,23 +218,23 @@
|
|||
{{- _('Currently used search engines') -}}
|
||||
</p>
|
||||
{{- tabs_open() -}}
|
||||
{%- include 'simple/preferences/engines.html' -%}
|
||||
{%- include 'kvanDark/preferences/engines.html' -%}
|
||||
{{- tabs_close() -}}
|
||||
{{- tab_footer() -}}
|
||||
|
||||
|
||||
{{- tab_header('maintab', 'query', _('Special Queries')) -}}
|
||||
{%- if answerers -%}
|
||||
{%- include 'simple/preferences/answerers.html' -%}
|
||||
{%- include 'kvanDark/preferences/answerers.html' -%}
|
||||
{%- endif -%}
|
||||
{{- tab_footer() -}}
|
||||
|
||||
{{- tab_header('maintab', 'cookies', _('Cookies')) -}}
|
||||
{%- include 'simple/preferences/cookies.html' -%}
|
||||
{%- include 'kvanDark/preferences/cookies.html' -%}
|
||||
{{- tab_footer() -}}
|
||||
|
||||
{{- tabs_close() -}}
|
||||
{%- include 'simple/preferences/footer.html' -%}
|
||||
{%- include 'kvanDark/preferences/footer.html' -%}
|
||||
|
||||
</form>{{- '' -}}
|
||||
{%- endblock -%}
|
||||
{%- endblock -%}
|
|
@ -4,7 +4,7 @@
|
|||
<br />{{- '' -}}
|
||||
</p>
|
||||
{% if cookies %}
|
||||
<table class="cookies">
|
||||
<table class="cookies">
|
||||
<tr>{{- '' -}}
|
||||
<th>{{ _('Cookie name') }}</th>{{- '' -}}
|
||||
<th>{{ _('Value') }}</th>{{- '' -}}
|
||||
|
@ -15,9 +15,9 @@
|
|||
<td>{{ cookies[cookie] }}</td>{{- '' -}}
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
</table>
|
||||
</table>
|
||||
{%- else -%}
|
||||
{% include 'simple/messages/no_cookies.html' %}
|
||||
{% include 'kvanDark/messages/no_cookies.html' %}
|
||||
{% endif %}
|
||||
<h4>
|
||||
{{- _('Search URL of the currently saved preferences') -}}:{{- '' -}}
|
||||
|
@ -29,7 +29,8 @@
|
|||
</pre>{{- '' -}}
|
||||
</div>{{- '' -}}
|
||||
<p class="small_font">
|
||||
{{- _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') -}}
|
||||
{{- _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result
|
||||
sites.') -}}
|
||||
</p>
|
||||
<h4>
|
||||
{{- _('URL to restore your preferences in another browser') -}}:{{- '' -}}
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
</div>{{- '' -}}
|
||||
</fieldset>{{- '' -}}
|
||||
|
||||
<fieldset>{{- '' -}}
|
||||
<legend id="pref_simple_style">{{- _('Theme style') -}}</legend>{{- '' -}}
|
||||
<!-- <fieldset>{{- '' -}}
|
||||
<legend id="pref_kvanDark_style">{{- _('Theme style') -}}</legend>{{- '' -}}
|
||||
<div class="value">{{- '' -}}
|
||||
<select name="simple_style" aria-labelledby="pref_simple_style">
|
||||
<select name="kvanDark_style" aria-labelledby="pref_kvanDark_style">
|
||||
{%- for name in ['auto', 'light', 'dark'] -%}
|
||||
<option value="{{ name }}" {%- if name==preferences.get_value('simple_style') %} selected="selected" {%-
|
||||
<option value="{{ name }}" {%- if name==preferences.get_value('kvanDark_style') %} selected="selected" {%-
|
||||
endif -%}>
|
||||
{{- _(name) -}}
|
||||
</option>
|
||||
|
@ -29,6 +29,6 @@
|
|||
<div class="description">
|
||||
{{- _('Choose auto to follow your browser settings') -}}
|
||||
</div>{{- '' -}}
|
||||
</fieldset>{{- '' -}}
|
||||
</fieldset>{{- '' -}} -->
|
||||
|
||||
{%- include 'simple/preferences/center_alignment.html' -%}
|
||||
{%- include 'kvanDark/preferences/center_alignment.html' -%}
|
|
@ -1,27 +1,21 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'kvanDark/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">
|
||||
<p class="content">
|
||||
{{- result.content|safe -}}
|
||||
</p>
|
||||
</p>
|
||||
{%- endif -%}
|
||||
{%- if result.repository -%}
|
||||
<p class="content">{{- '' -}}
|
||||
<p class="content">{{- '' -}}
|
||||
{{ _('repo') }}: {{- ' ' -}}
|
||||
<a href="{{ result.repository|safe }}"{{- ' ' -}}
|
||||
{% if results_on_new_tab %}
|
||||
target="_blank" {{- ' ' -}}
|
||||
rel="noopener noreferrer"
|
||||
{%- else -%}
|
||||
rel="noreferrer"
|
||||
{%- endif -%}
|
||||
>
|
||||
<a href="{{ result.repository|safe }}" {{- ' ' -}} {% if results_on_new_tab %} target="_blank" {{- ' ' -}}
|
||||
rel="noopener noreferrer" {%- else -%} rel="noreferrer" {%- endif -%}>
|
||||
{{- result.repository -}}
|
||||
</a>{{- '' -}}
|
||||
</p>
|
||||
</p>
|
||||
{%- endif -%}
|
||||
|
||||
<div dir="ltr" class="codelines">
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'kvanDark/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>
|
||||
<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">
|
||||
<p class="content">
|
||||
{{ result.content|safe }}
|
||||
</p>
|
||||
</p>
|
||||
{%- else %}
|
||||
<p class="content empty_element">
|
||||
<p class="content empty_element">
|
||||
{{ _('This site did not provide any description.')|safe }}
|
||||
</p>
|
||||
</p>
|
||||
{% endif -%}
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{% if result.iframe_src -%}
|
||||
|
@ -22,7 +24,9 @@
|
|||
{%- endif %}
|
||||
{% if result.audio_src -%}
|
||||
<div id="result-media-{{ index }}" class="audio-control">
|
||||
<audio controls><source src="{{result.audio_src}}"></audio>
|
||||
<audio controls>
|
||||
<source src="{{result.audio_src}}">
|
||||
</audio>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{{- result_footer(result) }}
|
|
@ -1,5 +1,5 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'simple/icons.html' import icon_small %}
|
||||
{% from 'kvanDark/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'kvanDark/icons.html' import icon_small %}
|
||||
|
||||
{{ result_header(result, favicons, image_proxify) -}}
|
||||
{{- result_sub_header(result) -}}
|
||||
|
@ -18,12 +18,13 @@
|
|||
<span itemprop="streetAddress">
|
||||
{%- if result.address.house_number -%}{{- result.address.house_number -}}, {% endif %}
|
||||
{{- result.address.road -}}
|
||||
</span><br/>
|
||||
</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/>
|
||||
{%- 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>
|
||||
|
@ -32,21 +33,35 @@
|
|||
</tr>
|
||||
{%- endif %}
|
||||
{%- for info in result.data -%}
|
||||
<tr><th scope="row">{{ info.label }}</th><td>{{ info.value|safe }}</td></tr>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<div id="result-map-{{ index }}" class="invisible">
|
||||
<div id="osm-map-{{ index }}" class="osm-map-box"></div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
{{- result_footer(result) }}
|
|
@ -1,9 +1,13 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %}
|
||||
{% from 'kvanDark/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.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 -}}
|
||||
|
@ -19,20 +23,28 @@
|
|||
</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 -%}
|
||||
{%- 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 -%}
|
||||
{%- if result.doi %}{{ result_link('https://www.altmetric.com/details/doi/' + result.doi, 'Altmetric') }}{% endif
|
||||
-%}
|
||||
</p>
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{{- result_footer(result) }}
|
|
@ -1,4 +1,4 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'kvanDark/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) -}}
|
||||
|
@ -6,9 +6,9 @@
|
|||
{% 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">
|
||||
<p class="content">
|
||||
{{ result.content }}
|
||||
</p>
|
||||
</p>
|
||||
{% endif -%}
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
{{- result_footer(result) }}
|
|
@ -1,23 +1,29 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %}
|
||||
{% from 'kvanDark/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.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.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>
|
||||
{%- 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.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) -}}
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
|
||||
{% from 'kvanDark/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>
|
||||
<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">
|
||||
<p class="content">
|
||||
{{ result.content|safe }}
|
||||
</p>
|
||||
</p>
|
||||
{%- else %}
|
||||
<p class="content empty_element">
|
||||
<p class="content empty_element">
|
||||
{{ _('This site did not provide any description.')|safe }}
|
||||
</p>
|
||||
</p>
|
||||
{% endif -%}
|
||||
</p>
|
||||
{{- result_sub_footer(result, proxify) -}}
|
||||
|
|
|
@ -1,26 +1,31 @@
|
|||
{% extends "simple/base.html" %}
|
||||
{% from 'simple/icons.html' import icon, icon_big, icon_small %}
|
||||
{% extends "kvanDark/base.html" %}
|
||||
{% from 'kvanDark/icons.html' import icon, icon_big, icon_small %}
|
||||
{% macro engine_data_form(engine_data) -%}
|
||||
{% for engine_name, kv_data in engine_data.items() %}
|
||||
{% for k, v in kv_data.items() %}
|
||||
<input type="hidden" name="engine_data-{{ engine_name }}-{{ k|e }}" value="{{ v|e }}" />
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% for engine_name, kv_data in engine_data.items() %}
|
||||
{% for k, v in kv_data.items() %}
|
||||
<input type="hidden" name="engine_data-{{ engine_name }}-{{ k|e }}" value="{{ v|e }}" />
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{%- endmacro %}
|
||||
{% block title %}{% if query_in_title %}{{- q|e }} - {% endif %}{% endblock %}
|
||||
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
||||
{% block meta %}
|
||||
<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}"
|
||||
href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(" ,") |
|
||||
replace(' ',' +') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language
|
||||
}}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
||||
{% block content %}
|
||||
{% include 'simple/search.html' %}
|
||||
{% include 'kvanDark/search.html' %}
|
||||
|
||||
{% if results and results|map(attribute='template')|unique|list|count == 1 %}
|
||||
{% set only_template = 'only_template_' + results[0]['template']|default('default')|replace('.html', '') %}
|
||||
{% set only_template = 'only_template_' + results[0]['template']|default('default')|replace('.html', '') %}
|
||||
{% else %}
|
||||
{% set only_template = '' %}
|
||||
{% set only_template = '' %}
|
||||
{% endif %}
|
||||
|
||||
<div id="results" class="{{ only_template }}">
|
||||
{% if answers -%}
|
||||
<div id="answers" role="complementary" aria-labelledby="answers-title"><h4 class="title" id="answers-title">{{ _('Answers') }} : </h4>
|
||||
<div id="answers" role="complementary" aria-labelledby="answers-title">
|
||||
<h4 class="title" id="answers-title">{{ _('Answers') }} : </h4>
|
||||
{%- for answer in answers.values() -%}
|
||||
<div class="answer">
|
||||
<span>{{ answer.answer }}</span>
|
||||
|
@ -43,26 +48,26 @@
|
|||
<details open class="sidebar-collapsable">
|
||||
<summary class="title">{{ _('Info') }}</summary>
|
||||
{%- for infobox in infoboxes -%}
|
||||
{%- include 'simple/elements/infobox.html' -%}
|
||||
{%- include 'kvanDark/elements/infobox.html' -%}
|
||||
{%- endfor -%}
|
||||
</details>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if suggestions -%}
|
||||
{%- include 'simple/elements/suggestions.html' -%}
|
||||
{%- include 'kvanDark/elements/suggestions.html' -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if method == 'POST' -%}
|
||||
{%- include 'simple/elements/search_url.html' -%}
|
||||
{%- include 'kvanDark/elements/search_url.html' -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if unresponsive_engines -%}
|
||||
{%- include 'simple/elements/engines_msg.html' -%}
|
||||
{%- include 'kvanDark/elements/engines_msg.html' -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if search_formats -%}
|
||||
{%- include 'simple/elements/apis.html' -%}
|
||||
{%- include 'kvanDark/elements/apis.html' -%}
|
||||
{%- endif -%}
|
||||
|
||||
<div id="sidebar-end-collapsable"></div>
|
||||
|
@ -82,7 +87,7 @@
|
|||
<input type="hidden" name="time_range" value="{{ time_range }}">
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit }}" >{% endif %}
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit }}">{% endif %}
|
||||
<input type="submit" role="link" value="{{ correction.title }}">
|
||||
</form>
|
||||
</div>
|
||||
|
@ -92,13 +97,14 @@
|
|||
|
||||
<div id="urls" role="main">
|
||||
{% for result in results %}
|
||||
{% if result.open_group and not only_template %}<div class="template_group_{{ result['template']|replace('.html', '') }}">{% endif %}
|
||||
{% if result.open_group and not only_template %}<div
|
||||
class="template_group_{{ result['template']|replace('.html', '') }}">{% endif %}
|
||||
{% set index = loop.index %}
|
||||
{% include get_result_template('simple', result['template']) %}
|
||||
{% include get_result_template('kvanDark', result['template']) %}
|
||||
{% if result.close_group and not only_template %}</div>{% endif %}
|
||||
{% endfor %}
|
||||
{% if not results and not answers %}
|
||||
{% include 'simple/messages/no_results.html' %}
|
||||
{% include 'kvanDark/messages/no_results.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="backToTop">
|
||||
|
@ -109,16 +115,17 @@
|
|||
{% if pageno > 1 %}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="previous_page">
|
||||
<div class="{% if rtl %}right{% else %}left{% endif %}">
|
||||
<input type="hidden" name="q" value="{{ q|e }}" >
|
||||
<input type="hidden" name="q" value="{{ q|e }}">
|
||||
{% for category in selected_categories %}
|
||||
<input type="hidden" name="category_{{ category }}" value="1" >
|
||||
<input type="hidden" name="category_{{ category }}" value="1">
|
||||
{% endfor %}
|
||||
<input type="hidden" name="pageno" value="{{ pageno-1 }}" >
|
||||
<input type="hidden" name="language" value="{{ current_language }}" >
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}" >
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}" >
|
||||
<input type="hidden" name="theme" value="{{ theme }}" >
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
||||
<input type="hidden" name="pageno" value="{{ pageno-1 }}">
|
||||
<input type="hidden" name="language" value="{{ current_language }}">
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}">
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}">{% endif
|
||||
%}
|
||||
{{- engine_data_form(engine_data) -}}
|
||||
<button role="link" type="submit">{{ icon_small('chevron-left') }} {{ _('Previous page') }}</button>
|
||||
</div>
|
||||
|
@ -126,16 +133,17 @@
|
|||
{% endif %}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="next_page">
|
||||
<div class="{% if rtl %}left{% else %}right{% endif %}">
|
||||
<input type="hidden" name="q" value="{{ q|e }}" >
|
||||
<input type="hidden" name="q" value="{{ q|e }}">
|
||||
{% for category in selected_categories %}
|
||||
<input type="hidden" name="category_{{ category }}" value="1" >
|
||||
<input type="hidden" name="category_{{ category }}" value="1">
|
||||
{% endfor %}
|
||||
<input type="hidden" name="pageno" value="{{ pageno+1 }}" >
|
||||
<input type="hidden" name="language" value="{{ current_language }}" >
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}" >
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}" >
|
||||
<input type="hidden" name="theme" value="{{ theme }}" >
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
||||
<input type="hidden" name="pageno" value="{{ pageno+1 }}">
|
||||
<input type="hidden" name="language" value="{{ current_language }}">
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}">
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}">{% endif
|
||||
%}
|
||||
{{- engine_data_form(engine_data) -}}
|
||||
<button role="link" type="submit">{{ _('Next page') }} {{ icon_small('chevron-right') }}</button>
|
||||
</div>
|
||||
|
@ -150,16 +158,17 @@
|
|||
<div class="numbered_pagination">
|
||||
{% for x in range(pstart, pend) %}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="page_number">
|
||||
<input type="hidden" name="q" value="{{ q|e }}" >
|
||||
<input type="hidden" name="q" value="{{ q|e }}">
|
||||
{% for category in selected_categories %}
|
||||
<input type="hidden" name="category_{{ category }}" value="1" >
|
||||
<input type="hidden" name="category_{{ category }}" value="1">
|
||||
{% endfor %}
|
||||
<input type="hidden" name="pageno" value="{{ x }}" >
|
||||
<input type="hidden" name="language" value="{{ current_language }}" >
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}" >
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}" >
|
||||
<input type="hidden" name="theme" value="{{ theme }}" >
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
||||
<input type="hidden" name="pageno" value="{{ x }}">
|
||||
<input type="hidden" name="language" value="{{ current_language }}">
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}">
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}">{% endif
|
||||
%}
|
||||
{{- engine_data_form(engine_data) -}}
|
||||
{% if pageno == x %}
|
||||
<input role="link" class="page_number_current" type="button" value="{{ x }}">
|
||||
|
|
|
@ -2,23 +2,29 @@
|
|||
<div id="search_header">
|
||||
<a id="search_logo" href="{{ url_for('index') }}" tabindex="0" title="{{ _('Display the front page') }}">
|
||||
<span hidden>SearXNG</span>
|
||||
{% include 'simple/searxng-wordmark.min.svg' without context %}
|
||||
{% include 'kvanDark/searxng-wordmark.min.svg' without context %}
|
||||
</a>
|
||||
<div id="search_view">
|
||||
<div class="search_box">
|
||||
<input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" autocapitalize="none" spellcheck="false" autocorrect="off" dir="auto" value="{{ q or '' }}">
|
||||
<button id="clear_search" type="reset" aria-label="{{ _('clear') }}" class="hide_if_nojs"><span>{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
|
||||
<button id="send_search" type="submit" {%- if search_on_category_select -%}name="category_{{ selected_categories[0]|replace(' ', '_') }}"{%- endif -%} aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
||||
<input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1"
|
||||
autocomplete="off" autocapitalize="none" spellcheck="false" autocorrect="off" dir="auto"
|
||||
value="{{ q or '' }}">
|
||||
<button id="clear_search" type="reset" aria-label="{{ _('clear') }}" class="hide_if_nojs"><span>{{
|
||||
icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
|
||||
<button id="send_search" type="submit" {%- if search_on_category_select
|
||||
-%}name="category_{{ selected_categories[0]|replace(' ', '_') }}" {%- endif -%}
|
||||
aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline')
|
||||
}}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
||||
</div>
|
||||
</div>
|
||||
{% set display_tooltip = true %}
|
||||
{% include 'simple/categories.html' %}
|
||||
{% include 'kvanDark/categories.html' %}
|
||||
</div>
|
||||
<div class="search_filters">
|
||||
{% include 'simple/filters/languages.html' %}
|
||||
{% include 'simple/filters/time_range.html' %}
|
||||
{% include 'simple/filters/safesearch.html' %}
|
||||
{% include 'kvanDark/filters/languages.html' %}
|
||||
{% include 'kvanDark/filters/time_range.html' %}
|
||||
{% include 'kvanDark/filters/safesearch.html' %}
|
||||
</div>
|
||||
<input type="hidden" name="theme" value="{{ theme }}" >
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}">{% endif %}
|
||||
</form>
|
|
@ -1,21 +1,22 @@
|
|||
{% from 'simple/icons.html' import icon_big %}
|
||||
{% from 'simple/new_issue.html' import new_issue with context %}
|
||||
{% from 'kvanDark/icons.html' import icon_big %}
|
||||
{% from 'kvanDark/new_issue.html' import new_issue with context %}
|
||||
|
||||
{% extends "simple/page_with_header.html" %}
|
||||
{% extends "kvanDark/page_with_header.html" %}
|
||||
|
||||
{%- macro th_sort(column_order, column_name) -%}
|
||||
{% if selected_engine_name %}
|
||||
{{ column_name }}
|
||||
{% elif column_order==sort_order %}
|
||||
{{ column_name }} {{ icon_big('arrow-dropdown') }}
|
||||
{% else %}
|
||||
<a href="{{ url_for('stats', sort=column_order) }}">{{ column_name }}</a>
|
||||
{% endif %}
|
||||
{% if selected_engine_name %}
|
||||
{{ column_name }}
|
||||
{% elif column_order==sort_order %}
|
||||
{{ column_name }} {{ icon_big('arrow-dropdown') }}
|
||||
{% else %}
|
||||
<a href="{{ url_for('stats', sort=column_order) }}">{{ column_name }}</a>
|
||||
{% endif %}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% block head %} {% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% if selected_engine_name %}<a href="{{ url_for('stats') }}">{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %}</a> - {{ selected_engine_name }}{% endif %}</h1>
|
||||
<h1>{% if selected_engine_name %}<a href="{{ url_for('stats') }}">{% endif %}{{ _('Engine stats') }}{% if
|
||||
selected_engine_name %}</a> - {{ selected_engine_name }}{% endif %}</h1>
|
||||
|
||||
{% if not engine_stats.get('time') %}
|
||||
{{ _('There is currently no data available. ') }}
|
||||
|
@ -30,7 +31,8 @@
|
|||
</tr>
|
||||
{% for engine_stat in engine_stats.get('time', []) %}
|
||||
<tr>
|
||||
<td class="engine-name"><a href="{{ url_for('stats', engine=engine_stat.name|e) }}">{{ engine_stat.name }}</a></td>
|
||||
<td class="engine-name"><a href="{{ url_for('stats', engine=engine_stat.name|e) }}">{{ engine_stat.name }}</a>
|
||||
</td>
|
||||
<td class="engine-score">
|
||||
{% if engine_stat.score %}
|
||||
<span>{{ engine_stat.score_per_result|round(1) }}</span>
|
||||
|
@ -41,7 +43,9 @@
|
|||
|
||||
<div class="bar-chart-value">{{- engine_stat.result_count | int -}}</div>{{- "" -}}
|
||||
<div class="bar-chart-graph" aria-hidden="true">
|
||||
<div class="bar-chart-bar bar{{ (100 * engine_stat.result_count / engine_stats.max_result_count)|round }}"></div>{{- "" -}}
|
||||
<div
|
||||
class="bar-chart-bar bar{{ (100 * engine_stat.result_count / engine_stats.max_result_count)|round }}">
|
||||
</div>{{- "" -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
|
@ -49,8 +53,12 @@
|
|||
{%- if engine_stat.total is not none -%}
|
||||
<div class="bar-chart-value">{{- engine_stat.total | round(1) -}}</div>{{- "" -}}
|
||||
<div class="bar-chart-graph" aria-labelledby="{{engine_stat.name}}_time" aria-hidden="true">
|
||||
{% if engine_stat.http is not none and engine_stats.max_time %}<div class="bar-chart-serie1 bar{{ (100 * engine_stat.http / engine_stats.max_time)|round }}"></div>{%- endif -%}
|
||||
{% if engine_stat.processing is not none and engine_stats.max_time %}<div class="bar-chart-serie2 bar{{ (100 * engine_stat.processing / engine_stats.max_time)|round }}"></div>{%- endif -%}
|
||||
{% if engine_stat.http is not none and engine_stats.max_time %}<div
|
||||
class="bar-chart-serie1 bar{{ (100 * engine_stat.http / engine_stats.max_time)|round }}"></div>{%-
|
||||
endif -%}
|
||||
{% if engine_stat.processing is not none and engine_stats.max_time %}<div
|
||||
class="bar-chart-serie2 bar{{ (100 * engine_stat.processing / engine_stats.max_time)|round }}">
|
||||
</div>{%- endif -%}
|
||||
</div>
|
||||
<div class="engine-tooltip" role="tooltip" id="{{engine_stat.name}}_time">{{- "" -}}
|
||||
<table>
|
||||
|
@ -89,7 +97,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if selected_engine_name %}
|
||||
<div class="engine-errors">
|
||||
<div class="engine-errors">
|
||||
{% for secondary in [False, True] %}
|
||||
{% set ns = namespace(first=true) %}
|
||||
{% for error in engine_reliabilities[selected_engine_name].errors %}
|
||||
|
@ -102,13 +110,17 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
{%- if error.exception_classname -%}
|
||||
<th scope="row" class="engine-error-type">{{ _('Exception') }}</th><td>{{ error.exception_classname }}</td>
|
||||
<th scope="row" class="engine-error-type">{{ _('Exception') }}</th>
|
||||
<td>{{ error.exception_classname }}</td>
|
||||
{%- elif error.log_message -%}
|
||||
<th scope="row" class="engine-error-type">{{ _('Message') }}</th><td>{{ error.log_message }}</td>
|
||||
<th scope="row" class="engine-error-type">{{ _('Message') }}</th>
|
||||
<td>{{ error.log_message }}</td>
|
||||
{%- endif -%}
|
||||
<th scope="row" class="engine-error-type">{{ _('Percentage') }}</th><td class="engine-error-type">{{ error.percentage }}</td>
|
||||
<th scope="row" class="engine-error-type">{{ _('Percentage') }}</th>
|
||||
<td class="engine-error-type">{{ error.percentage }}</td>
|
||||
</tr>
|
||||
{% if error.log_parameters and error.log_parameters != (None, None, None) %}<tr><th scope="row">{{ _('Parameter') }}</th>{{- '' -}}
|
||||
{% if error.log_parameters and error.log_parameters != (None, None, None) %}<tr>
|
||||
<th scope="row">{{ _('Parameter') }}</th>{{- '' -}}
|
||||
<td colspan="3">
|
||||
{%- for param in error.log_parameters -%}
|
||||
<span class="log_parameters">{{ param }}</span>
|
||||
|
@ -116,9 +128,18 @@
|
|||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr><th scope="row">{{ _('Filename') }}</th><td colspan="3">{{ error.filename }}:{{ error.line_no }}</td></tr>
|
||||
<tr><th scope="row">{{ _('Function') }}</th><td colspan="3">{{ error.function }}</td></tr>
|
||||
<tr><th scope="row">{{ _('Code') }}</th><td colspan="3">{{ error.code }}</td></tr>
|
||||
<tr>
|
||||
<th scope="row">{{ _('Filename') }}</th>
|
||||
<td colspan="3">{{ error.filename }}:{{ error.line_no }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ _('Function') }}</th>
|
||||
<td colspan="3">{{ error.function }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ _('Code') }}</th>
|
||||
<td colspan="3">{{ error.code }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
@ -142,7 +163,7 @@
|
|||
</table>
|
||||
{% endif %}
|
||||
{{ new_issue(selected_engine_name, engine_reliabilities[selected_engine_name]) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
|
@ -44,6 +44,7 @@ node.clean() {
|
|||
build_msg CLEAN "themes -- locally installed npm dependencies"
|
||||
( set -e
|
||||
npm --prefix searx/static/themes/simple run clean
|
||||
npm --prefix searx/static/themes/kvanDark run clean
|
||||
)
|
||||
build_msg CLEAN "locally installed developer and CI tools"
|
||||
( set -e
|
||||
|
|
|
@ -15,6 +15,7 @@ themes.:
|
|||
kvanDark.:
|
||||
build : build kvanDark theme
|
||||
test : test kvanDark theme
|
||||
stylelint : stylelint
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -33,6 +34,9 @@ themes.live() {
|
|||
case "${LIVE_THEME}" in
|
||||
simple)
|
||||
theme="searx/static/themes/${LIVE_THEME}"
|
||||
;;
|
||||
kvanDark)
|
||||
theme="searx/static/themes/${LIVE_THEME}"
|
||||
;;
|
||||
'')
|
||||
die_caller 42 "missing theme argument"
|
||||
|
@ -77,9 +81,14 @@ themes.kvanDark() {
|
|||
}
|
||||
|
||||
themes.kvanDark.test() {
|
||||
build_msg TEST "theme: cystom"
|
||||
build_msg TEST "theme: kvanDark"
|
||||
nodejs.ensure
|
||||
npm --prefix searx/static/themes/kvanDark install
|
||||
npm --prefix searx/static/themes/kvanDark run test
|
||||
dump_return $?
|
||||
}
|
||||
|
||||
themes.kvanDark.stylelint() {
|
||||
npm --prefix searx/static/themes/kvanDark run stylelint
|
||||
dump_return $?
|
||||
}
|
Loading…
Add table
Reference in a new issue