diff --git a/src/Mod/Start/StartPage/StartPage.html b/src/Mod/Start/StartPage/StartPage.html
index 1856703514..f132d07770 100644
--- a/src/Mod/Start/StartPage/StartPage.html
+++ b/src/Mod/Start/StartPage/StartPage.html
@@ -12,7 +12,41 @@
text02
- defaultworkbenches
+
text03
@@ -24,11 +58,43 @@
text06
- defaultlinks
-
+
+
text09
- defaultexamples
+
customblocks
diff --git a/src/Mod/Start/StartPage/StartPage.js b/src/Mod/Start/StartPage/StartPage.js
index 5264f8f152..1db3c4e962 100644
--- a/src/Mod/Start/StartPage/StartPage.js
+++ b/src/Mod/Start/StartPage/StartPage.js
@@ -40,9 +40,10 @@ function show(theText) {
function checkVersion(data) {
vdiv = document.getElementById("versionbox");
- var cmajor = "vmajor";
- var cminor = "vminor";
- var cbuild = "vbuild";
+ console.log('test');
+ var cmajor = vmajor;
+ var cminor = vminor;
+ var cbuild = vbuild;
var amajor = data[0]['major'];
var aminor = data[0]['minor'];
var abuild = data[0]['build'];
@@ -54,14 +55,6 @@ function checkVersion(data) {
}
function load() {
- // load latest news
- ddiv = document.getElementById("news");
- ddiv.innerHTML = "Connecting...";
- var tobj=new JSONscriptRequest('https://api.github.com/repos/FreeCAD/FreeCAD/commits?callback=showTweets');
- tobj.buildScriptTag(); // Build the script tag
- tobj.addScriptTag(); // Execute (add) the script tag
- ddiv.innerHTML = "Downloading latest news...";
-
// load version
var script = document.createElement('script');
script.src = 'http://www.freecadweb.org/version.php?callback=checkVersion';
diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
index 5a2dfbf24a..6444a64e62 100644
--- a/src/Mod/Start/StartPage/StartPage.py
+++ b/src/Mod/Start/StartPage/StartPage.py
@@ -68,93 +68,6 @@ with open(js_filename, 'r') as f:
with open(css_filename, 'r') as f:
startpage_css = f.read()
-def getWebExamples():
- return """
- """
-
-def getExamples():
- return """
- """
-
-def getLinks():
- return """
- """
-
-def getWorkbenches():
- return """
- """
-
def getInfo(filename):
"returns available file information"
@@ -308,20 +221,62 @@ def setColors(html):
html = html.replace(k,str(v))
return html
-def replace_html(html):
+def insert_page_resources(html):
html = html.replace("startpage_js", startpage_js)
html = html.replace("startpage_css", startpage_css)
+ return html
+
+def replace_html_text(html):
html = html.replace("text01", text01)
html = html.replace("text02", text02)
html = html.replace("text03", text03)
html = html.replace("text05", text05)
html = html.replace("text06", text06)
+ html = html.replace("text07", text07)
+ html = html.replace("text08", text08)
html = html.replace("text09", text09)
+ html = html.replace("text10", text10)
+ html = html.replace("text11", text11)
+ html = html.replace("text12", text12)
+ html = html.replace("text13", text13)
html = html.replace("text17", text17)
html = html.replace("text18", text18)
+ html = html.replace("text19", text19)
+ html = html.replace("text20", text20)
+ html = html.replace("text21", text21)
+ html = html.replace("text22", text22)
+ html = html.replace("text23", text23)
+ html = html.replace("text24", text24)
+ html = html.replace("text25", text25)
+ html = html.replace("text26", text26)
+ html = html.replace("text27", text27)
+ html = html.replace("text28", text28)
+ html = html.replace("text29", text29)
+ html = html.replace("text37", text37)
+ html = html.replace("text38", text38)
+ html = html.replace("text39", text39)
+ html = html.replace("text40", text40)
+ html = html.replace("text43", text43)
+ html = html.replace("text45", text45)
+ html = html.replace("text46", text46)
+ html = html.replace("text47", text47)
+ html = html.replace("text48", text48)
+ html = html.replace("text49", text49)
+ html = html.replace("text50", text50)
+ html = html.replace("text51", text51)
+ html = html.replace("text52", text52)
+ html = html.replace("text53", text53)
+ html = html.replace("text54", text54)
+ html = html.replace("text55", text55)
+ html = html.replace("text56", text56)
+ html = html.replace("text57", text57)
+ html = html.replace("text60", text60)
+ html = html.replace("text61", text61)
+ html = html.replace("text62", text62)
+ html = html.replace("text64", text64)
return html
-def replace_js(html):
+def replace_js_text(html):
html = html.replace("vmajor", vmajor)
html = html.replace("vminor", vminor)
html = html.replace("vbuild", vbuild)
@@ -333,34 +288,23 @@ def replace_js(html):
def handle():
"returns the complete html startpage"
# add strings into files
- html = replace_html(startpage_html)
- html = replace_js(html)
+ html = insert_page_resources(startpage_html)
+ html = replace_js_text(html)
# add recent files
recentfiles = getRecentFiles()
html = html.replace("recentfiles",recentfiles)
-
- # add default workbenches
- html = html.replace("defaultworkbenches",getWorkbenches())
-
- # add default web links
- html = html.replace("defaultlinks",getLinks())
-
- # add default examples
- html = html.replace("defaultexamples",getExamples())
-
- # add web examples
- #html = html.replace("webexamples",getWebExamples())
-
+
# add custom blocks
html = html.replace("customblocks",getCustomBlocks())
+ html = replace_html_text(html)
# fetches system colors
html = setColors(html)
-
return html
def exportTestFile():
f = open(os.path.expanduser("~")+os.sep+"freecad-startpage.html","wb")
f.write(handle())
f.close()
+