Files
cloudron-box/src/branding.js
T
Girish Ramakrishnan 2aa5c387c7 branding: add template variables
we can now have %YEAR% and %VERSION% in the footer
2020-10-18 10:19:13 -07:00

19 lines
366 B
JavaScript

'use strict';
exports = module.exports = {
renderFooter
};
const assert = require('assert'),
constants = require('./constants.js');
function renderFooter(footer) {
assert.strictEqual(typeof footer, 'string');
const year = new Date().getFullYear();
return footer.replace(/%YEAR%/g, year)
.replace(/%VERSION%/g, constants.VERSION);
}