new projects page

This commit is contained in:
2025-09-14 14:11:26 -04:00
parent 0a8b6e69f1
commit b108762c60
11 changed files with 144 additions and 41 deletions
+54
View File
@@ -0,0 +1,54 @@
---
interface Props {
title?: string;
image?: ImageMetadata;
links?: {
label: string;
href: string;
newWindow?: boolean;
}[];
}
const { title, image, links } = Astro.props;
---
<div class="card">
{image && <img src={image.src} alt="" />}
<div>
{title && <h2>{title}</h2>}
<slot />
{
links &&
links.map((link) => (
<a
href={link.href}
target={link.newWindow ? '_blank' : '_self'}
rel="noopener noreferrer"
>
{link.label}
</a>
))
}
</div>
</div>
<style>
.card {
border: var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.card > div {
padding: 1rem;
}
h2 {
margin: 0;
}
img {
object-fit: cover;
max-width: 100%;
}
</style>
+4 -1
View File
@@ -7,7 +7,10 @@ const year = new Date().getFullYear();
<footer>
<div class="socials">
<a href="https://mastodon.social/@ghalldev" target="_blank"
<a
href="https://mastodon.social/@ghalldev"
target="_blank"
rel="noopener noreferrer"
><MastodonIcon class="mastodon-icon" width={20} height={20} /> Follow me on
Mastodon</a
>