Repository navigation
Expand file tree
/
Copy pathTeam.astro
More file actions
125 lines (111 loc) · 2.82 KB
/
Copy pathTeam.astro
File metadata and controls
125 lines (111 loc) · 2.82 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
import 'remixicon/fonts/remixicon.css';
import authors from '../content/docs/about/authors.json';
import { avatarUrl } from '../utils/avatar';
const links = [
['github', 'GitHub', 'ri-github-fill'],
['linkedin', 'LinkedIn', 'ri-linkedin-box-fill'],
['twitter', 'X (Twitter)', 'ri-twitter-x-line'],
['orcid', 'ORCID', 'ri-graduation-cap-fill'],
['personnal-website', 'Website', 'ri-global-fill'],
] as const;
---
<ul class="team not-content">
{Object.values(authors).map((author: any) => (
<li class="card">
<img src={avatarUrl(author)} alt="" loading="lazy" />
<h3>{author.name}</h3>
<p class="role">{author.role}</p>
{author.bio && author.bio !== author.role && <p class="bio" set:html={author.bio} />}
<div class="links">
{links.filter(([key]) => author[key]).map(([key, label, icon]) => (
<a href={author[key]} target="_blank" rel="noopener noreferrer" title={label} aria-label={`${author.name} on ${label}`}>
<i class={icon} aria-hidden="true"></i>
</a>
))}
</div>
</li>
))}
</ul>
<style>
.team {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
gap: 1rem;
list-style: none;
padding: 0;
margin: 1.5rem 0 0;
}
.card {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 1.5rem 1.25rem 1.25rem;
border: 1px solid var(--sl-color-hairline);
border-top: 3px solid var(--sl-color-accent);
border-radius: 0.5rem;
background: var(--sl-color-bg-nav);
transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
border-color: var(--sl-color-accent);
box-shadow: var(--sl-shadow-md);
}
img {
width: 6rem;
height: 6rem;
margin: 0 0 1rem;
object-fit: cover;
border-radius: 50%;
border: 2px solid var(--sl-color-accent-low);
background: var(--sl-color-gray-6) !important;
}
h3 {
margin: 0;
font-size: var(--sl-text-lg);
font-weight: 600;
line-height: 1.35;
color: var(--sl-color-white);
}
.role {
margin: 0.25rem 0 0;
font-size: var(--sl-text-sm);
color: var(--sl-color-text-accent);
}
.bio {
margin: 0.5rem 0 0;
font-size: var(--sl-text-xs);
color: var(--sl-color-gray-3);
}
.bio :global(a) {
color: var(--sl-color-gray-2);
}
.bio :global(a:hover) {
color: var(--sl-color-text-accent);
}
.links {
display: flex;
gap: 0.5rem;
margin-top: auto;
padding-top: 1rem;
}
.links a {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border: 1px solid var(--sl-color-gray-5);
border-radius: 0.375rem;
font-size: 1.1rem;
color: var(--sl-color-gray-2);
text-decoration: none;
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.links a:hover {
color: var(--sl-color-text-accent);
border-color: var(--sl-color-accent);
background: var(--sl-color-accent-low);
}
</style>