Render content of Text With Image component
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
import { markdownToHtml } from '@/lib/markdown';
|
||||||
import { Image } from 'astro:assets';
|
import { Image } from 'astro:assets';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -14,11 +15,11 @@ const imageSize = () => {
|
|||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id={`textwithimage-${textWithImage.id}`} class={`flex ${textWithImage.imageSide === "right" ? "flex-row" : "flex-row-reverse"} justify-between items-center py-20 px-12 container mx-auto gap-y-8 gap-x-18`}>
|
<div id={`textwithimage-${textWithImage.id}`} class={`flex ${textWithImage.imageSide === "right" ? "flex-row" : "flex-row-reverse"} justify-between items-center py-12 px-12 container mx-auto gap-y-8 gap-x-18`}>
|
||||||
<div class="flex flex-col gap-2.5 w-[50%]">
|
<div class="flex flex-col gap-2.5 w-[50%]">
|
||||||
<h2 class="text-5xl font-bold">{textWithImage.title}</h2>
|
<h2 class="text-5xl font-bold">{textWithImage.title}</h2>
|
||||||
{ textWithImage.text !== null && (
|
{ textWithImage.text !== null && (
|
||||||
<div>{textWithImage.text}</div>
|
<div set:html={markdownToHtml(textWithImage.text)}></div>
|
||||||
) }
|
) }
|
||||||
</div>
|
</div>
|
||||||
<div class="w-[50%]">
|
<div class="w-[50%]">
|
||||||
|
|||||||
Reference in New Issue
Block a user