From b78b376bc5b70fdbb5a77529bb437af127df7ba0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 5 Jun 2013 12:12:46 +0530 Subject: [PATCH] [splash] embed svg of splash --- public/html/app.html | 2 +- webnotes/utils/bundlejs.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/html/app.html b/public/html/app.html index 573dbb0e09..ee7154c1ab 100644 --- a/public/html/app.html +++ b/public/html/app.html @@ -9,7 +9,7 @@ -
+
%(splash)s
diff --git a/webnotes/utils/bundlejs.py b/webnotes/utils/bundlejs.py index c98221b21c..3a1af7b48e 100644 --- a/webnotes/utils/bundlejs.py +++ b/webnotes/utils/bundlejs.py @@ -122,9 +122,17 @@ class Bundle: if os.path.exists("public/app.html"): os.remove("public/app.html") + splash = "" + if os.path.exists("public/app/images/splash.svg"): + with open("public/app/images/splash.svg") as splash_file: + splash = splash_file.read() + with open('lib/public/html/app.html', 'r') as app_html: data = app_html.read() - data = data % {"_version_number": webnotes.generate_hash()} + data = data % { + "_version_number": webnotes.generate_hash(), + "splash": splash + } with open('public/app.html', 'w') as new_app_html: new_app_html.write(data)