const { Component } = require('inferno'); const { cacheComponent } = require('../util/cache'); class Footer extends Component { render() { const { logo, logoUrl, siteUrl, siteTitle, siteYear, author, links, showVisitorCounter, visitorCounterTitle } = this.props; return ; } } module.exports = cacheComponent(Footer, 'common.footer', props => { const { config, helper } = props; const { url_for, _p, date } = helper; const { logo, title, author, footer, plugins } = config; const links = {}; if (footer && footer.links) { Object.keys(footer.links).forEach(name => { const link = footer.links[name]; links[name] = { url: url_for(typeof link === 'string' ? link : link.url), icon: link.icon }; }); } return { logo, logoUrl: url_for(logo), siteUrl: url_for('/'), siteTitle: title, siteYear: date(new Date(), 'YYYY'), author, links, showVisitorCounter: plugins && plugins.busuanzi === true, visitorCounterTitle: _p('plugin.visitor', '0') }; });