Moved from php to python
This commit is contained in:
@@ -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
28
multisphere/index.py
Executable 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()
|
||||
Reference in New Issue
Block a user