v5 migration + remove i18n

This commit is contained in:
nico 2024-12-29 12:33:22 +01:00
parent b7ce5b7f20
commit b2b6887fdf
Signed by: Nicolas
SSH key fingerprint: SHA256:ELi8eDeNLl5PTn64G+o2Kx5+XVDfHF5um2tZigfwWkM
84 changed files with 1258 additions and 1354 deletions

View file

@ -1,21 +1,19 @@
---
const locale = Astro.currentLocale;
import '../styles/style.css'
import "../styles/style.css";
import Head from '../components/Head.astro'
import Header from '../components/Header.astro'
import Footer from '../components/Footer.astro'
import Head from "../components/Head.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
const { pageTitle } = Astro.props;
const { pageTitle, locale } = Astro.props
---
<html lang={locale} dir="ltr">
<html lang={locale} dir='ltr'>
<Head pageTitle={pageTitle} />
<body>
<div class="wrapper">
<div class='wrapper'>
<Header />
<main id="skip-content" role="main">
<main id='skip-content' role='main'>
<slot />
</main>
</div>

View file

@ -2,14 +2,15 @@
import BaseLayout from '../layouts/BaseLayout.astro'
import { getLangFromUrl, useTranslations } from '../utils/i18n'
const locale = getLangFromUrl(Astro.url)
const t = useTranslations(locale)
const { frontmatter, image, title } = Astro.props
const locale = frontmatter.locale
const publishedDate = new Date(frontmatter.pubDate)
const localizedDate = new Intl.DateTimeFormat(locale, {
dateStyle: 'long'
}).format(publishedDate)
const t = useTranslations(locale)
---
<BaseLayout pageTitle={title}>