footer.tsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { h } from "preact";
  2. type Props = {
  3. links?: FooterLink[]
  4. }
  5. type FooterLink = {
  6. name: string;
  7. linkId: string;
  8. linkTarget: string;
  9. }
  10. const _DEFAULT_LINKS: FooterLink[] = [
  11. {
  12. name: "About Oracle",
  13. linkId: "aboutOracle",
  14. linkTarget: "http://www.oracle.com/us/corporate/index.html#menu-about"
  15. },
  16. {
  17. name: "Contact Us",
  18. linkId: "contactUs",
  19. linkTarget: "http://www.oracle.com/us/corporate/contact/index.html"
  20. },
  21. {
  22. name: "Legal Notices",
  23. linkId: "legalNotices",
  24. linkTarget: "http://www.oracle.com/us/legal/index.html"
  25. },
  26. {
  27. name: "Terms Of Use",
  28. linkId: "termsOfUse",
  29. linkTarget: "http://www.oracle.com/us/legal/terms/index.html"
  30. },
  31. {
  32. name: "Your Privacy Rights",
  33. linkId: "yourPrivacyRights",
  34. linkTarget: "http://www.oracle.com/us/legal/privacy/index.html"
  35. }
  36. ]
  37. export function Footer({ links = _DEFAULT_LINKS } : Props ) {
  38. return (
  39. <footer class="oj-web-applayout-footer" role="contentinfo">
  40. <div class="oj-web-applayout-footer-item oj-web-applayout-max-width">
  41. <ul>
  42. {links.map((item) => (
  43. <li>
  44. <a id={item.linkId} href={item.linkTarget} target="_blank">
  45. {item.name}
  46. </a>
  47. </li>
  48. ))}
  49. </ul>
  50. </div>
  51. <div class="oj-web-applayout-footer-item oj-web-applayout-max-width oj-text-color-secondary oj-typography-body-sm">
  52. Copyright © 2014, 2022 Oracle and/or its affiliates All rights reserved.
  53. </div>
  54. </footer>
  55. );
  56. }