Skip to content

Commit a766301

Browse files
committed
fix(semantics): modify the html structure for the user card component
1 parent fa3aa91 commit a766301

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

components/UserCard.vue

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,26 @@
1616

1717
<div class="block w-full pl-2 lg:px-3 mt-6 lg:mt-8">
1818
<div class="flex flex-col">
19-
<h3 class="full-name">{{ name }}</h3>
20-
<div>
19+
<span class="full-name">{{ name }}</span>
20+
<div class="w-max">
2121
<a :href="profileUrl" target="_blank" class="username-container">
2222
<img
23-
class="h-5 pr-1"
23+
class="pr-1"
2424
src="~assets/images/footer/icon-github.svg"
2525
alt="Github Account"
26-
width="auto"
26+
width="25"
2727
height="20"
2828
loading="lazy"
2929
/>
3030
{{ username }}</a
3131
>
3232
<span v-show="isJosaMember" class="josa-member">
3333
<img
34-
class="h-5 pr-1"
34+
class="pr-1"
3535
src="~/assets/images/stats/josa-icon.svg"
3636
alt="Logo"
37-
width="auto"
37+
width="25"
38+
height="20"
3839
loading="lazy"
3940
/>JOSA Member
4041
</span>
@@ -48,7 +49,9 @@
4849
<p class="blue">{{ score }}</p>
4950
</div>
5051
<div class="flex flex-col">
51-
<p class="counters">Contributions</p>
52+
<p class="counters">
53+
{{ countType === 'all' ? 'Contributions' : 'Commits' }}
54+
</p>
5255
<p class="blue-green">{{ contributions }}</p>
5356
</div>
5457
</div>
@@ -57,6 +60,7 @@
5760
</template>
5861

5962
<script>
63+
import { mapState } from 'vuex'
6064
export default {
6165
name: 'UserCard',
6266
props: {
@@ -69,6 +73,11 @@ export default {
6973
isJosaMember: { type: Boolean, default: false },
7074
rank: { type: Number, required: true, default: 0 },
7175
},
76+
computed: {
77+
...mapState({
78+
countType: 'countType',
79+
}),
80+
},
7281
}
7382
</script>
7483

0 commit comments

Comments
 (0)