Footer.tsx 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. import React from "react"
  2. import Link from "next/link"
  3. import { FormattedMessage } from "react-intl"
  4. import Image from "next/legacy/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
  44. key="servers"
  45. href="/servers"
  46. className="inline-block py-2 hover:underline"
  47. >
  48. <FormattedMessage
  49. id="nav.servers.title"
  50. defaultMessage="Servers"
  51. />
  52. </Link>,
  53. <Link
  54. key="apps"
  55. href="/apps"
  56. className="inline-block py-2 hover:underline"
  57. >
  58. <FormattedMessage id="nav.apps.title" defaultMessage="Apps" />
  59. </Link>,
  60. <Link
  61. key="sponsors"
  62. href="/sponsors"
  63. className="inline-block py-2 hover:underline"
  64. >
  65. <FormattedMessage
  66. id="nav.sponsors.title"
  67. defaultMessage="Donate"
  68. />
  69. </Link>,
  70. <Link
  71. key="roadmap"
  72. href="/roadmap"
  73. className="inline-block py-2 hover:underline"
  74. >
  75. <FormattedMessage
  76. id="nav.roadmap.title"
  77. defaultMessage="Roadmap"
  78. />
  79. </Link>,
  80. ],
  81. },
  82. {
  83. heading: (
  84. <FormattedMessage
  85. id="nav.resources.title"
  86. defaultMessage="Resources"
  87. />
  88. ),
  89. links: [
  90. <a
  91. className="inline-block py-2 hover:underline"
  92. key="mastodon/mastodon"
  93. target="_blank"
  94. rel="noopener noreferrer"
  95. href="https://github.com/mastodon/mastodon"
  96. >
  97. <FormattedMessage
  98. id="nav.code.title"
  99. defaultMessage="Source code"
  100. />
  101. </a>,
  102. <a
  103. className="inline-block py-2 hover:underline"
  104. target="_blank"
  105. rel="noopener noreferrer"
  106. key="https://blog.joinmastodon.org"
  107. href="https://blog.joinmastodon.org/"
  108. >
  109. <FormattedMessage id="nav.blog.title" defaultMessage="Blog" />
  110. </a>,
  111. <a
  112. className="inline-block py-2 hover:underline"
  113. key="joinmastodon.org"
  114. target="_blank"
  115. rel="noopener noreferrer"
  116. href="https://docs.joinmastodon.org"
  117. >
  118. <FormattedMessage
  119. id="nav.docs.title"
  120. defaultMessage="Documentation"
  121. />
  122. </a>,
  123. <a
  124. className="inline-block py-2 hover:underline"
  125. key="mastodon/discussions"
  126. target="_blank"
  127. rel="noopener noreferrer"
  128. href="https://github.com/mastodon/mastodon/discussions"
  129. >
  130. <FormattedMessage
  131. id="nav.support.title"
  132. defaultMessage="Support"
  133. />
  134. </a>,
  135. ],
  136. },
  137. {
  138. heading: (
  139. <FormattedMessage
  140. id="nav.company.title"
  141. defaultMessage="Company"
  142. />
  143. ),
  144. links: [
  145. <Link
  146. key="/about"
  147. href="/about"
  148. className="inline-block py-2 hover:underline"
  149. >
  150. <FormattedMessage
  151. id="nav.about_us.title"
  152. defaultMessage="About us"
  153. />
  154. </Link>,
  155. <Link
  156. key="/branding"
  157. href="/branding"
  158. className="inline-block py-2 hover:underline"
  159. >
  160. <FormattedMessage
  161. id="nav.branding.title"
  162. defaultMessage="Branding"
  163. />
  164. </Link>,
  165. <Link
  166. key="/careers"
  167. href="/careers"
  168. className="inline-block py-2 hover:underline"
  169. >
  170. <FormattedMessage
  171. id="nav.careers.title"
  172. defaultMessage="Careers"
  173. />
  174. </Link>,
  175. <Link
  176. key="/impressum"
  177. href="/about#impressum"
  178. className="inline-block py-2 hover:underline"
  179. >
  180. <FormattedMessage
  181. id="nav.impressum.title"
  182. defaultMessage="Impressum"
  183. />
  184. </Link>,
  185. ],
  186. },
  187. ].map((menu, i) => (
  188. <div className="flex flex-col gap-2" key={i}>
  189. <h2 className="h6 py-1">{menu.heading}</h2>
  190. <ul className="b2 m-0 flex flex-col gap-2 p-0 text-nightshade-100">
  191. {menu.links.map((link) => (
  192. <li key={link.key}>{link}</li>
  193. ))}
  194. </ul>
  195. </div>
  196. ))}
  197. </div>
  198. </div>
  199. <hr className="my-6 border-nightshade-600 sm:mx-auto lg:my-8" />
  200. <div className="sm:flex sm:items-center sm:justify-between">
  201. <span className="text-center text-nightshade-100 md:text-start">
  202. Copyright © 2023 Mastodon gGmbH.{" "}
  203. <Link
  204. href="/trademark"
  205. className="border-nightshade-600 hover:underline sm:ml-4 sm:border-l sm:pl-4"
  206. >
  207. <FormattedMessage
  208. id="nav.trademark_policy.title"
  209. defaultMessage="Trademark Policy"
  210. />
  211. </Link>
  212. <span aria-hidden>{" • "}</span>
  213. <Link href="/privacy-policy" className="hover:underline">
  214. <FormattedMessage
  215. id="nav.privacy_policy.title"
  216. defaultMessage="Privacy Policy"
  217. />
  218. </Link>
  219. <span aria-hidden>{" • "}</span>
  220. <Link
  221. href="https://joinmastodon.instatus.com"
  222. className="hover:underline"
  223. >
  224. <FormattedMessage id="nav.status.title" defaultMessage="Status" />
  225. </Link>
  226. </span>
  227. <div className="mt-4 flex justify-center space-x-2 md:mt-0 md:space-x-6">
  228. <a
  229. href="https://mastodon.social/@Mastodon"
  230. rel="me"
  231. className="text-nightshade-100 hover:text-nightshade-50"
  232. >
  233. <LogoWhite className="h-5 w-5" fill="currentColor" />
  234. <span className="sr-only">
  235. <FormattedMessage
  236. id="footer.follow_us_on_mastodon"
  237. defaultMessage="Follow us on Mastodon"
  238. />
  239. </span>
  240. </a>
  241. <a
  242. href="https://github.com/mastodon"
  243. rel="me"
  244. className="text-nightshade-100 hover:text-nightshade-50"
  245. >
  246. <GitHub className="h-5 w-5" fill="currentColor" />
  247. <span className="sr-only">GitHub</span>
  248. </a>
  249. </div>
  250. </div>
  251. </nav>
  252. </footer>
  253. )
  254. export default Footer