feat: display articles

This commit is contained in:
Max Richter
2025-10-22 17:17:34 +02:00
parent d57df62513
commit b6bee0df53
10 changed files with 121 additions and 47 deletions

View File

@@ -0,0 +1,25 @@
---
import * as memorium from "@helpers/memorium";
import { markdownToHtml, markdownToText } from "@helpers/markdown";
import Image from "@components/Image.astro";
const { resource } = Astro.props;
const ingredients = resource?.content?.recipeIngredient || [];
const instructions = resource?.content?.recipeInstructions || [];
---
<h1 class="text-4xl">{resource?.content?.headline}</h1>
<div>
{
resource?.content?.image && (
<Image
hash
src={{ src: memorium.getImageUrl(resource.content.image) }}
alt="Cover for {resource?.content?.name}"
class="rounded-2xl overflow-hidden"
pictureClass="rounded-2xl"
/>
)
}
</div>
<div set:html={markdownToHtml(resource?.content?.articleBody)} />