diff --git a/config/directory.py b/config/directory.py
index 602813e..cf7e7c3 100644
--- a/config/directory.py
+++ b/config/directory.py
@@ -1,24 +1,31 @@
import os
+# template import
+import templates.basic_bootstrap.main as basic_bootstrap
+
+# pages directory
page = {
'public' :'page/public' ,
'error' :'page/error' # Non-template
}
+# public staticdir
dirconfig = {
'/' :
{
'tools.sessions.on' : True ,
'tools.staticdir.root' : os.path.abspath(os.getcwd()) ,
},
- '/lib' :
- {
- 'tools.staticdir.on' : True ,
- 'tools.staticdir.dir' : './static/lib' ,
- },
'/css' :
{
'tools.staticdir.on' : True ,
'tools.staticdir.dir' : './static/css' ,
},
}
+
+def add(template):
+ for row in template:
+ dirconfig[ row['name'] ] = row['value']
+
+# template staticdir
+add(basic_bootstrap.static)
diff --git a/handler.py b/handler.py
index d6feb05..e847335 100755
--- a/handler.py
+++ b/handler.py
@@ -1,7 +1,9 @@
import cherrypy
import json
import config.directory as directory
+
import templates.basic_bootstrap.main as basic_bootstrap
+
import modules.public.home as public_home
@cherrypy.tools.accept(media="application/json")
diff --git a/templates/basic_bootstrap/html/template.html b/templates/basic_bootstrap/html/template.html
index 106b993..33919e3 100644
--- a/templates/basic_bootstrap/html/template.html
+++ b/templates/basic_bootstrap/html/template.html
@@ -5,10 +5,10 @@
${GV_title}
-
-
-
-
+
+
+
+
${topnav}
diff --git a/templates/basic_bootstrap/main.py b/templates/basic_bootstrap/main.py
index ddd4c5c..a94784a 100644
--- a/templates/basic_bootstrap/main.py
+++ b/templates/basic_bootstrap/main.py
@@ -1,4 +1,22 @@
-from core import html
+from core import html
+from config import directory
+
+static = [
+ {
+ 'name':'/basic_bootstrap/lib',
+ 'value':{
+ 'tools.staticdir.on' : True ,
+ 'tools.staticdir.dir' : './templates/basic_bootstrap/static/lib' ,
+ }
+ },
+ {
+ 'name':'/basic_bootstrap/css',
+ 'value':{
+ 'tools.staticdir.on' : True ,
+ 'tools.staticdir.dir' : './templates/basic_bootstrap/static/css' ,
+ }
+ }
+]
def main(dir, page):
diff --git a/templates/basic_bootstrap/static/css/style.css b/templates/basic_bootstrap/static/css/style.css
new file mode 100644
index 0000000..ce7b74b
--- /dev/null
+++ b/templates/basic_bootstrap/static/css/style.css
@@ -0,0 +1 @@
+/* your style here */
diff --git a/static/lib/bootstrap/LICENSE b/templates/basic_bootstrap/static/lib/bootstrap/LICENSE
similarity index 100%
rename from static/lib/bootstrap/LICENSE
rename to templates/basic_bootstrap/static/lib/bootstrap/LICENSE
diff --git a/static/lib/bootstrap/css/bootstrap.min.css b/templates/basic_bootstrap/static/lib/bootstrap/css/bootstrap.min.css
similarity index 100%
rename from static/lib/bootstrap/css/bootstrap.min.css
rename to templates/basic_bootstrap/static/lib/bootstrap/css/bootstrap.min.css
diff --git a/static/lib/bootstrap/css/bootstrap.min.css.map b/templates/basic_bootstrap/static/lib/bootstrap/css/bootstrap.min.css.map
similarity index 100%
rename from static/lib/bootstrap/css/bootstrap.min.css.map
rename to templates/basic_bootstrap/static/lib/bootstrap/css/bootstrap.min.css.map
diff --git a/static/lib/bootstrap/js/bootstrap.bundle.min.js b/templates/basic_bootstrap/static/lib/bootstrap/js/bootstrap.bundle.min.js
similarity index 100%
rename from static/lib/bootstrap/js/bootstrap.bundle.min.js
rename to templates/basic_bootstrap/static/lib/bootstrap/js/bootstrap.bundle.min.js
diff --git a/static/lib/bootstrap/js/bootstrap.bundle.min.js.map b/templates/basic_bootstrap/static/lib/bootstrap/js/bootstrap.bundle.min.js.map
similarity index 100%
rename from static/lib/bootstrap/js/bootstrap.bundle.min.js.map
rename to templates/basic_bootstrap/static/lib/bootstrap/js/bootstrap.bundle.min.js.map
diff --git a/static/lib/jquery/jquery-3.7.0.min.js b/templates/basic_bootstrap/static/lib/jquery/jquery-3.7.0.min.js
similarity index 100%
rename from static/lib/jquery/jquery-3.7.0.min.js
rename to templates/basic_bootstrap/static/lib/jquery/jquery-3.7.0.min.js