mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
Merge pull request #295 from return42/fix-csp-2
[fix] make HTML templates more CSP compliant
This commit is contained in:
commit
a3789b3bb4
@ -374,6 +374,14 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
.default-image-style {
|
||||||
|
width: auto;
|
||||||
|
max-height: 60px;
|
||||||
|
min-height: 60px;
|
||||||
|
}
|
||||||
|
.col-stat {
|
||||||
|
width: 10rem;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
this file is generated automatically by searx_extra/update/update_pygments.py
|
this file is generated automatically by searx_extra/update/update_pygments.py
|
||||||
using pygments version 2.10.0
|
using pygments version 2.10.0
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -374,6 +374,14 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
.default-image-style {
|
||||||
|
width: auto;
|
||||||
|
max-height: 60px;
|
||||||
|
min-height: 60px;
|
||||||
|
}
|
||||||
|
.col-stat {
|
||||||
|
width: 10rem;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
this file is generated automatically by searx_extra/update/update_pygments.py
|
this file is generated automatically by searx_extra/update/update_pygments.py
|
||||||
using pygments version 2.10.0
|
using pygments version 2.10.0
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -374,6 +374,14 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
.default-image-style {
|
||||||
|
width: auto;
|
||||||
|
max-height: 60px;
|
||||||
|
min-height: 60px;
|
||||||
|
}
|
||||||
|
.col-stat {
|
||||||
|
width: 10rem;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
this file is generated automatically by searx_extra/update/update_pygments.py
|
this file is generated automatically by searx_extra/update/update_pygments.py
|
||||||
using pygments version 2.10.0
|
using pygments version 2.10.0
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,6 +2,8 @@
|
|||||||
@import "../../../../__common__/less/new_issue.less";
|
@import "../../../../__common__/less/new_issue.less";
|
||||||
@import "../../../../__common__/less/stats.less";
|
@import "../../../../__common__/less/stats.less";
|
||||||
@import "../../../../__common__/less/result_templates.less";
|
@import "../../../../__common__/less/result_templates.less";
|
||||||
|
@import "../../less/result_templates.less";
|
||||||
|
@import "../../less/preferences.less";
|
||||||
@import "../../generated/pygments-logicodev.less";
|
@import "../../generated/pygments-logicodev.less";
|
||||||
|
|
||||||
@stacked-bar-chart: rgb(213, 216, 215, 1);
|
@stacked-bar-chart: rgb(213, 216, 215, 1);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
@import "../../../../__common__/less/new_issue.less";
|
@import "../../../../__common__/less/new_issue.less";
|
||||||
@import "../../../../__common__/less/stats.less";
|
@import "../../../../__common__/less/stats.less";
|
||||||
@import "../../../../__common__/less/result_templates.less";
|
@import "../../../../__common__/less/result_templates.less";
|
||||||
|
@import "../../less/result_templates.less";
|
||||||
|
@import "../../less/preferences.less";
|
||||||
@import "../../generated/pygments-logicodev.less";
|
@import "../../generated/pygments-logicodev.less";
|
||||||
|
|
||||||
@import "navbar.less";
|
@import "navbar.less";
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
@import "../../../../__common__/less/new_issue.less";
|
@import "../../../../__common__/less/new_issue.less";
|
||||||
@import "../../../../__common__/less/stats.less";
|
@import "../../../../__common__/less/stats.less";
|
||||||
@import "../../../../__common__/less/result_templates.less";
|
@import "../../../../__common__/less/result_templates.less";
|
||||||
|
@import "../../less/result_templates.less";
|
||||||
|
@import "../../less/preferences.less";
|
||||||
@import "../../generated/pygments-pointhi.less";
|
@import "../../generated/pygments-pointhi.less";
|
||||||
|
|
||||||
@import "footer.less";
|
@import "footer.less";
|
||||||
|
3
searx/static/themes/oscar/src/less/preferences.less
Normal file
3
searx/static/themes/oscar/src/less/preferences.less
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.col-stat {
|
||||||
|
width: 10rem;
|
||||||
|
}
|
5
searx/static/themes/oscar/src/less/result_templates.less
Normal file
5
searx/static/themes/oscar/src/less/result_templates.less
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.default-image-style {
|
||||||
|
width: auto;
|
||||||
|
max-height: 60px;
|
||||||
|
min-height: 60px;
|
||||||
|
}
|
@ -1841,6 +1841,9 @@ td:hover .engine-tooltip,
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.column-reliability .engine-tooltip {
|
||||||
|
right: 12rem;
|
||||||
|
}
|
||||||
#main_preferences form {
|
#main_preferences form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1841,6 +1841,9 @@ td:hover .engine-tooltip,
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.column-reliability .engine-tooltip {
|
||||||
|
right: 12rem;
|
||||||
|
}
|
||||||
#main_preferences form {
|
#main_preferences form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
2
searx/static/themes/simple/css/searx.min.css
vendored
2
searx/static/themes/simple/css/searx.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,9 @@
|
|||||||
|
.column-reliability {
|
||||||
|
.engine-tooltip {
|
||||||
|
right: 12rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#main_preferences {
|
#main_preferences {
|
||||||
form {
|
form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro engine_time(engine_name, css_align_class) -%}
|
{%- macro engine_time(engine_name, css_align_class) -%}
|
||||||
<td class="{{ label }}" style="padding: 2px">{{- "" -}}
|
<td class="{{ label }}">{{- "" -}}
|
||||||
{%- if stats[engine_name].time != None -%}
|
{%- if stats[engine_name].time != None -%}
|
||||||
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
|
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
|
||||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
||||||
@ -318,15 +318,15 @@
|
|||||||
<th scope="col">{{ _("Allow") }}</th>
|
<th scope="col">{{ _("Allow") }}</th>
|
||||||
<th scope="col">{{ _("Engine name") }}</th>
|
<th scope="col">{{ _("Engine name") }}</th>
|
||||||
<th scope="col">{{ _("Shortcut") }}</th>
|
<th scope="col">{{ _("Shortcut") }}</th>
|
||||||
<th scope="col" style="width: 10rem">{{ _("Selected language") }}</th>
|
<th scope="col" class="col-stat">{{ _("Selected language") }}</th>
|
||||||
<th scope="col" style="width: 10rem">{{ _("SafeSearch") }}</th>
|
<th scope="col" class="col-stat">{{ _("SafeSearch") }}</th>
|
||||||
<th scope="col" style="width: 10rem">{{ _("Time range") }}</th>
|
<th scope="col" class="col-stat">{{ _("Time range") }}</th>
|
||||||
<th scope="col">{{ _("Response time") }}</th>
|
<th scope="col">{{ _("Response time") }}</th>
|
||||||
<th scope="col" class="text-right" style="width: 7rem">{{ _("Max time") }}</th>
|
<th scope="col" class="col-stat text-right">{{ _("Max time") }}</th>
|
||||||
<th scope="col" class="text-right" style="width: 7rem">{{ _("Reliablity") }}</th>
|
<th scope="col" class="col-stat text-right">{{ _("Reliablity") }}</th>
|
||||||
{% else %}
|
{% else %}
|
||||||
<th scope="col">{{ _("Reliablity") }}</th>
|
<th scope="col" class="col-stat">{{ _("Reliablity") }}</th>
|
||||||
<th scope="col">{{ _("Max time") }}</th>
|
<th scope="col" class="col-stat">{{ _("Max time") }}</th>
|
||||||
<th scope="col" class="text-right">{{ _("Response time") }}</th>
|
<th scope="col" class="text-right">{{ _("Response time") }}</th>
|
||||||
<th scope="col" class="text-right">{{ _("Time range") }}</th>
|
<th scope="col" class="text-right">{{ _("Time range") }}</th>
|
||||||
<th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
|
<th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
{%- if result.img_src or result.thumbnail -%}
|
{%- if result.img_src or result.thumbnail -%}
|
||||||
<div class="container-fluid">{{- "" -}}
|
<div class="container-fluid">{{- "" -}}
|
||||||
<div class="row">{{- "" -}}
|
<div class="row">{{- "" -}}
|
||||||
<img src="{{ image_proxify(result.img_src or result.thumbnail) }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
|
<img src="{{ image_proxify(result.img_src or result.thumbnail) }}" title="{{ result.title|striptags }}" class="default-image-style col-xs-2 col-sm-4 col-md-4 result-content">
|
||||||
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
|
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
|
||||||
</div>{{- "" -}}
|
</div>{{- "" -}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{%- if result.img_src -%}
|
{%- if result.img_src -%}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
|
<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="default-image-style col-xs-2 col-sm-4 col-md-4 result-content">
|
||||||
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
|
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro engine_time(engine_name) -%}
|
{%- macro engine_time(engine_name) -%}
|
||||||
<td class="{{ label }}" style="padding: 2px; width: 13rem;">{{- "" -}}
|
<td class="{{ label }}">{{- "" -}}
|
||||||
{%- if stats[engine_name].time != None -%}
|
{%- if stats[engine_name].time != None -%}
|
||||||
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
|
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
|
||||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
||||||
@ -70,13 +70,13 @@
|
|||||||
{% set r = '' %}
|
{% set r = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if checker_result or errors %}
|
{% if checker_result or errors %}
|
||||||
<td class="{{ label }}">{{- "" -}}
|
<td class="{{ label }} column-reliability">{{- "" -}}
|
||||||
<a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
|
<a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
|
||||||
<span aria-labelledby="{{engine_name}}_reliability">
|
<span aria-labelledby="{{engine_name}}_reliability">
|
||||||
{{ icon('warning', 'The engine is not reliabled') }} {{ r -}}
|
{{ icon('warning', 'The engine is not reliabled') }} {{ r -}}
|
||||||
</span>{{- "" -}}
|
</span>{{- "" -}}
|
||||||
</a>{{- "" -}}
|
</a>{{- "" -}}
|
||||||
<div class="engine-tooltip" style="right: 12rem;" role="tooltip" id="{{engine_name}}_reliability">
|
<div class="engine-tooltip" role="tooltip" id="{{engine_name}}_reliability">
|
||||||
{%- if checker_result -%}
|
{%- if checker_result -%}
|
||||||
<p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
|
<p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
@ -257,7 +257,7 @@
|
|||||||
|
|
||||||
{{ tab_header('maintab', 'cookies', _('Cookies')) }}
|
{{ tab_header('maintab', 'cookies', _('Cookies')) }}
|
||||||
|
|
||||||
<p class="text-muted" style="margin:20px 0;">
|
<p class="text-muted">
|
||||||
{{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
|
{{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
|
||||||
{{ _('With that list, you can assess searx transparency.') }}<br />
|
{{ _('With that list, you can assess searx transparency.') }}<br />
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user