Files
ent/doc/website/core/Footer.js
Alex Snast 11c026e2f5 Ent site - changes after Moriah review
Reviewed By: dlvhdr

Differential Revision: D17112173

fbshipit-source-id: df0e89212dcfa593868300fdea26b0958b0d0c95
2019-08-29 09:43:33 -07:00

82 lines
2.4 KiB
JavaScript
Executable File

/**
* 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.
*
* @format
*/
const React = require('react');
class Footer extends React.Component {
docUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
const docsUrl = this.props.config.docsUrl;
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
const langPart = `${language ? `${language}/` : ''}`;
return `${baseUrl}${docsPart}${langPart}${doc}`;
}
pageUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + (language ? `${language}/` : '') + doc;
}
render() {
return (
<footer className="nav-footer" id="footer">
<section className="sitemap">
<div>
<h5>Docs</h5>
<a href={this.docUrl('doc1.html', this.props.language)}>
Getting Started (or other categories)
</a>
<a href={this.docUrl('doc2.html', this.props.language)}>
Guides (or other categories)
</a>
<a href={this.docUrl('doc3.html', this.props.language)}>
API Reference (or other categories)
</a>
</div>
<div>
<h5>Credits</h5>
<span className="copyright">
The Go gopher was designed by{' '}
<a
href="http://reneefrench.blogspot.com/"
style={{display: 'inline'}}>
Renee French
</a>
. The design is licensed under the Creative Commons 3.0
Attributions license. Read this{' '}
<a
href="https://blog.golang.org/gopher"
style={{display: 'inline'}}>
article
</a>{' '}
for more details.
</span>
</div>
</section>
<a
href="https://opensource.facebook.com/"
target="_blank"
rel="noreferrer noopener"
className="fbOpenSource">
<img
src={`${this.props.config.baseUrl}img/oss_logo.png`}
alt="Facebook Open Source"
width="170"
height="45"
/>
</a>
<section className="copyright">{this.props.config.copyright}</section>
</footer>
);
}
}
module.exports = Footer;