dep update + veille
This commit is contained in:
parent
ff0ba456a9
commit
b602b45c05
13 changed files with 1052 additions and 810 deletions
7
src/pages/en/veille/index.astro
Normal file
7
src/pages/en/veille/index.astro
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
import Page from "../../veille/index.astro"
|
||||
|
||||
const { props } = Astro
|
||||
---
|
||||
|
||||
<Page {...props} />
|
|
@ -66,17 +66,16 @@ const pageTitle = t("sitemap");
|
|||
<a href={l("/references")}>{t("references.titre")}</a>
|
||||
</h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2>
|
||||
<a href={l("/veille")}>{t("veille.titre")}</a>
|
||||
</h2>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</BaseLayout>
|
||||
|
||||
<style>
|
||||
/* :link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
:link:hover {
|
||||
text-decoration: none;
|
||||
} */
|
||||
h2 {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
|
4
src/pages/veille/i18n/en.json
Normal file
4
src/pages/veille/i18n/en.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"pageName": "External stuff",
|
||||
"subtitle": "Links, articles, videos…"
|
||||
}
|
4
src/pages/veille/i18n/fr.json
Normal file
4
src/pages/veille/i18n/fr.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"pageName": "Veille",
|
||||
"subtitle": "Des liens, des articles, des vidéos… en vrac."
|
||||
}
|
43
src/pages/veille/index.astro
Normal file
43
src/pages/veille/index.astro
Normal file
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
import { t, astroI18n } from "astro-i18n";
|
||||
astroI18n.init(Astro);
|
||||
|
||||
const pageTitle = t("index.veille.pageName");
|
||||
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
import MetaDate from "../../components/MetaDate.astro";
|
||||
|
||||
// get all content
|
||||
const allSections = await Astro.glob("../../data/veille/**/*.md");
|
||||
// only keep the right locale version
|
||||
const localizedSections = allSections.filter((section) => {
|
||||
return section.frontmatter.lang === astroI18n.langCode;
|
||||
});
|
||||
---
|
||||
|
||||
<BaseLayout pageTitle={pageTitle}>
|
||||
<section class="region flow">
|
||||
<h1>{pageTitle}</h1>
|
||||
<p>{t("index.veille.subtitle")}</p>
|
||||
</section>
|
||||
|
||||
{
|
||||
localizedSections.map((section) => (
|
||||
<section class="flow content">
|
||||
<h2>{section.frontmatter.title}</h2>
|
||||
<MetaDate item={section.frontmatter} />
|
||||
<section.Content />
|
||||
</section>
|
||||
))
|
||||
}
|
||||
</BaseLayout>
|
||||
|
||||
<style>
|
||||
.content :global(ul > li) {
|
||||
padding-block: var(--space-m);
|
||||
}
|
||||
.content :global(ul > li + li) {
|
||||
margin: 0;
|
||||
border-top: 1px solid var(--color-brique);
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue