diff --git a/src/Mod/Start/StartPage/StartPage.css b/src/Mod/Start/StartPage/StartPage.css index a091679aec..3faaac9ebb 100644 --- a/src/Mod/Start/StartPage/StartPage.css +++ b/src/Mod/Start/StartPage/StartPage.css @@ -52,12 +52,22 @@ ul { } .block { - background: #windowcolor; + background: #windowcolor !important; border-radius: 5px; padding: 8px; margin-bottom: 10px; color: #windowtextcolor; width: auto; + clear: left; +} + +.half-block { + background: #windowcolor !important; + border-radius: 5px; + padding: 8px; + margin-bottom: 10px; + color: #windowtextcolor; + width: 47% !important; } .options { diff --git a/src/Mod/Start/StartPage/StartPage.html b/src/Mod/Start/StartPage/StartPage.html index f1a336ba9f..0a5f9bbd0d 100644 --- a/src/Mod/Start/StartPage/StartPage.html +++ b/src/Mod/Start/StartPage/StartPage.html @@ -10,7 +10,11 @@  
-
+
+

text03

+ recentfiles +
+

text02

  •   @@ -48,23 +52,7 @@
-
-

text09

- -
-
-

text03

- recentfiles -
-
+

text06

  •   @@ -91,7 +79,23 @@ onMouseOver="show('

    text62

    ')" onMouseOut="show('')">text61
-
+
+
+

text09

+ +
+
+

text05

+
news feed
+
customblocks
diff --git a/src/Mod/Start/StartPage/StartPage.js b/src/Mod/Start/StartPage/StartPage.js index 1db3c4e962..1d547c2fac 100644 --- a/src/Mod/Start/StartPage/StartPage.js +++ b/src/Mod/Start/StartPage/StartPage.js @@ -55,10 +55,19 @@ 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'; document.body.appendChild(script); + } function stripTags(text) { @@ -79,7 +88,7 @@ function showTweets(data) { ddiv = document.getElementById('news'); ddiv.innerHTML = "Received"; var html = [''); html.push('text63'); ddiv.innerHTML = html.join(''); + var commits = document.getElementById("commits"); + var examples = document.getElementById("examples"); + var files = document.getElementById("files"); + var description = document.getElementById("description"); + + var commitsHeight = commits.offsetHeight; + var examplesHeight = examples.offsetHeight; + var filesHeight = files.offsetHeight; + + var biggerHeight = commitsHeight > examplesHeight ? commitsHeight : examplesHeight; + + var totalHeight = biggerHeight + filesHeight + 145 + 36; + commits.style.height = biggerHeight + 'px'; + examples.style.height = biggerHeight + 'px'; + description.style.height = totalHeight + 'px'; } function showDescr(d) { diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 0f30a2705c..b8b01292fa 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -301,6 +301,9 @@ def handle(): html = replace_html_text(html) # fetches system colors html = setColors(html) + f = open(os.path.expanduser("~")+os.sep+"freecad-startpage.html","wb") + f.write(html) + f.close() return html def exportTestFile():