Skip to content

Commit 704dc98

Browse files
authored
Merge pull request #51 from fResult/ui/link-card
feat: Create CardLink as a reusable component and improve accessibility…
2 parents 1518b56 + d0e379a commit 704dc98

File tree

4 files changed

+236
-221
lines changed

4 files changed

+236
-221
lines changed

src/components/CardLink.astro

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
interface Props {
3+
title: string
4+
url: string
5+
description: string
6+
languages?: string[]
7+
}
8+
9+
const { title, url, description, languages = [] } = Astro.props
10+
---
11+
12+
<div class="project-card group relative">
13+
<div class="grid gap-2">
14+
<a href={url} class="after:absolute after:inset-0 after:content-[''] after:focus:border-2 after:focus:transition-all focus:after:border-bosf/50 group-focus:scale-[1.01]">
15+
<h3 class="text-2xl font-medium transition-all">
16+
{title}
17+
</h3>
18+
</a>
19+
<p class="text-base">
20+
{description}
21+
</p>
22+
<!-- TODO: Languages display as tags -->
23+
{languages.length > 0 && <p>{languages.join(', ')}</p>}
24+
</div>
25+
</div>

0 commit comments

Comments
 (0)