feat: display articles

This commit is contained in:
Max Richter
2025-10-22 17:43:04 +02:00
parent b6bee0df53
commit 2b7b5bb12f
7 changed files with 14 additions and 18 deletions

View File

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