diff --git a/apps/website/src/components/Footer.css b/apps/website/src/components/Footer.css index 1dafed348..ed0ec973b 100644 --- a/apps/website/src/components/Footer.css +++ b/apps/website/src/components/Footer.css @@ -5,17 +5,25 @@ footer { color: var(--muted-color); font-size: 0.8em; - .content-wrapper { + .row { display: flex; justify-content: space-between; align-items: center; flex-direction: column-reverse; gap: 2em; + margin-bottom: 1em; @media (min-width: 720px) { flex-direction: row; } } + + nav.languages { + flex-grow: 1; + justify-content: center; + display: flex; + gap: 1em; + } } .social-buttons { diff --git a/apps/website/src/components/Footer.tsx b/apps/website/src/components/Footer.tsx index 04033f565..8948ca779 100644 --- a/apps/website/src/components/Footer.tsx +++ b/apps/website/src/components/Footer.tsx @@ -5,18 +5,28 @@ import githubDiscussionsIcon from "../assets/boxicons/bx-discussion.svg?raw"; import matrixIcon from "../assets/boxicons/bx-message-dots.svg?raw"; import redditIcon from "../assets/boxicons/bx-reddit.svg?raw"; import { Link } from "./Button.js"; -import { t } from "../i18n"; +import { LOCALES, t } from "../i18n"; export default function Footer() { return ( ) diff --git a/apps/website/src/i18n.ts b/apps/website/src/i18n.ts index ecd1290c0..a3305a71c 100644 --- a/apps/website/src/i18n.ts +++ b/apps/website/src/i18n.ts @@ -17,7 +17,7 @@ export const LOCALES: Locale[] = [ { id: "pl", name: "Polski" }, { id: "es", name: "Español" }, { id: "ar", name: "اَلْعَرَبِيَّةُ", rtl: true }, -]; +].toSorted((a, b) => a.name.localeCompare(b.name)); i18next .use(HttpApi) diff --git a/apps/website/src/index.tsx b/apps/website/src/index.tsx index 595b99743..231b7326e 100644 --- a/apps/website/src/index.tsx +++ b/apps/website/src/index.tsx @@ -7,7 +7,6 @@ import { NotFound } from './pages/_404.jsx'; import Footer from './components/Footer.js'; import GetStarted from './pages/GetStarted/get-started.js'; import SupportUs from './pages/SupportUs/SupportUs.js'; -import { LOCALES } from './i18n'; export function App(props: {repoStargazersCount: number}) { return ( @@ -36,17 +35,6 @@ export async function prerender(data) { // This ensures the GitHub API is not called on every page load in the client. const stargazersCount = await getRepoStargazersCount(); - const result = await ssr(); - console.log("Got links ", result.links); - const links: string[] = []; - for (const locale of LOCALES) { - for (const link of result.links?.values() ?? []) { - links.push(locale.id + link); - } - } - return { - ...result, - links - }; + return await ssr(); }