From 4954e56b69201463b23e9a140832d5ff56c9ebcb Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 15 May 2020 09:57:09 +0200 Subject: [PATCH 1/3] [fix] Makefile: node.env is a prerequisite of lessc and grunt Signed-off-by: Markus Heiser --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index abd0eddb8..863520788 100644 --- a/Makefile +++ b/Makefile @@ -136,29 +136,29 @@ quiet_cmd_grunt = GRUNT $2 cmd_grunt = PATH="$$(npm bin):$$PATH" \ grunt --gruntfile "$2" -themes.oscar: +themes.oscar: node.env $(Q)echo '[!] build oscar theme' $(call cmd,grunt,searx/static/themes/oscar/gruntfile.js) -themes.simple: +themes.simple: node.env $(Q)echo '[!] build simple theme' $(call cmd,grunt,searx/static/themes/simple/gruntfile.js) -themes.legacy: +themes.legacy: node.env $(Q)echo '[!] build legacy theme' $(call cmd,lessc,themes/legacy/less/style-rtl.less,themes/legacy/css/style-rtl.css) $(call cmd,lessc,themes/legacy/less/style.less,themes/legacy/css/style.css) -themes.courgette: +themes.courgette: node.env $(Q)echo '[!] build courgette theme' $(call cmd,lessc,themes/courgette/less/style.less,themes/courgette/css/style.css) $(call cmd,lessc,themes/courgette/less/style-rtl.less,themes/courgette/css/style-rtl.css) -themes.pixart: +themes.pixart: node.env $(Q)echo '[!] build pixart theme' $(call cmd,lessc,themes/pix-art/less/style.less,themes/pix-art/css/style.css) -themes.bootstrap: +themes.bootstrap: node.env $(call cmd,lessc,less/bootstrap/bootstrap.less,css/bootstrap.min.css) From ad208378bb78a35746db432011bcc08b4ffd708f Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 15 May 2020 10:16:49 +0200 Subject: [PATCH 2/3] [fix] oscar theme, remove inline style attributes (CSP compliants) Inline styles are blocked by default with Content Security Policy (CSP). Move the rest of inline styles to CSS and correct the HTML template of the oscar preference page. Signed-off-by: Markus Heiser --- .../oscar/less/logicodev/preferences.less | 12 +++++++ searx/templates/oscar/preferences.html | 32 +++++++++++-------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/searx/static/themes/oscar/less/logicodev/preferences.less b/searx/static/themes/oscar/less/logicodev/preferences.less index 9672d5011..82ce16310 100644 --- a/searx/static/themes/oscar/less/logicodev/preferences.less +++ b/searx/static/themes/oscar/less/logicodev/preferences.less @@ -1,3 +1,15 @@ .table > tbody > tr > td, .table > tbody > tr > th { vertical-align: middle !important; } + +.nav-tabs.nav-justified{ + margin-bottom: 20px; +} + +p { + margin: 10px 0; +} + +input.cursor-text { + margin: 10px 0; +} diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index b03929df3..5f6979590 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -9,7 +9,7 @@
-