]> git.0d.be Git - mandayejs.git/commitdiff
add project-wide satic files
authorFrédéric Péters <fpeters@entrouvert.com>
Sun, 22 Mar 2015 11:38:50 +0000 (12:38 +0100)
committerFrédéric Péters <fpeters@entrouvert.com>
Sun, 22 Mar 2015 11:38:50 +0000 (12:38 +0100)
mandayejs/settings.py
mandayejs/static/mandaye.css [new file with mode: 0644]
mandayejs/static/mandaye.js [new file with mode: 0644]

index b34ede8e24f669c401b9856c52ba04b7b702dd49..03069dfda55ef2fda420133eed2f1d52fa60f661 100644 (file)
@@ -80,4 +80,8 @@ USE_TZ = True
 # Static files (CSS, JavaScript, Images)
 # https://docs.djangoproject.com/en/1.7/howto/static-files/
 
-STATIC_URL = '/static/'
+STATIC_URL = '/_mandaye/static/'
+
+STATICFILES_DIRS = (
+    os.path.join(BASE_DIR, 'mandayejs', 'static'),
+)
diff --git a/mandayejs/static/mandaye.css b/mandayejs/static/mandaye.css
new file mode 100644 (file)
index 0000000..ce42b70
--- /dev/null
@@ -0,0 +1,5 @@
+#mandaye-js {
+  background: black;
+  color: white;
+  padding: 5px 0;
+}
diff --git a/mandayejs/static/mandaye.js b/mandayejs/static/mandaye.js
new file mode 100644 (file)
index 0000000..025f716
--- /dev/null
@@ -0,0 +1,2 @@
+$('head').append('<link rel="stylesheet" href="/_mandaye/static/mandaye.css" type="text/css" />');
+$('body').prepend('<div id="mandaye-js">Chargement en cours...</div>');