選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

69 行
2.1 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('installation', this.props.language)}>
  37. Getting Started
  38. </a>
  39. <a href={this.docUrl('diagram', this.props.language)}>
  40. Guides
  41. </a>
  42. </div>
  43. <div>
  44. <h5>More</h5>
  45. <a href="https://github.com/mingrammer/diagrams">GitHub</a>
  46. <a
  47. className="github-button"
  48. href={this.props.config.repoUrl}
  49. data-icon="octicon-star"
  50. data-count-href="/mingrammer/diagrams/stargazers"
  51. data-show-count="true"
  52. data-count-aria-label="# stargazers on GitHub"
  53. aria-label="Star this project on GitHub">
  54. Star
  55. </a>
  56. </div>
  57. </section>
  58. <section className="copyright">{this.props.config.copyright}</section>
  59. </footer>
  60. );
  61. }
  62. }
  63. module.exports = Footer;