added "url" to metadata and "try" link on project page

This commit is contained in:
Oliver Bryan
2025-09-28 20:56:36 +01:00
parent c4501c2022
commit 3df7e1b432
2 changed files with 33 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ export interface Props {
date: string;
slug: string;
image?: string | null;
url?: string;
hidden: boolean;
};
}
@@ -15,9 +16,25 @@ export interface Props {
const { metadata } = Astro.props;
---
<style>
a {
text-decoration: none;
border-bottom: 1px solid var(--ayu-blue-500);
color: var(--ayu-blue-500);
transition:
color 0.1s,
border-color 0.1s;
margin-bottom: 16px;
}
a:hover {
color: var(--ayu-blue-600);
border-color: var(--ayu-blue-600);
}
</style>
<Layout currentPage="projects">
<div class="text-md">
<h1 class="text-xl text-ayu-accent mb-2">
<h1 class="text-2xl text-ayu-accent mb-2">
{metadata.title}
</h1>
@@ -33,6 +50,19 @@ const { metadata } = Astro.props;
)
}
{
metadata.url ? (
<a
href={metadata.url}
target="_blank"
rel="noopener noreferrer"
class="inline-block text-sm"
>
Try {metadata.title}
</a>
) : null
}
<slot />
<p class="text-sm text-ayu-gutter mt-4">{metadata.date}</p>