mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-30 20:02:49 -05:00
82 lines
2.5 KiB
JavaScript
Executable File
82 lines
2.5 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.
|
|
*/
|
|
|
|
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}
|
|
style={{ width: '52px', height: '52px' }}
|
|
/>
|
|
)}
|
|
</a>
|
|
<div>
|
|
<h5>Docs</h5>
|
|
<a href={this.docUrl('introduction/quick-start')}>
|
|
Quick Start
|
|
</a>
|
|
<a href={this.docUrl('api/actions')}>
|
|
API
|
|
</a>
|
|
<a href={this.docUrl('subpackages/mobile')}>
|
|
Subpackages
|
|
</a>
|
|
</div>
|
|
<div>
|
|
<h5>Community</h5>
|
|
<a
|
|
href="https://gitter.im/unity-atoms/community#"
|
|
target="_blank"
|
|
rel="noreferrer noopener">
|
|
Gitter
|
|
</a>
|
|
</div>
|
|
<div>
|
|
<h5>More</h5>
|
|
<a href="https://medium.com/@adamramberg">Blog</a>
|
|
<a href="https://github.com/AdamRamberg/unity-atoms">GitHub</a>
|
|
<a
|
|
className="github-button"
|
|
href={this.props.config.repoUrl}
|
|
data-icon="octicon-star"
|
|
data-count-href="/AdamRamberg/unity-atoms/stargazers"
|
|
data-show-count="true"
|
|
data-count-aria-label="# stargazers on GitHub"
|
|
aria-label="Star this project on GitHub"
|
|
>
|
|
Star
|
|
</a>
|
|
</div>
|
|
</section>
|
|
<section className="copyright">{this.props.config.copyright}</section>
|
|
</footer>
|
|
);
|
|
}
|
|
}
|
|
|
|
module.exports = Footer;
|