Skip to content

Commit b8a5d20

Browse files
committed
feature: update styles for language and details
1 parent f1850df commit b8a5d20

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

src/.vitepress/components/TeamCard.vue

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,20 @@ const imageAlt = computed(() => {
3131
{{ profile.title }}
3232
<span v-if="profile.company">@ {{ profile.company }}</span>
3333
</p>
34-
<address>{{ profile.location.label }}</address>
35-
<ul>
36-
<li v-for="language in profile.languageList">
37-
{{ language }}
38-
</li>
39-
</ul>
40-
<a :href="profile.website.url">{{ profile.website.label }}</a>
34+
<div class="member-details">
35+
<address>{{ profile.location.label }}</address>
36+
<h4 class="sr-only">Languages</h4>
37+
<ul class="member-language-list">
38+
<li
39+
v-for="language in profile.languageList"
40+
:key="`${profile.name}-language-${language}`"
41+
class="member-language"
42+
>
43+
{{ language }}
44+
</li>
45+
</ul>
46+
<a :href="profile.website.url">{{ profile.website.label }}</a>
47+
</div>
4148
<ul class="member-social-list">
4249
<li
4350
v-for="(handle, platform) in profile.social"
@@ -62,6 +69,17 @@ const imageAlt = computed(() => {
6269
</template>
6370

6471
<style scoped>
72+
.sr-only {
73+
position: absolute;
74+
width: 1px;
75+
height: 1px;
76+
padding: 0;
77+
margin: -1px;
78+
overflow: hidden;
79+
clip: rect(0, 0, 0, 0);
80+
border: 0;
81+
}
82+
6583
.team-card {
6684
--grid-column: 32px;
6785
display: grid;
@@ -77,6 +95,27 @@ const imageAlt = computed(() => {
7795
margin: 0;
7896
}
7997
98+
.member-details {
99+
display: grid;
100+
grid-row-templates: repeat(4, 1fr);
101+
grid-row-gap: 4px;
102+
margin: 20px 0;
103+
}
104+
105+
.member-language {
106+
margin-right: 34px;
107+
}
108+
109+
.member-language:first-child:before {
110+
display: none;
111+
}
112+
113+
.member-language-list {
114+
margin: 0;
115+
padding: 0;
116+
display: flex;
117+
}
118+
80119
.member-profile-image {
81120
width: 80px;
82121
height: 80px;

src/about/team.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"location": {
88
"label": "New Jersey, NJ, USA"
99
},
10-
"languageList": ["Chinese", "English"],
10+
"languageList": ["中文", "English"],
1111
"website": {
1212
"label": "patreon.com/evanyou",
1313
"url": "https://www.patreon.com/evanyou"

0 commit comments

Comments
 (0)