25 lines
664 B
Plaintext
25 lines
664 B
Plaintext
---
|
|
import * as memorium from "@helpers/memorium";
|
|
import { markdownToHtml } from "@helpers/markdown";
|
|
import Image from "@components/Image.astro";
|
|
import type { ImageMetadata } from "astro";
|
|
|
|
const { resource } = Astro.props;
|
|
---
|
|
|
|
<h1 class="text-4xl">{resource?.content?.headline}</h1>
|
|
<div>
|
|
{
|
|
resource?.content?.image && (
|
|
<Image
|
|
hash
|
|
src={{ src: memorium.getImageUrl(resource.content.image) } as ImageMetadata}
|
|
alt="Cover for {resource?.content?.name}"
|
|
class="rounded-2xl overflow-hidden"
|
|
pictureClass="rounded-2xl"
|
|
/>
|
|
)
|
|
}
|
|
</div>
|
|
<div set:html={markdownToHtml(resource?.content?.articleBody)} />
|