Browse Source

[fix] static file paths

Adam Tauber 10 years ago
parent
commit
8151585918

+ 1 - 1
.travis.yml

@@ -5,7 +5,7 @@ before_install:
   - "export DISPLAY=:99.0"
   - "export DISPLAY=:99.0"
   - "sh -e /etc/init.d/xvfb start"
   - "sh -e /etc/init.d/xvfb start"
   - npm install -g less grunt-cli
   - npm install -g less grunt-cli
-  - ( cd searx/static/oscar;npm install )
+  - ( cd searx/static/themes/oscar;npm install )
 install:
 install:
   - "make"
   - "make"
   - pip install coveralls
   - pip install coveralls

+ 6 - 6
Makefile

@@ -20,7 +20,7 @@ $(python):
 
 
 tests: .installed.cfg
 tests: .installed.cfg
 	@bin/test
 	@bin/test
-	@grunt test --gruntfile searx/static/oscar/gruntfile.js
+	@grunt test --gruntfile searx/static/themes/oscar/gruntfile.js
 
 
 robot: .installed.cfg
 robot: .installed.cfg
 	@bin/robot
 	@bin/robot
@@ -45,18 +45,18 @@ minimal: bin/buildout minimal.cfg setup.py
 	bin/buildout -c minimal.cfg $(options)
 	bin/buildout -c minimal.cfg $(options)
 
 
 styles:
 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:
-	@grunt --gruntfile searx/static/oscar/gruntfile.js
+	@grunt --gruntfile searx/static/themes/oscar/gruntfile.js
 
 
 locales:
 locales:
 	@pybabel compile -d searx/translations
 	@pybabel compile -d searx/translations
 
 
 clean:
 clean:
 	@rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \
 	@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
 .PHONY: all tests robot flake8 coverage production minimal styles locales clean

+ 2 - 2
searx/static/themes/oscar/README.rst

@@ -1,14 +1,14 @@
 install dependencies
 install dependencies
 ~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~
 
 
-run this command in the directory ``searx/static/oscar``
+run this command in the directory ``searx/static/themes/oscar``
 
 
 ``npm install``
 ``npm install``
 
 
 compile sources
 compile sources
 ~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~
 
 
-run this command in the directory ``searx/static/oscar``
+run this command in the directory ``searx/static/themes/oscar``
 
 
 ``grunt``
 ``grunt``
 
 

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/js/searx.min.js


+ 1 - 1
searx/static/themes/oscar/js/searx_src/00_requirejs_config.js

@@ -16,7 +16,7 @@
  */
  */
 
 
 requirejs.config({
 requirejs.config({
-    baseUrl: './static/oscar/js',
+    baseUrl: './static/themes/oscar/js',
     paths: {
     paths: {
         app: '../app'
         app: '../app'
     }
     }

+ 1 - 1
searx/static/themes/oscar/js/searx_src/leaflet_map.js

@@ -116,7 +116,7 @@ $(document).ready(function(){
 
 
             // TODO hack
             // TODO hack
             // change default imagePath
             // change default imagePath
-            L.Icon.Default.imagePath = 	"./static/oscar/img/map";
+            L.Icon.Default.imagePath = 	"./static/themes/oscar/img/map";
 
 
             // init map
             // init map
             var map = L.map(leaflet_target);
             var map = L.map(leaflet_target);

+ 1 - 1
searx/tests/test_webapp.py

@@ -49,7 +49,7 @@ class ViewsTestCase(SearxTestCase):
         )
         )
         result = self.app.post('/', data={'q': 'test'})
         result = self.app.post('/', data={'q': 'test'})
         self.assertIn(
         self.assertIn(
-            '<h3 class="result_title"><img width="14" height="14" class="favicon" src="static/default/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz">Second <span class="highlight">Test</span></a></h3>',  # noqa
+            '<h3 class="result_title"><img width="14" height="14" class="favicon" src="static/themes/default/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz">Second <span class="highlight">Test</span></a></h3>',  # noqa
             result.data
             result.data
         )
         )
         self.assertIn(
         self.assertIn(

Some files were not shown because too many files changed in this diff