v5 migration + remove i18n
This commit is contained in:
parent
b7ce5b7f20
commit
b2b6887fdf
84 changed files with 1258 additions and 1354 deletions
|
@ -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>
|
||||
|
|
|
@ -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}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue