Start: Updated startpage - fixed some links + restored commits feed
This commit is contained in:
parent
5bdbe2db61
commit
6f636e0ae9
BIN
src/Mod/Start/StartPage/FreeCAD.png
Executable file → Normal file
BIN
src/Mod/Start/StartPage/FreeCAD.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -51,7 +51,7 @@ text01 = translate("StartPage","FreeCAD Start Center")
|
|||
text02 = translate("StartPage","Start a new project")
|
||||
text03 = translate("StartPage","Recent Files")
|
||||
text04 = translate("StartPage","Latest videos")
|
||||
text05 = translate("StartPage","Latest news")
|
||||
text05 = translate("StartPage","Latest commits")
|
||||
text06 = translate("StartPage","On the web")
|
||||
text07 = translate("StartPage","This is the FreeCAD Homepage. Here you will be able to find a lot of information about FreeCAD, including tutorials, examples and user documentation.")
|
||||
text08 = translate("StartPage","FreeCAD Homepage")
|
||||
|
@ -107,6 +107,9 @@ text57 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=P
|
|||
text58 = translate("StartPage","Your version of FreeCAD is up to date.")
|
||||
text59 = translate("StartPage","There is a new release of FreeCAD available.")
|
||||
text60 = translate("StartPage","Load an FEM example analysis")
|
||||
text61 = translate("StartPage","Obtain a development version")
|
||||
text62 = translate("StartPage","<b>Development versions</b> are made available by community members from time to time and usually contain the latest changes, but are more likely to contain bugs.")
|
||||
text63 = translate("StartPage","See all commits")
|
||||
|
||||
# get FreeCAD version
|
||||
|
||||
|
@ -173,9 +176,9 @@ page = """
|
|||
var aminor = data[0]['minor'];
|
||||
var abuild = data[0]['build'];
|
||||
if (cmajor >= amajor && cminor >= aminor && cbuild >= abuild) {
|
||||
vdiv.innerHTML=" """ + text58 + """ ";
|
||||
vdiv.innerHTML=" """ + text58 + """: """ + vmajor + """.""" + vminor + """.""" + vbuild + """";
|
||||
} else {
|
||||
vdiv.innerHTML="<a href=exthttp://www.freecadweb.org> """ + text59 + """ </a>";
|
||||
vdiv.innerHTML="<a href=exthttp://github.com/FreeCAD/FreeCAD/releases/latest> """ + text59 + """:"+amajor+"."+aminor+"."+abuild+"</a>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +186,7 @@ page = """
|
|||
// load latest news
|
||||
ddiv = document.getElementById("news");
|
||||
ddiv.innerHTML = "Connecting...";
|
||||
var tobj=new JSONscriptRequest('http://pipes.yahoo.com/pipes/pipe.run?_id=da8b612e97a6bb4588b1ce27db30efd9&_render=json&_callback=showTweets');
|
||||
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...";
|
||||
|
@ -213,21 +216,16 @@ page = """
|
|||
ddiv.innerHTML = "Received";
|
||||
var html = ['<ul>'];
|
||||
for (var i = 0; i < 15; i++) {
|
||||
html.push('<li><img src="web.png"> <a href="ext', data.value.items[i].link, '" onMouseOver="showDescr(', i+1, ')" onMouseOut="showDescr()">', data.value.items[i].title, '</a></li>');
|
||||
if ("description" in data.value.items[i]) {
|
||||
linkDescriptions.push(stripTags(data.value.items[i].description));
|
||||
} else if ("content" in data.value.items[i]) {
|
||||
if ("content" in data.value.items[i].content) {
|
||||
linkDescriptions.push(data.value.items[i].content.content);
|
||||
} else {
|
||||
linkDescriptions.push(data.value.items[i].content);
|
||||
}
|
||||
html.push('<li><img src="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);
|
||||
} else {
|
||||
linkDescriptions.push("");
|
||||
}
|
||||
|
||||
}
|
||||
html.push('</ul>');
|
||||
html.push('<a href="exthttp://github.com/FreeCAD/FreeCAD/commits/master">""" + text63 + """<a/>');
|
||||
ddiv.innerHTML = html.join('');
|
||||
}
|
||||
|
||||
|
@ -289,6 +287,7 @@ page = """
|
|||
letter-spacing: 2px;
|
||||
padding: 20px 0 0 80px;
|
||||
align: bottom;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
h2 {
|
||||
|
@ -444,23 +443,28 @@ def getLinks():
|
|||
<li><img src="web.png">
|
||||
<a onMouseover="show('<p>""" + text07 + """</p>')"
|
||||
onMouseout="show('')"
|
||||
href="http://www.freecadweb.org/">""" + text08 + """</a></li>
|
||||
exthref="http://www.freecadweb.org/">""" + text08 + """</a></li>
|
||||
<li><img src="web.png">
|
||||
<a onMouseover="show('<p>""" + text45 + """</p>')"
|
||||
onMouseout="show('')"
|
||||
href=""" + text38 + """>""" + text37 + """</a></li>
|
||||
href=ext""" + text38 + """>""" + text37 + """</a></li>
|
||||
<li><img src="web.png">
|
||||
<a onMouseover="show('<p>""" + text46 + """</p>')"
|
||||
onMouseout="show('')"
|
||||
href=""" + text56 + """>""" + text39 + """</a></li>
|
||||
href=ext""" + text56 + """>""" + text39 + """</a></li>
|
||||
<li><img src="web.png">
|
||||
<a onMouseover="show('<p>""" + text47 + """</p>')"
|
||||
onMouseout="show('')"
|
||||
href=""" + text57 + """>""" + text40 + """</a></li>
|
||||
href=ext""" + text57 + """>""" + text40 + """</a></li>
|
||||
<li><img src="web.png">
|
||||
<a onMouseover="show('<p>""" + text48 + """</p>')"
|
||||
onMouseout="show('')"
|
||||
href="exthttp://freecad-tutorial.blogspot.com/">""" + text43 + """</a></li>
|
||||
<li><img src="web.png">
|
||||
<a href="exthttp://github.com/FreeCAD/FreeCAD/releases"
|
||||
onMouseOver="show('<p>""" + text62 + """</p>')"
|
||||
onMouseOut="show('')">""" + text61 + """</a></li>
|
||||
|
||||
</ul>"""
|
||||
|
||||
def getWorkbenches():
|
||||
|
|
Loading…
Reference in New Issue
Block a user