Merge pull request #5 from Bubobubobubobubo/pull

Addition : bouton retour
This commit is contained in:
Raphaël Forment
2024-02-10 00:56:11 +01:00
committed by GitHub
4 changed files with 12 additions and 9 deletions

View File

@ -2,10 +2,9 @@ import { fetchMarkdownArticles } from '$lib/utils';
import { json } from '@sveltejs/kit';
export const GET = async () => {
const allPosts = await fetchMarkdownArticles();
const sortedArticles = allPosts.sort((a, b) => {
return new Date(b.meta.date).getTime() - new Date(a.meta.date).getTime();
});
return json(sortedArticles);
const allPosts = await fetchMarkdownArticles();
const sortedArticles = allPosts.sort((a, b) => {
return new Date(b.meta.date).getTime() - new Date(a.meta.date).getTime();
});
return json(sortedArticles);
};

View File

@ -10,6 +10,8 @@
</div>
<div class="lg:px-12 content-center">
<svelte:component this={data.content} />
<p class="rounded-lg font-bold border-2 py-2 pl-2 mt-8 bg-neutral-800">
<a href="/articles">Revenir à l'index</a>
</p>
</div>
</article>

View File

@ -10,6 +10,8 @@
</div>
<div class="lg:px-24 md:px-12 content-center">
<svelte:component this={data.content} />
<p class="rounded-lg font-bold border-2 py-2 pl-2 mt-8 bg-neutral-800">
<a href="/guides">Revenir à l'index</a>
</p>
</div>
</article>