浏览代码

[splash] embed svg of splash

version-14
Anand Doshi 12 年前
父节点
当前提交
b78b376bc5
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. +1
    -1
      public/html/app.html
  2. +9
    -1
      webnotes/utils/bundlejs.py

+ 1
- 1
public/html/app.html 查看文件

@@ -9,7 +9,7 @@
<link type="text/css" rel="stylesheet" href="app/css/splash.css"> <link type="text/css" rel="stylesheet" href="app/css/splash.css">
</head> </head>
<body> <body>
<div class="splash"></div>
<div class="splash">%(splash)s</div>
<header></header> <header></header>
<div id="body_div"> <div id="body_div">
</div> </div>


+ 9
- 1
webnotes/utils/bundlejs.py 查看文件

@@ -122,9 +122,17 @@ class Bundle:
if os.path.exists("public/app.html"): if os.path.exists("public/app.html"):
os.remove("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: with open('lib/public/html/app.html', 'r') as app_html:
data = app_html.read() 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: with open('public/app.html', 'w') as new_app_html:
new_app_html.write(data) new_app_html.write(data)


正在加载...
取消
保存