footer.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. const html = require('choo/html');
  2. const Component = require('choo/component');
  3. class Footer extends Component {
  4. constructor(name, state) {
  5. super(name);
  6. this.state = state;
  7. }
  8. update() {
  9. return false;
  10. }
  11. createElement() {
  12. const translate = this.state.translate;
  13. return html`
  14. <footer
  15. class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:items-center justify-between"
  16. >
  17. <a class="mozilla-logo m-2" href="https://www.mozilla.org/">
  18. Mozilla
  19. </a>
  20. <ul
  21. class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
  22. >
  23. <li class="m-2">
  24. <a href="https://www.mozilla.org/about/legal/terms/services/#send">
  25. ${translate('footerLinkLegal')}
  26. </a>
  27. </li>
  28. <li class="m-2">
  29. <a href="/legal"> ${translate('footerLinkPrivacy')} </a>
  30. </li>
  31. <li class="m-2">
  32. <a href="https://www.mozilla.org/privacy/websites/#cookies">
  33. ${translate('footerLinkCookies')}
  34. </a>
  35. </li>
  36. <li class="m-2">
  37. <a href="https://github.com/mozilla/send">GitHub </a>
  38. </li>
  39. </ul>
  40. </footer>
  41. `;
  42. }
  43. }
  44. module.exports = Footer;