Files
NexStudio/src/pages/dove-siamo.astro
Javaxman 04a1892c0d Completa le traduzioni EN/TH e corregge sezioni home ancora solo in italiano.
Stats e prodotti non usavano il locale, quindi dopo lo switch lingua lo scroll mostrava ancora l'italiano.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 23:53:46 +02:00

38 lines
931 B
Plaintext

---
import SubpageLayout from '../layouts/SubpageLayout.astro';
import type { SupportedLocale } from '../data/home/navigation';
import { getDoveSiamo } from '../data/dove-siamo';
const path = Astro.url.pathname;
const localeMatch = path.match(/^\/(en|th)(\/|$)/);
const currentLocale = (localeMatch?.[1] ?? 'it') as SupportedLocale;
const doveSiamo = getDoveSiamo(currentLocale);
const { page, sections } = doveSiamo;
---
<SubpageLayout
title={page.title}
description={page.description}
heading={page.heading}
lead={page.lead}
>
{
sections.map((s) => (
<>
<h2>{s.title}</h2>
{s.paragraphs.map((p) =>
s.locationLine ? (
<p>
<strong>{p.split(' — ')[0]}</strong>
{' — '}
<strong>{p.split(' — ')[1]}</strong>
</p>
) : (
<p>{p}</p>
),
)}
</>
))
}
</SubpageLayout>