website/core/Footer.js (84 lines of code) (raw):
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
class Footer extends React.Component {
docUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
}
pageUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + (language ? language + '/' : '') + doc;
}
render() {
const currentYear = new Date().getFullYear();
return (
<footer className="nav-footer" id="footer">
<section className="sitemap">
<a href={this.props.config.baseUrl} className="nav-home">
{this.props.config.footerIcon && (
<img
src={this.props.config.baseUrl + this.props.config.footerIcon}
alt={this.props.config.title}
width="66"
height="58"
/>
)}
</a>
<div>
<h5>Docs</h5>
<a href={this.docUrl('get-started.html', this.props.language)}>
Getting Started
</a>
<a href="https://developers.facebook.com/docs/instant-articles/rules-editor">
Full Documentation
</a>
</div>
<div>
<h5>Related</h5>
<a href="https://instantarticles.fb.com">
Instant Articles
</a>
</div>
<div>
<h5>More</h5>
<a href="https://github.com/facebook/instant-articles-builder">
GitHub Repository
</a>
<a href="https://github.com/facebook/instant-articles-builder/blob/master/LICENSE">
License
</a>
</div>
<div>
<h5>Legal</h5>
<a
href="https://opensource.facebook.com/legal/privacy/"
target="blank"
rel="noreferrer noopener">
Privacy
</a>
<a
href="https://opensource.facebook.com/legal/terms/"
target="blank"
rel="noreferrer noopener">
Terms
</a>
</div>
</section>
<a
href="https://code.facebook.com/projects/"
target="_blank"
className="fbOpenSource">
<img
src={this.props.config.baseUrl + 'img/oss_logo.png'}
alt="Facebook Open Source"
width="170"
height="45"
/>
</a>
<section className="copyright">
Copyright © {currentYear} Facebook Inc.
</section>
</footer>
);
}
}
module.exports = Footer;