Corrected bugs

This commit is contained in:
Thomas FORGIONE 2015-04-20 10:13:49 +02:00
parent b22e35660a
commit 5e58724654
2 changed files with 6 additions and 1 deletions

View File

@ -12,14 +12,19 @@ def main():
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/main.js"></script>'
content = Web.Element('index.html')
staticPath = Web.Element()
staticPath.open_string = ' <script>static_path = \'/\';</script>'
page.add_child(head)
page.add_child(body)
body.add_child(content)
body.add_child(jsIncludes)
jsIncludes.add_child(staticPath)
jsIncludes.add_child(mainJs)
page.print()

View File

@ -5,7 +5,7 @@ import sys
import os
# ROOT_DIR = '/'.join(__file__.split('/')[:-2]) + '/'
ROOT_DIR = '/home/thomas/stage/javascript/web/'
ROOT_DIR = '/home/thomas/stage/javascript/master/'
class Element: