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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. <a href="https://github.com/mingrammer/diagrams">GitHub</a>
  49. <a
  50. className="github-button"
  51. href={this.props.config.repoUrl}
  52. data-icon="octicon-star"
  53. data-count-href="/mingrammer/diagrams/stargazers"
  54. data-show-count="true"
  55. data-count-aria-label="# stargazers on GitHub"
  56. aria-label="Star this project on GitHub">
  57. Star
  58. </a>
  59. </div>
  60. </section>
  61. <section className="copyright">{this.props.config.copyright}</section>
  62. </footer>
  63. );
  64. }
  65. }
  66. module.exports = Footer;