29 lines
874 B
Plaintext
29 lines
874 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;
|
|
---
|
|
|
|
<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 w-1/2 mr-4 mb-4 float-left"
|
|
/>
|
|
)
|
|
}
|
|
<h1 class="text-4xl mb-4">{resource?.content?.itemReviewed?.name || "Unknown Name"}</h1>
|
|
{ resource?.content?.reviewRating?.ratingValue !== undefined && <div>{resource?.content?.reviewRating?.ratingValue}</div>}
|
|
<div set:html={markdownToHtml(resource?.content?.reviewBody)} />
|
|
|
|
</div>
|