Add contact to the website, fix some small things

This commit is contained in:
itsfinniii
2026-03-28 15:38:55 +01:00
parent 5476783e0c
commit ad25836de7
6 changed files with 41 additions and 6 deletions

View File

@@ -0,0 +1,35 @@
---
import { getImageUrl } from '@/lib/images';
import { markdownToHtml } from '@/lib/markdown';
import { Image } from 'astro:assets';
interface Props {
contact: ContactComponent;
}
const contact = Astro.props.contact;
---
<div
id={`contact-${contact.id}`}
class="flex lg:flex-row flex-col lg:justify-center justify-center items-center py-12 px-12 lg:container mx-auto gap-y-8 lg:gap-x-28 gap-x-18 lg:text-left text-center"
>
<div class="flex flex-col gap-1.5">
<h2 class="text-5xl font-bold">{contact.title}</h2>
<div set:html={markdownToHtml(contact.text)}></div>
</div>
<div class="flex flex-col gap-2">
{ contact.methods.map((method) => (
<a href={method.url} target="_blank" style={{ "--sc": method.color }} class="flex flex-row items-center gap-2 text-lg hover:text-(--sc) duration-200">
<Image
src={method.icon.url}
alt={method.title}
width="30"
height="30"
/>
<span>{method.title}</span>
</a>
)) }
</div>
</div>