You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

62 rivejä
1.9 KiB

  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. const React = require('react');
  8. class Footer extends React.Component {
  9. docUrl(doc, language) {
  10. const baseUrl = this.props.config.baseUrl;
  11. const docsUrl = this.props.config.docsUrl;
  12. const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
  13. const langPart = `${language ? `${language}/` : ''}`;
  14. return `${baseUrl}${docsPart}${langPart}${doc}`;
  15. }
  16. pageUrl(doc, language) {
  17. const baseUrl = this.props.config.baseUrl;
  18. return baseUrl + (language ? `${language}/` : '') + doc;
  19. }
  20. render() {
  21. return (
  22. <footer className="nav-footer" id="footer">
  23. <section className="sitemap">
  24. <a href={this.props.config.baseUrl} className="nav-home">
  25. {this.props.config.footerIcon && (
  26. <img
  27. src={this.props.config.baseUrl + this.props.config.footerIcon}
  28. alt={this.props.config.title}
  29. width="66"
  30. height="58"
  31. />
  32. )}
  33. </a>
  34. <div>
  35. <h5>Docs</h5>
  36. <a href={this.docUrl('getting-started/installation')}>
  37. Getting Started
  38. </a>
  39. <a href={this.docUrl('guides/diagram')}>
  40. Guides
  41. </a>
  42. <a href={this.docUrl('nodes/aws')}>
  43. Nodes
  44. </a>
  45. </div>
  46. <div>
  47. <h5>More</h5>
  48. <iframe src="https://ghbtns.com/github-btn.html?user=mingrammer&repo=diagrams&type=star&count=true&size=large" frameBorder="0" scrolling="0" width="170" height="30" title="Star mingrammer/diagrams on GitHub"></iframe>
  49. </div>
  50. </section>
  51. <section className="copyright">{this.props.config.copyright}</section>
  52. </footer>
  53. );
  54. }
  55. }
  56. module.exports = Footer;