From 8151585918a3d86b9dac5bef782581d13a14179f Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Thu, 1 Jan 2015 17:54:33 +0100 Subject: [PATCH] [fix] static file paths --- .travis.yml | 2 +- Makefile | 12 ++++++------ searx/static/themes/oscar/README.rst | 4 ++-- searx/static/themes/oscar/js/searx.min.js | Bin 5026 -> 5034 bytes .../oscar/js/searx_src/00_requirejs_config.js | 2 +- .../themes/oscar/js/searx_src/leaflet_map.js | 2 +- searx/tests/test_webapp.py | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5cc51e84b..751a0ca68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - npm install -g less grunt-cli - - ( cd searx/static/oscar;npm install ) + - ( cd searx/static/themes/oscar;npm install ) install: - "make" - pip install coveralls diff --git a/Makefile b/Makefile index f9882e5ac..7d40a8127 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ $(python): tests: .installed.cfg @bin/test - @grunt test --gruntfile searx/static/oscar/gruntfile.js + @grunt test --gruntfile searx/static/themes/oscar/gruntfile.js robot: .installed.cfg @bin/robot @@ -45,18 +45,18 @@ minimal: bin/buildout minimal.cfg setup.py bin/buildout -c minimal.cfg $(options) styles: - @lessc -x searx/static/default/less/style.less > searx/static/default/css/style.css - @lessc -x searx/static/oscar/less/bootstrap/bootstrap.less > searx/static/oscar/css/bootstrap.min.css - @lessc -x searx/static/oscar/less/oscar/oscar.less > searx/static/oscar/css/oscar.min.css + @lessc -x searx/static/themes/default/less/style.less > searx/static/themes/default/css/style.css + @lessc -x searx/static/themes/oscar/less/bootstrap/bootstrap.less > searx/static/themes/oscar/css/bootstrap.min.css + @lessc -x searx/static/themes/oscar/less/oscar/oscar.less > searx/static/themes/oscar/css/oscar.min.css grunt: - @grunt --gruntfile searx/static/oscar/gruntfile.js + @grunt --gruntfile searx/static/themes/oscar/gruntfile.js locales: @pybabel compile -d searx/translations clean: @rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \ - searx.egg-info lib include .coverage coverage searx/static/default/css/*.css + searx.egg-info lib include .coverage coverage searx/static/themes/default/css/*.css .PHONY: all tests robot flake8 coverage production minimal styles locales clean diff --git a/searx/static/themes/oscar/README.rst b/searx/static/themes/oscar/README.rst index 7a1800add..e7daa8719 100644 --- a/searx/static/themes/oscar/README.rst +++ b/searx/static/themes/oscar/README.rst @@ -1,14 +1,14 @@ install dependencies ~~~~~~~~~~~~~~~~~~~~ -run this command in the directory ``searx/static/oscar`` +run this command in the directory ``searx/static/themes/oscar`` ``npm install`` compile sources ~~~~~~~~~~~~~~~ -run this command in the directory ``searx/static/oscar`` +run this command in the directory ``searx/static/themes/oscar`` ``grunt`` diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js index 2fba710630d38cc0c3eaf502750699834ac52550..34a44f51bc451975fb9cbd824d6db3fa9cd9a9bd 100644 GIT binary patch delta 19 acmZ3azDj*UK3hpfYHn)r#yk^YMlJwKz6O^7 delta 10 RcmZ3bzDRvS{>Cz6VE`Cd1P1^B diff --git a/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js b/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js index 99ec4b585..1aa434902 100644 --- a/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js +++ b/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js @@ -16,7 +16,7 @@ */ requirejs.config({ - baseUrl: './static/oscar/js', + baseUrl: './static/themes/oscar/js', paths: { app: '../app' } diff --git a/searx/static/themes/oscar/js/searx_src/leaflet_map.js b/searx/static/themes/oscar/js/searx_src/leaflet_map.js index b5112ef5e..cbcbe157e 100644 --- a/searx/static/themes/oscar/js/searx_src/leaflet_map.js +++ b/searx/static/themes/oscar/js/searx_src/leaflet_map.js @@ -116,7 +116,7 @@ $(document).ready(function(){ // TODO hack // change default imagePath - L.Icon.Default.imagePath = "./static/oscar/img/map"; + L.Icon.Default.imagePath = "./static/themes/oscar/img/map"; // init map var map = L.map(leaflet_target); diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py index 75ff585cc..a979e786d 100644 --- a/searx/tests/test_webapp.py +++ b/searx/tests/test_webapp.py @@ -49,7 +49,7 @@ class ViewsTestCase(SearxTestCase): ) result = self.app.post('/', data={'q': 'test'}) self.assertIn( - '

youtubeSecond Test

', # noqa + '

youtubeSecond Test

', # noqa result.data ) self.assertIn(