<!DOCTYPE html>
<html>
<head>
<meta name="author" content="Carsten Pfeffer">
<meta name="copyight" content="(c)2012 Carsten Pfeffer">
<meta name="language" content="en">
<meta name="keywords" content="Python, learning Python, emscripten, cpython, codemirror, empythoned, python training, web ide">
<meta name="description" content="Browser side Python training suite">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title> Think Python </title>
<link rel="stylesheet" href="main.css" type="text/css">
<link rel="stylesheet" href="index.css" type="text/css">
<script src="jquery.js"></script>
<script src="main.js"></script>
<script language="JavaScript">
<!--
button_img = new Image();
button_hover = new Image();
button_img.src = "img/button.svg";
button_hover.src = "img/button_hover.svg";
function goToTraining()
{
showDialog();
}
function goToIDE()
{
window.location = "ide.html";
}
var TrainingEntry = function(name, title, description)
{
this.name = name;
this.title = title;
this.description = description;
}
var trainingsets = [];
// initializa AJAX
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
// get the available training sets
if(XMLHttpRequestObject) {
XMLHttpRequestObject.overrideMimeType("application/json");
XMLHttpRequestObject.open("GET", "trainingsets.list");
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {
doc = XMLHttpRequestObject.responseText;
// set the global object for the training set
trainingsets = jQuery.parseJSON(doc);
var output = "";
for(var i=0; i < trainingsets.length; i++)
{
output += "<a class=\"choiceEntry\" href=\"training.html?set="+ trainingsets[i].name +"\"> ";
output += "<p class=\"listitemTitle\">"+ trainingsets[i].title +"</p>";
output += trainingsets[i].description + "</a>\n";
}
document.getElementById("listbox").innerHTML = output;
}
}
}
XMLHttpRequestObject.send(null);
-->
</script>
</head>
<body>
<div id="maincontainer">
<img src="img/thinkpython.svg" id="titleimage"/>
<span class="button" style="top: 50px; left: 60px;"
onmouseover="this.style.backgroundImage='url(img/button_hover.svg)'"
onmouseout="this.style.backgroundImage='url(img/button.svg)'"
onclick="goToTraining()">
Start Training</span>
<span class="button" style="top: -32px; left: 440px; margin-bottom: -31px;"
onmouseover="this.style.backgroundImage='url(img/button_hover.svg)'"
onmouseout="this.style.backgroundImage='url(img/button.svg)'"
onclick="goToIDE()">
Start IDE</span>
<div class="footerparagraph">
This Website is in interactive learning environment for Python. Read the <a href="about.html">about page</a>
for more info.<br/>
Project Website: <a href="http://www.sourceforge.net/projects/thinkpython" target="_blank">
http://www.sourceforge.net/projects/thinkpython</a>.
</div>
</div>
<div id="overlay"></div>
<div id="dialog">
<h3>Please select a Training Set:</h3>
<div id="listbox"></div>
<button id="cancel" onclick="closeDialog()">Cancel</button>
</div>
</body>
</html>