Browse Source

[fix] make oscar theme more CSP compliant - col-checkbox

Add col-checkbox in::

    searx/static/themes/oscar/src/less/preferences.less

Replaced style in file::

    searx/templates/oscar/preferences.html

Reported-by: https://github.com/searxng/searxng/issues/57
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 3 years ago
parent
commit
222031e975

+ 1 - 0
searx/static/themes/oscar/src/less/logicodev-dark/oscar.less

@@ -3,6 +3,7 @@
 @import "../../../../__common__/less/stats.less";
 @import "../../../../__common__/less/result_templates.less";
 @import "../../less/result_templates.less";
+@import "../../less/preferences.less";
 @import "../../generated/pygments-logicodev.less";
 
 @stacked-bar-chart: rgb(213, 216, 215, 1);

+ 1 - 0
searx/static/themes/oscar/src/less/logicodev/oscar.less

@@ -3,6 +3,7 @@
 @import "../../../../__common__/less/stats.less";
 @import "../../../../__common__/less/result_templates.less";
 @import "../../less/result_templates.less";
+@import "../../less/preferences.less";
 @import "../../generated/pygments-logicodev.less";
 
 @import "navbar.less";

+ 1 - 0
searx/static/themes/oscar/src/less/pointhi/oscar.less

@@ -3,6 +3,7 @@
 @import "../../../../__common__/less/stats.less";
 @import "../../../../__common__/less/result_templates.less";
 @import "../../less/result_templates.less";
+@import "../../less/preferences.less";
 @import "../../generated/pygments-pointhi.less";
 
 @import "footer.less";

+ 3 - 0
searx/static/themes/oscar/src/less/preferences.less

@@ -0,0 +1,3 @@
+.col-checkbox {
+    width: 10rem;
+}

+ 5 - 5
searx/templates/oscar/preferences.html

@@ -318,12 +318,12 @@
                                     <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-checkbox">{{ _("Selected language") }}</th>
+                                    <th scope="col" class="col-checkbox">{{ _("SafeSearch") }}</th>
+                                    <th scope="col" class="col-checkbox">{{ _("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-checkbox text-right">{{ _("Max time") }}</th>
+                                    <th scope="col" class="col-checkbox text-right">{{ _("Reliablity") }}</th>
                                     {% else %}
                                     <th scope="col">{{ _("Reliablity") }}</th>
                                     <th scope="col">{{ _("Max time") }}</th>