Files
ent/doc/website/core/Footer.js
Dolev Hadar a6bf47b384 Ent website design changes
Summary: Design: https://our.intern.facebook.com/intern/px/p/Jr3W

Reviewed By: alexsn

Differential Revision: D17093961

fbshipit-source-id: d2512a0fec8459170084f15fb3fffb285ad4b375
2019-08-28 09:07:10 -07:00

92 lines
2.7 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">
<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('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;