🌐 Adds language changing component
Gitea Build Action / build-astro (push) Successful in 9m27s

This commit is contained in:
2025-10-22 16:01:39 +02:00
parent c36d08a347
commit 1dd5e87765
5 changed files with 27 additions and 6 deletions
+7 -3
View File
@@ -2,6 +2,7 @@
import Layout from "../../layouts/Layout.astro";
import ArrowLink from "../../components/ArrowLink.astro"
import {useTranslations} from "../../i18n/utils.ts";
import LangChange from "../../components/LangChange.astro";
const now = new Date();
let years = now.getFullYear() - 2006 - 1;
@@ -11,12 +12,13 @@ if (now.getMonth() > 7 || (now.getMonth() === 7 && now.getDate() >= 23)) {
let a = years === 18 ? "an " : "a ";
const {lang} = Astro.params;
const t = useTranslations(lang as "en" | "sk");
const t = useTranslations(lang as "en" | "sk" | "de");
export function getStaticPaths() {
return [
{params: {lang: "en"}},
{params: {lang: "en"},},
{params: {lang: "sk"},},
{params: {lang: "de"},},
];
}
---
@@ -56,7 +58,9 @@ export function getStaticPaths() {
<div class="w-screen h-full flex items-center justify-start flex-col overflow-x-scroll">
<div class="w-1 h-10 shrink-0"/>
<main class="w-[90vw] sm:w-[80vw] md:w-[70vw] lg:w-[60vw] xl:w-[50vw] border-solid border-black border-1 p-3 shrink-0 overflow-auto">
<main class="w-[90vw] sm:w-[80vw] md:w-[70vw] lg:w-[60vw] xl:w-[50vw] border-solid border-black border-1 p-3 shrink-0 overflow-auto relative">
<LangChange/>
<p>{t("main.note.accessibility")}</p>
<div class="h-4"/>