Reorganize start WB
This commit is contained in:
committed by
Yorik van Havre
parent
a4375178ba
commit
ea2ed3440e
@@ -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 {
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
</div>
|
||||
<div id="column">
|
||||
<div class="block">
|
||||
<div id="files" class="block">
|
||||
<h2>text03</h2>
|
||||
recentfiles
|
||||
</div>
|
||||
<div id="newproject" class="half-block" style="float: left; display: inline-block; height: 145px;">
|
||||
<h2>text02</h2>
|
||||
<ul>
|
||||
<li><img src="images/blank.png">
|
||||
@@ -48,23 +52,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="block">
|
||||
<h2>text09</h2>
|
||||
<ul>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadSchenkel.py">text10</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadPartDesignExample.py">text11</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadDrawingExample.py">text12</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadRobotExample.py">text13</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadArchExample.py">text55</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadFemExample2D.py">text64</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadFemExample3D.py">text60</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="block">
|
||||
<h2>text03</h2>
|
||||
recentfiles
|
||||
</div>
|
||||
<div class="block">
|
||||
<div id="ontheweb" class="half-block" style="float: right; display: inline-block; height: 145px;">
|
||||
<h2>text06</h2>
|
||||
<ul>
|
||||
<li><img src="images/web.png">
|
||||
@@ -91,7 +79,23 @@
|
||||
onMouseOver="show('<p>text62</p>')"
|
||||
onMouseOut="show('')">text61</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="examples" class="half-block" style="float: left; display: inline-block;">
|
||||
<h2>text09</h2>
|
||||
<ul>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadSchenkel.py">text10</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadPartDesignExample.py">text11</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadDrawingExample.py">text12</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadRobotExample.py">text13</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadArchExample.py">text55</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadFemExample2D.py">text64</a></li>
|
||||
<li><img src="images/FreeCAD.png" style="width: 16px"> <a href="LoadFemExample3D.py">text60</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="commits" class="half-block" style="float: right; display: inline-block;">
|
||||
<h2>text05</h2>
|
||||
<div id="news">news feed</div>
|
||||
</div>
|
||||
customblocks
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 = ['<ul>'];
|
||||
for (var i = 0; i < 15; i++) {
|
||||
for (var i = 0; i < 5; i++) {
|
||||
html.push('<li><img src="images/web.png"> <a href="ext', data.data[i].commit.url, '" onMouseOver="showDescr(', i+1, ')" onMouseOut="showDescr()">', data.data[i].commit.message, '</a></li>');
|
||||
if ("message" in data.data[i].commit) {
|
||||
linkDescriptions.push(stripTags(data.data[i].commit.message)+'<br/>'+data.data[i].commit.author.name+'<br/>'+data.data[i].commit.author.date);
|
||||
@@ -91,6 +100,21 @@ function showTweets(data) {
|
||||
html.push('</ul>');
|
||||
html.push('<a href="exthttp://github.com/FreeCAD/FreeCAD/commits/master">text63<a/>');
|
||||
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) {
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user