ligo/gitlab-pages/website/core/Footer.js

48 lines
1.2 KiB
JavaScript
Raw Normal View History

// deprecated.
const React = require('react');
2019-12-05 20:10:59 +04:00
const docUrl = require(`${process.cwd()}/core/UrlUtils`).docUrl;
const Link = props => {
const link = props.href ? props.href : docUrl(props.config, props.doc);
return props.blankTarget ? (
<a href={link} target="_blank" rel="noreferrer noopener">
{props.label}
</a>
) : (
<a href={link}>{props.label}</a>
);
};
module.exports = props => {
return (
<footer className="nav-footer" id="footer">
<section className="footer-wrapper">
<div className="sitemap">
<div>
<h5>Docs</h5>
{props.config.footerLinks.docs.map(entry =>
Link({ config: props.config, ...entry })
)}
</div>
2019-12-05 20:10:59 +04:00
<div>
<h5>Community</h5>
{props.config.footerLinks.community.map(entry =>
Link({ config: props.config, ...entry })
)}
</div>
2019-12-05 20:10:59 +04:00
<div>
<h5>More</h5>
{props.config.footerLinks.more.map(entry =>
Link({ config: props.config, ...entry })
)}
</div>
</div>
2019-12-05 20:10:59 +04:00
<div className="copyright">{props.config.copyright}</div>
</section>
</footer>
);
};