Fix repeating footer

This commit is contained in:
Surinam 2020-06-13 17:44:52 +03:00
parent 643ddbe063
commit fbaaac0b72
2 changed files with 6 additions and 2 deletions

View File

@ -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');

View File

@ -1,6 +1,6 @@
{
"name": "cinematheme",
"version": "0.0.9",
"version": "0.0.10",
"description": "Create theme for CinemaPress",
"main": "index.js",
"license": "MIT",