new file: s/scripts.tpl.html

modified:   src/main.js
This commit is contained in:
Flummi 2016-08-16 23:04:38 +02:00
parent f20b24b645
commit 34d0765662
2 changed files with 7 additions and 1 deletions

0
s/scripts.tpl.html Normal file
View File

View File

@ -293,6 +293,11 @@ http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(tpl(), 'utf-8');
}
else if(filePath == "./scripts") {
var tpl = swig.compile(templates.scripts);
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(tpl(), 'utf-8');
}
else if(filePath.match(/^\.\/(b|s|t)\/.*/)) { // file
contentType = mimeTypes[extname];
switch(contentType) {
@ -367,7 +372,8 @@ var getTpls = () => {
"index": fs.readFileSync("./s/index.tpl.html", "utf-8"),
"item": fs.readFileSync("./s/item.tpl.html", "utf-8"),
"how": fs.readFileSync("./s/how.tpl.html", "utf-8"),
"contact": fs.readFileSync("./s/contact.tpl.html", "utf-8")
"contact": fs.readFileSync("./s/contact.tpl.html", "utf-8"),
"scripts": fs.readFileSync("./s/scripts.tpl.html", "utf-8")
};
};
getTpls();