summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-09-07 18:51:00 +0200
committerGitHub <noreply@github.com>2021-09-07 18:51:00 +0200
commita3789b3bb44fd929a730518da678b7754a2c18cb (patch)
treede8ad3bf3ac0ac09d198246843a1267c30510d01 /searx/templates
parente41f78b806a4f00cbb37fd4a276aff7d10230057 (diff)
parentb0623ac9f6e67541cb5bc59880915d401399b216 (diff)
Merge pull request #295 from return42/fix-csp-2
[fix] make HTML templates more CSP compliant
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/oscar/preferences.html16
-rw-r--r--searx/templates/oscar/result_templates/default.html2
-rw-r--r--searx/templates/oscar/result_templates/files.html2
-rw-r--r--searx/templates/simple/preferences.html8
4 files changed, 14 insertions, 14 deletions
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index f46d1e620..ba861a68e 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -22,7 +22,7 @@
{%- endmacro %}
{%- macro engine_time(engine_name, css_align_class) -%}
-<td class="{{ label }}" style="padding: 2px">{{- "" -}}
+<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">
@@ -318,15 +318,15 @@
<th scope="col">{{ _("Allow") }}</th>
<th scope="col">{{ _("Engine name") }}</th>
<th scope="col">{{ _("Shortcut") }}</th>
- <th scope="col" style="width: 10rem">{{ _("Selected language") }}</th>
- <th scope="col" style="width: 10rem">{{ _("SafeSearch") }}</th>
- <th scope="col" style="width: 10rem">{{ _("Time range") }}</th>
+ <th scope="col" class="col-stat">{{ _("Selected language") }}</th>
+ <th scope="col" class="col-stat">{{ _("SafeSearch") }}</th>
+ <th scope="col" class="col-stat">{{ _("Time range") }}</th>
<th scope="col">{{ _("Response time") }}</th>
- <th scope="col" class="text-right" style="width: 7rem">{{ _("Max time") }}</th>
- <th scope="col" class="text-right" style="width: 7rem">{{ _("Reliablity") }}</th>
+ <th scope="col" class="col-stat text-right">{{ _("Max time") }}</th>
+ <th scope="col" class="col-stat text-right">{{ _("Reliablity") }}</th>
{% else %}
- <th scope="col">{{ _("Reliablity") }}</th>
- <th scope="col">{{ _("Max time") }}</th>
+ <th scope="col" class="col-stat">{{ _("Reliablity") }}</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">{{ _("Time range") }}</th>
<th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html
index 53cfee5cb..535630499 100644
--- a/searx/templates/oscar/result_templates/default.html
+++ b/searx/templates/oscar/result_templates/default.html
@@ -16,7 +16,7 @@
{%- if result.img_src or result.thumbnail -%}
<div class="container-fluid">{{- "" -}}
<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 -%}
</div>{{- "" -}}
</div>
diff --git a/searx/templates/oscar/result_templates/files.html b/searx/templates/oscar/result_templates/files.html
index e2fec6f63..52798f7d8 100644
--- a/searx/templates/oscar/result_templates/files.html
+++ b/searx/templates/oscar/result_templates/files.html
@@ -21,7 +21,7 @@
{%- if result.img_src -%}
<div class="container-fluid">
<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 -%}
</div>
</div>
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index ede958450..d544a8cb8 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -36,7 +36,7 @@
{%- endmacro %}
{%- macro engine_time(engine_name) -%}
-<td class="{{ label }}" style="padding: 2px; width: 13rem;">{{- "" -}}
+<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">
@@ -70,13 +70,13 @@
{% set r = '' %}
{% endif %}
{% if checker_result or errors %}
-<td class="{{ label }}">{{- "" -}}
+<td class="{{ label }} column-reliability">{{- "" -}}
<a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
<span aria-labelledby="{{engine_name}}_reliability">
{{ icon('warning', 'The engine is not reliabled') }} {{ r -}}
</span>{{- "" -}}
</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 -%}
<p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
{%- endif -%}
@@ -257,7 +257,7 @@
{{ 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 />
{{ _('With that list, you can assess searx transparency.') }}<br />
</p>