From 6b80c57a3c04d6be37ae3c880f7e269fc362b107 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Wed, 16 Jun 2021 09:28:45 +0200 Subject: [PATCH] [mod] simple theme: move source files to the src directory --- searx/static/themes/simple/gruntfile.js | 16 ++++++++-------- .../simple/js/{searx_src => }/autocomplete.js | 0 .../{js/searx_head => src/js/head}/00_init.js | 2 +- .../js/main}/00_searx_toolkit.js | 0 .../searx_src => src/js/main}/searx_keyboard.js | 0 .../searx_src => src/js/main}/searx_mapresult.js | 0 .../searx_src => src/js/main}/searx_results.js | 0 .../searx_src => src/js/main}/searx_search.js | 0 .../simple/{ => src}/less/autocomplete.less | 0 .../themes/simple/{ => src}/less/code.less | 0 .../simple/{ => src}/less/definitions.less | 0 .../themes/simple/{ => src}/less/index.less | 0 .../static/themes/simple/{ => src}/less/ion.less | 0 .../themes/simple/{ => src}/less/mixins.less | 0 .../themes/simple/{ => src}/less/normalize.less | 0 .../simple/{ => src}/less/preferences.less | 0 .../themes/simple/{ => src}/less/pygments.less | 0 .../themes/simple/{ => src}/less/search.less | 0 .../themes/simple/{ => src}/less/style-rtl.less | 0 .../themes/simple/{ => src}/less/style.less | 0 .../themes/simple/{ => src}/less/toolkit.less | 0 .../simple/{ => src}/less/toolkit_loader.less | 0 22 files changed, 9 insertions(+), 9 deletions(-) rename searx/static/themes/simple/js/{searx_src => }/autocomplete.js (100%) rename searx/static/themes/simple/{js/searx_head => src/js/head}/00_init.js (98%) rename searx/static/themes/simple/{js/searx_src => src/js/main}/00_searx_toolkit.js (100%) rename searx/static/themes/simple/{js/searx_src => src/js/main}/searx_keyboard.js (100%) rename searx/static/themes/simple/{js/searx_src => src/js/main}/searx_mapresult.js (100%) rename searx/static/themes/simple/{js/searx_src => src/js/main}/searx_results.js (100%) rename searx/static/themes/simple/{js/searx_src => src/js/main}/searx_search.js (100%) rename searx/static/themes/simple/{ => src}/less/autocomplete.less (100%) rename searx/static/themes/simple/{ => src}/less/code.less (100%) rename searx/static/themes/simple/{ => src}/less/definitions.less (100%) rename searx/static/themes/simple/{ => src}/less/index.less (100%) rename searx/static/themes/simple/{ => src}/less/ion.less (100%) rename searx/static/themes/simple/{ => src}/less/mixins.less (100%) rename searx/static/themes/simple/{ => src}/less/normalize.less (100%) rename searx/static/themes/simple/{ => src}/less/preferences.less (100%) rename searx/static/themes/simple/{ => src}/less/pygments.less (100%) rename searx/static/themes/simple/{ => src}/less/search.less (100%) rename searx/static/themes/simple/{ => src}/less/style-rtl.less (100%) rename searx/static/themes/simple/{ => src}/less/style.less (100%) rename searx/static/themes/simple/{ => src}/less/toolkit.less (100%) rename searx/static/themes/simple/{ => src}/less/toolkit_loader.less (100%) diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 4c14116b2..e1b44aa72 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -6,12 +6,12 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), watch: { scripts: { - files: ['<%= jshint.files %>', 'less/*.less'], + files: ['src/**'], tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production'] } }, jshint: { - files: ['js/searx_src/*.js', 'js/searx_header/*.js', '../__common__/js/*.js'], + files: ['src/js/main/*.js', 'src/js/head/*.js', '../__common__/js/*.js'], options: { reporterOutput: "", proto: true, @@ -29,8 +29,8 @@ module.exports = function(grunt) { separator: ';' }, files: { - 'js/searx.head.js': ['js/searx_head/*.js'], - 'js/searx.js': ['js/searx_src/*.js', '../__common__/js/*.js'] + 'js/searx.head.js': ['src/js/head/*.js'], + 'js/searx.js': ['src/js/main/*.js', '../__common__/js/*.js', 'js/autocomplete.js'] } } }, @@ -60,8 +60,8 @@ module.exports = function(grunt) { banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, files: { - "css/searx.css": "less/style.less", - "css/searx-rtl.css": "less/style-rtl.less" + "css/searx.css": "src/less/style.less", + "css/searx-rtl.css": "src/less/style-rtl.less" } }, production: { @@ -77,8 +77,8 @@ module.exports = function(grunt) { banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, files: { - "css/searx.min.css": "less/style.less", - "css/searx-rtl.min.css": "less/style-rtl.less" + "css/searx.min.css": "src/less/style.less", + "css/searx-rtl.min.css": "src/less/style-rtl.less" } }, }, diff --git a/searx/static/themes/simple/js/searx_src/autocomplete.js b/searx/static/themes/simple/js/autocomplete.js similarity index 100% rename from searx/static/themes/simple/js/searx_src/autocomplete.js rename to searx/static/themes/simple/js/autocomplete.js diff --git a/searx/static/themes/simple/js/searx_head/00_init.js b/searx/static/themes/simple/src/js/head/00_init.js similarity index 98% rename from searx/static/themes/simple/js/searx_head/00_init.js rename to searx/static/themes/simple/src/js/head/00_init.js index e6964400b..be7560451 100644 --- a/searx/static/themes/simple/js/searx_head/00_init.js +++ b/searx/static/themes/simple/src/js/head/00_init.js @@ -33,7 +33,7 @@ infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true', static_path: script.getAttribute('data-static-path'), translations: JSON.parse(script.getAttribute('data-translations')), - } + }; // update the css d.getElementsByTagName("html")[0].className = (w.searx.touch)?"js touch":"js"; diff --git a/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js b/searx/static/themes/simple/src/js/main/00_searx_toolkit.js similarity index 100% rename from searx/static/themes/simple/js/searx_src/00_searx_toolkit.js rename to searx/static/themes/simple/src/js/main/00_searx_toolkit.js diff --git a/searx/static/themes/simple/js/searx_src/searx_keyboard.js b/searx/static/themes/simple/src/js/main/searx_keyboard.js similarity index 100% rename from searx/static/themes/simple/js/searx_src/searx_keyboard.js rename to searx/static/themes/simple/src/js/main/searx_keyboard.js diff --git a/searx/static/themes/simple/js/searx_src/searx_mapresult.js b/searx/static/themes/simple/src/js/main/searx_mapresult.js similarity index 100% rename from searx/static/themes/simple/js/searx_src/searx_mapresult.js rename to searx/static/themes/simple/src/js/main/searx_mapresult.js diff --git a/searx/static/themes/simple/js/searx_src/searx_results.js b/searx/static/themes/simple/src/js/main/searx_results.js similarity index 100% rename from searx/static/themes/simple/js/searx_src/searx_results.js rename to searx/static/themes/simple/src/js/main/searx_results.js diff --git a/searx/static/themes/simple/js/searx_src/searx_search.js b/searx/static/themes/simple/src/js/main/searx_search.js similarity index 100% rename from searx/static/themes/simple/js/searx_src/searx_search.js rename to searx/static/themes/simple/src/js/main/searx_search.js diff --git a/searx/static/themes/simple/less/autocomplete.less b/searx/static/themes/simple/src/less/autocomplete.less similarity index 100% rename from searx/static/themes/simple/less/autocomplete.less rename to searx/static/themes/simple/src/less/autocomplete.less diff --git a/searx/static/themes/simple/less/code.less b/searx/static/themes/simple/src/less/code.less similarity index 100% rename from searx/static/themes/simple/less/code.less rename to searx/static/themes/simple/src/less/code.less diff --git a/searx/static/themes/simple/less/definitions.less b/searx/static/themes/simple/src/less/definitions.less similarity index 100% rename from searx/static/themes/simple/less/definitions.less rename to searx/static/themes/simple/src/less/definitions.less diff --git a/searx/static/themes/simple/less/index.less b/searx/static/themes/simple/src/less/index.less similarity index 100% rename from searx/static/themes/simple/less/index.less rename to searx/static/themes/simple/src/less/index.less diff --git a/searx/static/themes/simple/less/ion.less b/searx/static/themes/simple/src/less/ion.less similarity index 100% rename from searx/static/themes/simple/less/ion.less rename to searx/static/themes/simple/src/less/ion.less diff --git a/searx/static/themes/simple/less/mixins.less b/searx/static/themes/simple/src/less/mixins.less similarity index 100% rename from searx/static/themes/simple/less/mixins.less rename to searx/static/themes/simple/src/less/mixins.less diff --git a/searx/static/themes/simple/less/normalize.less b/searx/static/themes/simple/src/less/normalize.less similarity index 100% rename from searx/static/themes/simple/less/normalize.less rename to searx/static/themes/simple/src/less/normalize.less diff --git a/searx/static/themes/simple/less/preferences.less b/searx/static/themes/simple/src/less/preferences.less similarity index 100% rename from searx/static/themes/simple/less/preferences.less rename to searx/static/themes/simple/src/less/preferences.less diff --git a/searx/static/themes/simple/less/pygments.less b/searx/static/themes/simple/src/less/pygments.less similarity index 100% rename from searx/static/themes/simple/less/pygments.less rename to searx/static/themes/simple/src/less/pygments.less diff --git a/searx/static/themes/simple/less/search.less b/searx/static/themes/simple/src/less/search.less similarity index 100% rename from searx/static/themes/simple/less/search.less rename to searx/static/themes/simple/src/less/search.less diff --git a/searx/static/themes/simple/less/style-rtl.less b/searx/static/themes/simple/src/less/style-rtl.less similarity index 100% rename from searx/static/themes/simple/less/style-rtl.less rename to searx/static/themes/simple/src/less/style-rtl.less diff --git a/searx/static/themes/simple/less/style.less b/searx/static/themes/simple/src/less/style.less similarity index 100% rename from searx/static/themes/simple/less/style.less rename to searx/static/themes/simple/src/less/style.less diff --git a/searx/static/themes/simple/less/toolkit.less b/searx/static/themes/simple/src/less/toolkit.less similarity index 100% rename from searx/static/themes/simple/less/toolkit.less rename to searx/static/themes/simple/src/less/toolkit.less diff --git a/searx/static/themes/simple/less/toolkit_loader.less b/searx/static/themes/simple/src/less/toolkit_loader.less similarity index 100% rename from searx/static/themes/simple/less/toolkit_loader.less rename to searx/static/themes/simple/src/less/toolkit_loader.less