refactor: use more generic resource system

This commit is contained in:
Max Richter
2025-10-06 00:30:44 +02:00
parent 210ed528f8
commit 97f9b0cbf7
17 changed files with 1375 additions and 1683 deletions

View File

@@ -1,64 +1,9 @@
---
import Layout from "@layouts/Layout.astro";
import HeroCard from "@components/HeroCard.astro";
const collection = "resources";
const wiki = {
id: "wiki",
collection,
body: "My knowledge base",
data: {
title: "Wiki",
icon: "🧠",
},
};
const articles = {
id: "Articles",
collection,
body: "Articles saved",
data: {
title: "Articles",
icon: "📰",
},
};
const recipes = {
id: "Recipes",
collection,
body: "Recipes",
data: {
title: "Recipes",
icon: "🍲",
},
};
const movies = {
id: "Movies",
collection,
body: "Movies",
data: {
title: "Movies",
icon: "🎥",
},
};
const series = {
id: "Series",
collection,
body: "Series",
data: {
title: "Series",
icon: "📺",
},
};
import { resources } from "./resources.ts";
---
<Layout title="Max Richter">
<HeroCard post={wiki} />
<HeroCard post={recipes} />
<HeroCard post={articles} />
<HeroCard post={movies} />
<HeroCard post={series} />
{resources.map((resource) => <HeroCard post={resource} />)}
</Layout>