Seed from NAS prod snapshot 20260130-190531
This commit is contained in:
28
src/pages/atlas/[...slug].astro
Normal file
28
src/pages/atlas/[...slug].astro
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
import EditionLayout from "../../layouts/EditionLayout.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const entries = await getCollection("atlas");
|
||||
return entries.map((entry) => ({
|
||||
params: { slug: entry.slug },
|
||||
props: { entry },
|
||||
}));
|
||||
}
|
||||
|
||||
const { entry } = Astro.props;
|
||||
const { Content } = await entry.render();
|
||||
---
|
||||
|
||||
<EditionLayout
|
||||
title={entry.data.title}
|
||||
editionLabel="Atlas"
|
||||
editionKey="atlas"
|
||||
statusLabel="cartographie"
|
||||
statusKey="cartographie"
|
||||
level={entry.data.level}
|
||||
version={entry.data.version}
|
||||
>
|
||||
<h1>{entry.data.title}</h1>
|
||||
<Content />
|
||||
</EditionLayout>
|
||||
15
src/pages/atlas/index.astro
Normal file
15
src/pages/atlas/index.astro
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
import SiteLayout from "../../layouts/SiteLayout.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
const entries = await getCollection("atlas");
|
||||
entries.sort((a, b) => (a.data.order ?? 9999) - (b.data.order ?? 9999));
|
||||
---
|
||||
<SiteLayout title="Atlas archicratique">
|
||||
<h1>Atlas archicratique</h1>
|
||||
<ul>
|
||||
{entries.map((e) => (
|
||||
<li><a href={`/atlas/${e.slug}/`}>{e.data.title}</a></li>
|
||||
))}
|
||||
</ul>
|
||||
</SiteLayout>
|
||||
Reference in New Issue
Block a user