new file: s/scripts.tpl.html
modified: src/main.js
This commit is contained in:
parent
f20b24b645
commit
34d0765662
0
s/scripts.tpl.html
Normal file
0
s/scripts.tpl.html
Normal file
@ -293,6 +293,11 @@ http.createServer((req, res) => {
|
|||||||
res.writeHead(200, { 'Content-Type': 'text/html' });
|
res.writeHead(200, { 'Content-Type': 'text/html' });
|
||||||
res.end(tpl(), 'utf-8');
|
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
|
else if(filePath.match(/^\.\/(b|s|t)\/.*/)) { // file
|
||||||
contentType = mimeTypes[extname];
|
contentType = mimeTypes[extname];
|
||||||
switch(contentType) {
|
switch(contentType) {
|
||||||
@ -367,7 +372,8 @@ var getTpls = () => {
|
|||||||
"index": fs.readFileSync("./s/index.tpl.html", "utf-8"),
|
"index": fs.readFileSync("./s/index.tpl.html", "utf-8"),
|
||||||
"item": fs.readFileSync("./s/item.tpl.html", "utf-8"),
|
"item": fs.readFileSync("./s/item.tpl.html", "utf-8"),
|
||||||
"how": fs.readFileSync("./s/how.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();
|
getTpls();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user