Footer.tsx 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. import React from "react"
  2. import Link from "next/link"
  3. import { FormattedMessage } from "react-intl"
  4. import Image from "next/image"
  5. import footerImage from "../public/illustrations/footer.png"
  6. import LogoWhite from "../public/logos/logo-white.svg?inline"
  7. import GitHub from "../public/ui/github.svg?inline"
  8. /** Sitewide footer component */
  9. export const Footer = () => (
  10. <footer className="full-width-bg relative mt-footer-offset bg-[#150118] pb-24 text-center text-white md:pt-24 md:text-start">
  11. <div className="pointer-events-none absolute bottom-full left-1/2 z-0 ml-[-1px] h-48 w-full -translate-x-1/2 translate-y-[1px] md:bottom-footer-offset md:h-full">
  12. <Image
  13. src={footerImage}
  14. alt=""
  15. layout="fill"
  16. objectFit="cover"
  17. objectPosition="center top"
  18. placeholder="empty"
  19. unoptimized
  20. />
  21. </div>
  22. <nav className="full-width-bg__inner relative z-10">
  23. <div className="grid gap-x-4 gap-y-16 md:grid-cols-12 md:gap-x-5">
  24. <div className="flex flex-col items-center gap-8 text-nightshade-50 md:col-start-1 md:col-end-5 md:items-start lg:col-start-1 lg:col-end-5">
  25. <LogoWhite className="w-20 max-w-full" fill="currentColor" />
  26. <p className="mt-2 max-w-[28ch]">
  27. <FormattedMessage
  28. id="footer.quip"
  29. defaultMessage="Free, open-source decentralized social media platform."
  30. />
  31. </p>
  32. </div>
  33. <div className="grid gap-10 gap-x-4 md:col-start-6 md:col-end-13 md:grid-cols-3 md:gap-x-5">
  34. {[
  35. {
  36. heading: (
  37. <FormattedMessage
  38. id="nav.product.title"
  39. defaultMessage="Product"
  40. />
  41. ),
  42. links: [
  43. <Link key="servers" href="/servers">
  44. <a className="inline-block py-2 hover:underline">
  45. <FormattedMessage
  46. id="nav.servers.title"
  47. defaultMessage="Servers"
  48. />
  49. </a>
  50. </Link>,
  51. <Link key="apps" href="/apps">
  52. <a className="inline-block py-2 hover:underline">
  53. <FormattedMessage
  54. id="nav.apps.title"
  55. defaultMessage="Apps"
  56. />
  57. </a>
  58. </Link>,
  59. <Link key="sponsors" href="/sponsors">
  60. <a className="inline-block py-2 hover:underline">
  61. <FormattedMessage
  62. id="nav.sponsors.title"
  63. defaultMessage="Sponsors"
  64. />
  65. </a>
  66. </Link>,
  67. <Link key="roadmap" href="/roadmap">
  68. <a className="inline-block py-2 hover:underline">
  69. <FormattedMessage
  70. id="nav.roadmap.title"
  71. defaultMessage="Roadmap"
  72. />
  73. </a>
  74. </Link>,
  75. ],
  76. },
  77. {
  78. heading: (
  79. <FormattedMessage
  80. id="nav.resources.title"
  81. defaultMessage="Resources"
  82. />
  83. ),
  84. links: [
  85. <a
  86. className="inline-block py-2 hover:underline"
  87. key="mastodon/mastodon"
  88. target="_blank"
  89. rel="noopener noreferrer"
  90. href="https://github.com/mastodon/mastodon"
  91. >
  92. <FormattedMessage
  93. id="nav.code.title"
  94. defaultMessage="Source code"
  95. />
  96. </a>,
  97. <a
  98. className="inline-block py-2 hover:underline"
  99. target="_blank"
  100. rel="noopener noreferrer"
  101. key="https://blog.joinmastodon.org"
  102. href="https://blog.joinmastodon.org/"
  103. >
  104. <FormattedMessage id="nav.blog.title" defaultMessage="Blog" />
  105. </a>,
  106. <a
  107. className="inline-block py-2 hover:underline"
  108. key="joinmastodon.org"
  109. target="_blank"
  110. rel="noopener noreferrer"
  111. href="https://docs.joinmastodon.org"
  112. >
  113. <FormattedMessage
  114. id="nav.docs.title"
  115. defaultMessage="Documentation"
  116. />
  117. </a>,
  118. <a
  119. className="inline-block py-2 hover:underline"
  120. key="mastodon/discussions"
  121. target="_blank"
  122. rel="noopener noreferrer"
  123. href="https://github.com/mastodon/mastodon/discussions"
  124. >
  125. <FormattedMessage
  126. id="nav.support.title"
  127. defaultMessage="Support"
  128. />
  129. </a>,
  130. ],
  131. },
  132. {
  133. heading: (
  134. <FormattedMessage
  135. id="nav.company.title"
  136. defaultMessage="Company"
  137. />
  138. ),
  139. links: [
  140. <Link key="/about" href="/about">
  141. <a className="inline-block py-2 hover:underline">
  142. <FormattedMessage
  143. id="nav.about_us.title"
  144. defaultMessage="About us"
  145. />
  146. </a>
  147. </Link>,
  148. <Link key="/branding" href="/branding">
  149. <a className="inline-block py-2 hover:underline">
  150. <FormattedMessage
  151. id="nav.branding.title"
  152. defaultMessage="Branding"
  153. />
  154. </a>
  155. </Link>,
  156. <Link key="/careers" href="/careers">
  157. <a className="inline-block py-2 hover:underline">
  158. <FormattedMessage
  159. id="nav.careers.title"
  160. defaultMessage="Careers"
  161. />
  162. </a>
  163. </Link>,
  164. <Link key="/impressum" href="/about#impressum">
  165. <a className="inline-block py-2 hover:underline">
  166. <FormattedMessage
  167. id="nav.impressum.title"
  168. defaultMessage="Impressum"
  169. />
  170. </a>
  171. </Link>,
  172. ],
  173. },
  174. ].map((menu, i) => (
  175. <div className="flex flex-col gap-2" key={i}>
  176. <h2 className="h6 py-1">{menu.heading}</h2>
  177. <ul className="b2 m-0 flex flex-col gap-2 p-0 text-nightshade-100">
  178. {menu.links.map((link) => (
  179. <li key={link.key}>{link}</li>
  180. ))}
  181. </ul>
  182. </div>
  183. ))}
  184. </div>
  185. </div>
  186. <hr className="my-6 border-nightshade-600 sm:mx-auto lg:my-8" />
  187. <div className="sm:flex sm:items-center sm:justify-between">
  188. <span className="text-center text-nightshade-100 md:text-start">
  189. Copyright © 2023 Mastodon gGmbH.{" "}
  190. <Link href="/trademark">
  191. <a className="sm:ml-4 sm:pl-4 sm:border-l border-nightshade-600 hover:underline">
  192. <FormattedMessage
  193. id="nav.trademark_policy.title"
  194. defaultMessage="Trademark Policy"
  195. />
  196. </a>
  197. </Link>
  198. <span aria-hidden>{" • "}</span>
  199. <Link href="/privacy-policy">
  200. <a className="hover:underline">
  201. <FormattedMessage
  202. id="nav.privacy_policy.title"
  203. defaultMessage="Privacy Policy"
  204. />
  205. </a>
  206. </Link>
  207. <span aria-hidden>{" • "}</span>
  208. <Link href="https://joinmastodon.instatus.com">
  209. <a className="hover:underline">
  210. <FormattedMessage
  211. id="nav.status.title"
  212. defaultMessage="Status"
  213. />
  214. </a>
  215. </Link>
  216. </span>
  217. <div className="mt-4 flex space-x-2 justify-center md:mt-0 md:space-x-6">
  218. <a
  219. href="https://mastodon.social/@Mastodon"
  220. rel="me"
  221. className="text-nightshade-100 hover:text-nightshade-50"
  222. >
  223. <LogoWhite className="h-5 w-5" fill="currentColor" />
  224. <span className="sr-only">
  225. <FormattedMessage
  226. id="footer.follow_us_on_mastodon"
  227. defaultMessage="Follow us on Mastodon"
  228. />
  229. </span>
  230. </a>
  231. <a
  232. href="https://github.com/mastodon"
  233. rel="me"
  234. className="text-nightshade-100 hover:text-nightshade-50"
  235. >
  236. <GitHub className="h-5 w-5" fill="currentColor" />
  237. <span className="sr-only">
  238. GitHub
  239. </span>
  240. </a>
  241. </div>
  242. </div>
  243. </nav>
  244. </footer>
  245. )
  246. export default Footer