Moved from php to python

This commit is contained in:
Thomas FORGIONE
2015-04-12 21:13:41 +02:00
parent 35a8522088
commit 925f6bab74
30 changed files with 4886 additions and 124 deletions

View File

@@ -1,10 +1,3 @@
<?php include_once("header_functions.php"); ?>
<!doctype html>
<html>
<?php head("Multisphere"); ?>
<body>
<?php include("header.php"); ?>
<?php include("nav.php"); ?>
<section>
<h2>Multiresolution sphere</h2>
<p>
@@ -14,8 +7,5 @@
the canvas.
</p>
<div id="container"></div>
#
</section>
<?php include("jsIncludes.php"); ?>
<script src="js/MultiSphere.js"></script>
</body>
</html>

28
multisphere/index.py Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from webtools import Web
def main():
print('Content-type: text/html')
print()
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
mainJs = Web.Element()
mainJs.open_string = ' <script src="js/MultiSphere.js"></script>'
content = Web.Element('index.html')
page.add_child(head)
page.add_child(body)
body.add_child(content)
body.add_child(jsIncludes)
jsIncludes.add_child(mainJs)
page.print()
if __name__ == '__main__':
main()