fat-footer.tsx 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. import React from 'react'
  2. import { useTranslation } from 'react-i18next'
  3. import FatFooterBase from './fat-footer-base'
  4. type FooterLinkProps = {
  5. href: string
  6. label: string
  7. }
  8. type FooterSectionProps = {
  9. title: string
  10. links: FooterLinkProps[]
  11. }
  12. function FatFooter() {
  13. const { t } = useTranslation()
  14. const hideFatFooter = false
  15. const sections = [
  16. {
  17. title: t('About'),
  18. links: [
  19. { href: '/about', label: t('footer_about_us') },
  20. { href: 'https://digitalscience.pinpointhq.com/', label: t('careers') },
  21. { href: '/blog', label: t('blog') },
  22. ],
  23. },
  24. {
  25. title: t('Solutions'),
  26. links: [
  27. { href: '/for/enterprises', label: t('for_business') },
  28. { href: '/for/universities', label: t('for_universities') },
  29. { href: '/for/government', label: t('for_government') },
  30. { href: '/for/publishers', label: t('for_publishers') },
  31. { href: '/about/customer-stories', label: t('customer_stories') },
  32. ],
  33. },
  34. {
  35. title: t('Learn'),
  36. links: [
  37. {
  38. href: '/learn/latex/Learn_LaTeX_in_30_minutes',
  39. label: t('latex_in_thirty_minutes'),
  40. },
  41. { href: '/latex/templates', label: t('templates') },
  42. { href: '/events/webinars', label: t('webinars') },
  43. { href: '/learn/latex/Tutorials', label: t('tutorials') },
  44. {
  45. href: '/learn/latex/Inserting_Images',
  46. label: t('how_to_insert_images'),
  47. },
  48. { href: '/learn/latex/Tables', label: t('how_to_create_tables') },
  49. ],
  50. },
  51. {
  52. title: t('Pricing'),
  53. links: [
  54. {
  55. href: '/user/subscription/plans?itm_referrer=footer-for-indv',
  56. label: t('for_individuals'),
  57. },
  58. {
  59. href: '/user/subscription/plans?plan=group&itm_referrer=footer-for-groups',
  60. label: t('for_groups_and_organizations'),
  61. },
  62. {
  63. href: '/user/subscription/plans?itm_referrer=footer-for-students#student-annual',
  64. label: t('for_students'),
  65. },
  66. ],
  67. },
  68. {
  69. title: t('Get Involved'),
  70. links: [
  71. {
  72. href: 'https://forms.gle/67PSpN1bLnjGCmPQ9',
  73. label: t('let_us_know_what_you_think'),
  74. },
  75. { href: '/beta/participate', label: t('join_beta_program') },
  76. ],
  77. },
  78. {
  79. title: t('Help'),
  80. links: [
  81. { href: '/learn', label: t('Documentation') },
  82. { href: '/contact', label: t('footer_contact_us') },
  83. { href: 'https://status.overleaf.com/', label: t('website_status') },
  84. ],
  85. },
  86. ]
  87. return (
  88. <footer className="fat-footer hidden-print">
  89. <div
  90. role="navigation"
  91. aria-label={t('footer_navigation')}
  92. className="fat-footer-container"
  93. >
  94. <div className={`fat-footer-sections ${hideFatFooter ? 'hidden' : ''}`}>
  95. <div className="footer-section" id="footer-brand">
  96. <a href="/" aria-label={t('overleaf')} className="footer-brand">
  97. <span className="visually-hidden">{t('overleaf')}</span>
  98. </a>
  99. </div>
  100. {sections.map(section => (
  101. <div className="footer-section" key={section.title}>
  102. <FooterSection title={section.title} links={section.links} />
  103. </div>
  104. ))}
  105. </div>
  106. <FatFooterBase />
  107. </div>
  108. </footer>
  109. )
  110. }
  111. function FooterSection({ title, links }: FooterSectionProps) {
  112. const { t } = useTranslation()
  113. return (
  114. <>
  115. <h2 className="footer-section-heading">{t(title)}</h2>
  116. <ul className="list-unstyled">
  117. {links.map(link => (
  118. <li key={link.href}>
  119. <a href={link.href}>{t(link.label)}</a>
  120. </li>
  121. ))}
  122. </ul>
  123. </>
  124. )
  125. }
  126. export default FatFooter