blob: b34bcefd80a1d80feeb121f092dcfd8cfefad5c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
---
interface Props {
title: string;
body: string;
href: string;
language: string;
languageColor: string;
logoSrc?: string;
logoWidth?: string;
contribution?: string;
}
const { href, title, body, language, languageColor, logoSrc, logoWidth = '60%', contribution = 'Minor Contributions' } = Astro.props;
---
<li class="link-card">
<a href={href}>
{logoSrc && <img src={logoSrc} alt="Project Logo" style={{ maxWidth: logoWidth }} />}
<h2>{title}</h2>
<div class="language-container">
<span class="dot" style={{ backgroundColor: languageColor }}></span>
<span class="language">{language}</span>
</div>
<p>{body}</p>
<p>{contribution}</p>
</a>
</li>
<style>
.link-card {
list-style: none;
padding: 1px;
background-color: #23262d;
border-radius: 6px;
color: white;
}
.link-card > a {
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
padding: 2rem;
}
.link-card h2 {
margin: 0;
font-size: 1.25rem;
}
.link-card p {
margin-top: 0.5rem;
margin-bottom: 0;
}
.language-container {
display: flex;
align-items: center;
gap: 5px;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
</style>
|