Corrected bugs
This commit is contained in:
parent
b22e35660a
commit
5e58724654
|
@ -12,14 +12,19 @@ def main():
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
||||||
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
|
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
|
||||||
|
|
||||||
mainJs = Web.Element()
|
mainJs = Web.Element()
|
||||||
mainJs.open_string = ' <script src="js/main.js"></script>'
|
mainJs.open_string = ' <script src="js/main.js"></script>'
|
||||||
content = Web.Element('index.html')
|
content = Web.Element('index.html')
|
||||||
|
|
||||||
|
staticPath = Web.Element()
|
||||||
|
staticPath.open_string = ' <script>static_path = \'/\';</script>'
|
||||||
|
|
||||||
page.add_child(head)
|
page.add_child(head)
|
||||||
page.add_child(body)
|
page.add_child(body)
|
||||||
body.add_child(content)
|
body.add_child(content)
|
||||||
body.add_child(jsIncludes)
|
body.add_child(jsIncludes)
|
||||||
|
jsIncludes.add_child(staticPath)
|
||||||
jsIncludes.add_child(mainJs)
|
jsIncludes.add_child(mainJs)
|
||||||
|
|
||||||
page.print()
|
page.print()
|
||||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# ROOT_DIR = '/'.join(__file__.split('/')[:-2]) + '/'
|
# ROOT_DIR = '/'.join(__file__.split('/')[:-2]) + '/'
|
||||||
ROOT_DIR = '/home/thomas/stage/javascript/web/'
|
ROOT_DIR = '/home/thomas/stage/javascript/master/'
|
||||||
|
|
||||||
|
|
||||||
class Element:
|
class Element:
|
||||||
|
|
Loading…
Reference in New Issue