Footer.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. return baseUrl + 'docs/' + (language && language !== 'en'
  12. ? language + '/' : '') + doc;
  13. }
  14. pageUrl(doc, language) {
  15. const baseUrl = this.props.config.baseUrl;
  16. return baseUrl + (language && language !== 'en'
  17. ? language + '/' : '') + doc;
  18. }
  19. render() {
  20. return (
  21. <footer className="nav-footer" id="footer">
  22. <section className="sitemap">
  23. <a href={this.props.config.baseUrl} className="nav-home">
  24. {this.props.config.footerIcon && (
  25. <img
  26. src={this.props.config.baseUrl + this.props.config.footerIcon}
  27. alt={this.props.config.title}
  28. width="66"
  29. height="58"
  30. />
  31. )}
  32. </a>
  33. <div>
  34. <h5>Docs</h5>
  35. <a href={this.docUrl('node.html', this.props.language)}>
  36. Installation
  37. </a>
  38. <a href={this.docUrl('api.html', this.props.language)}>
  39. Usage
  40. </a>
  41. <a href={this.docUrl('options.html', this.props.language)}>
  42. Configuration
  43. </a>
  44. <a href={this.docUrl('supported.html', this.props.language)}>
  45. Misc
  46. </a>
  47. </div>
  48. <div>
  49. <h5>Community</h5>
  50. <a href={this.pageUrl('users.html', this.props.language)}>
  51. Who is using KaTeX?
  52. </a>
  53. <a href="https://gitter.im/KaTeX/KaTeX">Gitter Chat</a>
  54. <a
  55. href="https://stackoverflow.com/questions/tagged/katex"
  56. target="_blank"
  57. rel="noreferrer noopener">
  58. Stack Overflow
  59. </a>
  60. </div>
  61. <div>
  62. <h5>More</h5>
  63. <a href="https://github.com/KaTeX/KaTeX/graphs/contributors">Contributors</a>
  64. <a
  65. className="github-button"
  66. href={this.props.config.repoUrl}
  67. data-icon="octicon-star"
  68. data-count-href="/KaTeX/KaTeX/stargazers"
  69. data-show-count={true}
  70. data-count-aria-label="# stargazers on GitHub"
  71. aria-label="Star this project on GitHub">
  72. Star
  73. </a>
  74. </div>
  75. </section>
  76. <a
  77. href="https://www.khanacademy.org/"
  78. className="logo">
  79. <img
  80. src={this.props.config.baseUrl + 'img/khan-academy.svg'}
  81. alt="Khan Academy"
  82. width="175"
  83. height="28"
  84. />
  85. </a>
  86. <section className="copyright">
  87. Licensed under <a href="https://github.com/KaTeX/KaTeX/blob/master/LICENSE">MIT License</a><br/>
  88. {this.props.config.copyright}
  89. </section>
  90. </footer>
  91. );
  92. }
  93. }
  94. module.exports = Footer;