|
| 1 | +/** |
| 2 | + * Copyright (c) 2017-present, Facebook, Inc. |
| 3 | + * |
| 4 | + * This source code is licensed under the MIT license found in the |
| 5 | + * LICENSE file in the root directory of this source tree. |
| 6 | + */ |
| 7 | + |
| 8 | +const React = require('react'); |
| 9 | + |
| 10 | +class Footer extends React.Component { |
| 11 | + docUrl(doc, language) { |
| 12 | + const baseUrl = this.props.config.baseUrl; |
| 13 | + const docsUrl = this.props.config.docsUrl; |
| 14 | + const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; |
| 15 | + const langPart = `${language ? `${language}/` : ''}`; |
| 16 | + return `${baseUrl}${docsPart}${langPart}${doc}`; |
| 17 | + } |
| 18 | + |
| 19 | + pageUrl(doc, language) { |
| 20 | + const baseUrl = this.props.config.baseUrl; |
| 21 | + return baseUrl + (language ? `${language}/` : '') + doc; |
| 22 | + } |
| 23 | + |
| 24 | + render() { |
| 25 | + return ( |
| 26 | + <footer className="nav-footer" id="footer"> |
| 27 | + <section className="sitemap"> |
| 28 | + <a href={this.props.config.baseUrl} className="nav-home"> |
| 29 | + {this.props.config.footerIcon && ( |
| 30 | + <img |
| 31 | + src={this.props.config.baseUrl + this.props.config.footerIcon} |
| 32 | + alt={this.props.config.title} |
| 33 | + /> |
| 34 | + )} |
| 35 | + </a> |
| 36 | + <div> |
| 37 | + <h5>Docs</h5> |
| 38 | + <a href={this.docUrl('learn-more', this.props.language)}> |
| 39 | + Learn More |
| 40 | + </a> |
| 41 | + <a href={this.docUrl('projects', this.props.language)}> |
| 42 | + Projects |
| 43 | + </a> |
| 44 | + </div> |
| 45 | + <div> |
| 46 | + <h5>Community</h5> |
| 47 | + <a |
| 48 | + href="https://www.finos.org/" |
| 49 | + target="_blank" |
| 50 | + rel="noreferrer noopener"> |
| 51 | + FINOS |
| 52 | + </a> |
| 53 | + <a |
| 54 | + href="https://groups.google.com/a/finos.org/forum/#!forum/deg" |
| 55 | + target="_blank" |
| 56 | + rel="noreferrer noopener"> |
| 57 | + Mailing List |
| 58 | + </a> |
| 59 | + {} |
| 60 | + </div> |
| 61 | + </section> |
| 62 | + {} |
| 63 | + <section className="copyright">{this.props.config.copyright}</section> |
| 64 | + </footer> |
| 65 | + ); |
| 66 | + } |
| 67 | +} |
| 68 | + |
| 69 | +module.exports = Footer; |
0 commit comments