Fix repeating footer
This commit is contained in:
parent
643ddbe063
commit
fbaaac0b72
|
@ -38,6 +38,7 @@ module.exports = parameters => {
|
|||
];
|
||||
let links = [];
|
||||
let footer = [];
|
||||
let footer_one = true;
|
||||
|
||||
['index', 'movie', 'episode', 'picture', 'trailer', 'download', 'online', 'category', 'categories'].forEach(f => {
|
||||
fs.ensureFileSync(path.join(process.cwd(), h, f + '.html'));
|
||||
|
@ -55,7 +56,10 @@ module.exports = parameters => {
|
|||
}
|
||||
let footer_body = page.querySelector('footer');
|
||||
if (footer_body && footer_body.innerHTML) {
|
||||
footer.push(formatter.html(footer_body.innerHTML));
|
||||
if (footer_one) {
|
||||
footer.push(formatter.html(footer_body.innerHTML));
|
||||
footer_one = false;
|
||||
}
|
||||
footer_body.innerHTML = '\n<%- include(\'includes/footer.ejs\'); -%>\n';
|
||||
}
|
||||
let head_page = page.querySelector('head');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cinematheme",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.10",
|
||||
"description": "Create theme for CinemaPress",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Reference in New Issue