feat: add international page and update card component

- Introduced a new international page with dynamic content loading.
- Updated Card component to display article date if available.
- Removed unused about and contact pages.
- Cleaned up package-lock.json by removing unnecessary dependencies.
This commit is contained in:
2024-10-27 11:38:23 +01:00
parent 97f2c1e828
commit ec05dd7445
14 changed files with 103 additions and 34 deletions

View File

@@ -0,0 +1,12 @@
import { items } from '$lib/international';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async () => ({
data: await Promise.all(
[...items.entries()].map(async ([path, load]) =>
load().then(({ metadata }) => ({ path, ...metadata }))
)
).then((data) =>
data.sort(({ date: a }, { date: z }) => new Date(z ?? 0).getTime() - new Date(a ?? 0).getTime())
)
});