i18n start + css start

This commit is contained in:
Nico 2022-12-02 17:29:11 +01:00
parent 688d794dc7
commit 15b825bd5d
40 changed files with 1062 additions and 33 deletions

View file

@ -0,0 +1,7 @@
{
"{route}": "blog",
"pageName": "Blog",
"pageName{cool:'yes'}": "Blog cools",
"pageName{cool:'no'}": "Blog nuls",
"trad": "hello english"
}

View file

@ -0,0 +1,6 @@
{
"pageName": "Articles",
"pageName{cool:'yes'}": "Articles cools",
"pageName{cool:'no'}": "Articles nuls",
"trad": "slt sava"
}

View file

@ -1,4 +1,6 @@
---
import { t, l } from "astro-i18n";
import "../../styles/style.css";
import BaseLayout from "../../layouts/BaseLayout.astro";
@ -6,11 +8,15 @@ import ContentPost from "../../components/ContentPost.astro";
const allPosts = await Astro.glob("./*.mdx");
const pageTitle = "Articles";
console.log(t("index.articles.pageName", { cool: "yes" }));
const pageTitle = t("index.articles.pageName");
const titleColor = "hotpink";
---
<BaseLayout pageTitle={pageTitle} titleColor={titleColor}>
<h2>{t("index.articles.pageName", { cool: "yes" }, "fr")}</h2>
<p>{t("index.articles.trad")}</p>
<ul>
{
allPosts.map((post) => (