diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index d4af12e65..d11ee6822 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -23,6 +23,41 @@ module.exports = function(grunt) { } } }, + copy: { + js: { + expand: true, + cwd: './node_modules', + dest: './js/', + flatten: true, + filter: 'isFile', + timestamp: true, + src: [ + './leaflet/dist/leaflet.js', + ] + }, + css: { + expand: true, + cwd: './node_modules', + dest: './css/', + flatten: true, + filter: 'isFile', + timestamp: true, + src: [ + './leaflet/dist/leaflet.css', + ] + }, + leaflet_images: { + expand: true, + cwd: './node_modules', + dest: './css/images/', + flatten: true, + filter: 'isFile', + timestamp: true, + src: [ + './leaflet/dist/images/*.png', + ] + }, + }, concat: { head_and_body: { options: { @@ -149,6 +184,7 @@ module.exports = function(grunt) { }); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-concat'); @@ -158,5 +194,5 @@ module.exports = function(grunt) { grunt.registerTask('test', ['jshint']); - grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less:development', 'less:production']); + grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']); }; diff --git a/searx/static/themes/simple/leaflet/images/layers-2x.png b/searx/static/themes/simple/leaflet/images/layers-2x.png deleted file mode 100644 index 200c333dc..000000000 Binary files a/searx/static/themes/simple/leaflet/images/layers-2x.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/layers.png b/searx/static/themes/simple/leaflet/images/layers.png deleted file mode 100644 index 1a72e5784..000000000 Binary files a/searx/static/themes/simple/leaflet/images/layers.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png deleted file mode 100644 index 7446bb031..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png deleted file mode 100644 index ecd67736f..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png deleted file mode 100644 index 1d2e197c6..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x.png deleted file mode 100644 index 88f9e5018..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-2x.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-green.png b/searx/static/themes/simple/leaflet/images/marker-icon-green.png deleted file mode 100644 index f48ef41df..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-green.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-orange.png b/searx/static/themes/simple/leaflet/images/marker-icon-orange.png deleted file mode 100644 index d0d22205c..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-orange.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-red.png b/searx/static/themes/simple/leaflet/images/marker-icon-red.png deleted file mode 100644 index 7a92b9e04..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon-red.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-icon.png b/searx/static/themes/simple/leaflet/images/marker-icon.png deleted file mode 100644 index 950edf246..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-icon.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/images/marker-shadow.png b/searx/static/themes/simple/leaflet/images/marker-shadow.png deleted file mode 100644 index 9fd297953..000000000 Binary files a/searx/static/themes/simple/leaflet/images/marker-shadow.png and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/leaflet.css b/searx/static/themes/simple/leaflet/leaflet.css deleted file mode 100644 index d1b47a125..000000000 Binary files a/searx/static/themes/simple/leaflet/leaflet.css and /dev/null differ diff --git a/searx/static/themes/simple/leaflet/leaflet.js b/searx/static/themes/simple/leaflet/leaflet.js deleted file mode 100644 index 02ae624a7..000000000 Binary files a/searx/static/themes/simple/leaflet/leaflet.js and /dev/null differ diff --git a/searx/static/themes/simple/src/js/main/searx_mapresult.js b/searx/static/themes/simple/src/js/main/searx_mapresult.js index 2ccdbd1c7..7b3982c11 100644 --- a/searx/static/themes/simple/src/js/main/searx_mapresult.js +++ b/searx/static/themes/simple/src/js/main/searx_mapresult.js @@ -31,8 +31,8 @@ var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox); var map_geojson = JSON.parse(this.dataset.mapGeojson); - searx.loadStyle('leaflet/leaflet.css'); - searx.loadScript('leaflet/leaflet.js', function() { + searx.loadStyle('css/leaflet.css'); + searx.loadScript('js/leaflet.js', function() { var map_bounds = null; if(map_boundingbox) { var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);