From dc2b12403d8dad375bd6e32176ffead35863e96a Mon Sep 17 00:00:00 2001
From: Dariusz Niemczyk
Date: Fri, 4 Apr 2025 17:15:43 +0200
Subject: [PATCH] feat: add new pages texts
---
src/app/[locale]/page.tsx | 2 +-
src/app/[locale]/pages/[slug]/page.tsx | 8 ++
src/components/event-map.lazy.tsx | 2 +-
src/components/landing-page.tsx | 163 ++++++++++++++++++++++---
src/components/nav.tsx | 13 +-
src/i18n/translations.ts | 141 +++++++++++++--------
6 files changed, 248 insertions(+), 81 deletions(-)
diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx
index b711c17..d275f7e 100644
--- a/src/app/[locale]/page.tsx
+++ b/src/app/[locale]/page.tsx
@@ -12,6 +12,6 @@ export default async function Home(
const currentLocale = getLocale(locale)
const t = translations[currentLocale];
- return
+ return
}
diff --git a/src/app/[locale]/pages/[slug]/page.tsx b/src/app/[locale]/pages/[slug]/page.tsx
index 15ffbfc..d064e7e 100644
--- a/src/app/[locale]/pages/[slug]/page.tsx
+++ b/src/app/[locale]/pages/[slug]/page.tsx
@@ -37,6 +37,14 @@ export function generateStaticParams() {
locale: "en",
slug: "privacy",
},
+ {
+ locale: "pl",
+ slug: "rules",
+ },
+ {
+ locale: "en",
+ slug: "rules",
+ },
];
}
diff --git a/src/components/event-map.lazy.tsx b/src/components/event-map.lazy.tsx
index 2fc774e..5b8f391 100644
--- a/src/components/event-map.lazy.tsx
+++ b/src/components/event-map.lazy.tsx
@@ -20,7 +20,7 @@ export default function Map({ t }: {
/>
- {t.where.location}
+ {t.details.where.location}
diff --git a/src/components/landing-page.tsx b/src/components/landing-page.tsx
index 2baf9e0..b7932d4 100644
--- a/src/components/landing-page.tsx
+++ b/src/components/landing-page.tsx
@@ -12,6 +12,49 @@ import { MainpageNav } from './nav';
import { NewsletterPopup } from './newsletter-form';
import { useTheme } from "./providers";
import { Skeleton } from './ui/skeleton';
+import { Lang } from '@/i18n/locales';
+
+function Heading({ children }: { children: ReactElement | string }) {
+ return {children}
+}
+
+function Subheading({ children }: { children: ReactElement | string }) {
+ return {children}
+}
+
+function TinyHeading({ children }: { children: ReactElement | string }) {
+ return {children}
+}
+
+function TinyTextWrapper({ children }: { children: ReactElement }) {
+ return
+ {children}
+
+}
+
+
+function TextWrapper({ children }: { children: ReactElement }) {
+ return
+ {children}
+
+}
+
+function NewSection({
+ id,
+ children,
+ after
+}: {
+ id: string
+ children: ReactElement;
+ after?: ReactElement;
+}) {
+ return (
+
+ {children}
+ {after}
+
+ )
+}
function Section({
id,
@@ -143,11 +186,12 @@ const LazyLeafletMap = dynamic(() => import('./event-map.lazy'), {
})
export default function LandingPage(
- { t }: { t: Translations }
+ { t, currentLocale }: { t: Translations, currentLocale: Lang }
) {
const { theme } = useTheme()
+
return (
@@ -162,29 +206,110 @@ export default function LandingPage(
{t.hero.title}
{t.hero.subtitle}
-
{t.when.date}
-
+
{t.details.when.date}
+
+
+
-
} />
- {t.where.location}} after={} />
+
+ <>
+
+ {t.about.title}
+
+
+ {t.about.description}
+
+
+ {t.details.when.title}
+ {t.details.when.date}
+ {t.details.when.extra}
+
+
+ {t.details.where.title}
+ {t.details.where.location}
+
+
+ >
+
-
- {t.when.date}
- {t.when.extra}
>}
- />
- {t.tickets.status}} />
- {t.accommodation.description}} />
- {t.food.description}} />
-