This commit is contained in:
Oliver Bryan
2025-09-30 11:48:41 +01:00
parent 7104d2262f
commit e4b4e2b10f
9 changed files with 61 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ const {
slug,
isDevMode = false,
isHidden = false,
tags = [],
} = Astro.props;
---
@@ -44,6 +45,7 @@ const {
<a
href={`/projects/${slug}`}
class={`project-item block border-2 flex flex-col justify-between rounded-md ${isDevMode && isHidden ? "dev-hidden" : ""}`}
data-tags={tags.join(",")}
>
<div class="flex gap-4 p-4 pb-0">
<div class="w-16 h-16 flex-shrink-0">
@@ -66,6 +68,17 @@ const {
<p class="project-description text-sm">
{description}
</p>
{
tags && tags.length > 0 && (
<div class="flex gap-1.5 text-xs flex-wrap leading-3 items-center mb-1 no-select">
{tags.map((tag: string, idx: number) => (
<span class="flex items-center text-ayu-gutter font-500 rounded-md border border-ayu-gutter px-1.5 py-0.5">
{tag}
</span>
))}
</div>
)
}
</div>
</div>
<div class="w-full flex justify-end p-2 pt-1">

View File

@@ -11,6 +11,7 @@ export interface Props {
url?: string;
github?: string;
hidden: boolean;
tags?: string[];
};
}
@@ -85,6 +86,18 @@ const { metadata } = Astro.props;
}
</p>
{
metadata.tags && metadata.tags.length > 0 && (
<div class="flex gap-1.5 text-sm flex-wrap leading-3 items-center mb-2 no-select">
{metadata.tags.map((tag: string, idx: number) => (
<span class="flex items-center text-ayu-gutter font-500 rounded-md border border-ayu-gutter px-1.5 py-1">
{tag}
</span>
))}
</div>
)
}
{
metadata.url ? (
<a