Add Wall of Text component to website

This commit is contained in:
itsfinniii
2026-03-20 21:14:01 +01:00
parent a5efc7415b
commit 94aa8c356e
5 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
---
import { markdownToHtml } from "@/lib/markdown";
interface Props {
wallOfText: WallOfTextComponent;
}
const wallOfText = Astro.props.wallOfText;
console.log(markdownToHtml(wallOfText.text));
---
<div id={`walloftext-${wallOfText.id}`} class="flex flex-col py-12 px-12 container mx-auto gap-4">
<h2 class="text-5xl font-bold">{wallOfText.title}</h2>
<div set:html={markdownToHtml(wallOfText.text)}></div>
</div>

View File

@@ -1,6 +1,7 @@
---
import Hero from '../web/Hero.astro';
import TextWithImage from '../web/TextWithImage.astro';
import WallOfText from '../web/WallOfText.astro';
interface Props {
webpage: WebpageComponent[];
@@ -16,6 +17,7 @@ console.log(Astro.props.webpage);
<Fragment>
{ component.component === "Hero" && <Hero hero={component} /> }
{ component.component === "TextWithImage" && <TextWithImage textWithImage={component} /> }
{ component.component === "WallOfText" && <WallOfText wallOfText={component} /> }
</Fragment>
)) }
</div>