mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-08 10:43:38 +00:00
tags!
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user