File tree Expand file tree Collapse file tree 2 files changed +34
-6
lines changed Expand file tree Collapse file tree 2 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1
1
<script setup>
2
2
import { computed , defineProps } from ' vue'
3
+ import { VTIconGitHub , VTIconTwitter } from ' @vue/theme'
3
4
4
5
const props = defineProps ({
5
6
profile: {
@@ -37,13 +38,22 @@ const imageAlt = computed(() => {
37
38
</li >
38
39
</ul >
39
40
<a :href =" profile.website.url" >{{ profile.website.label }}</a >
40
- <ul >
41
+ <ul class = " member-social-list " >
41
42
<li
42
43
v-for =" (handle, platform) in profile.social"
43
44
:key =" `${platform}-${handle}`"
45
+ class =" member-social-item"
44
46
>
45
47
<a :href =" `https://www.${platform}.com/${handle}`" >
46
- {{ platform }}: {{ handle }}
48
+ <VTIconGitHub
49
+ v-if =" platform === 'github'"
50
+ class =" member-social-icon"
51
+ />
52
+ <VTIconTwitter
53
+ v-else-if =" platform === 'twitter'"
54
+ class =" member-social-icon"
55
+ />
56
+ <span v-else > {{ platform }}: {{ handle }} </span >
47
57
</a >
48
58
</li >
49
59
</ul >
@@ -72,4 +82,22 @@ const imageAlt = computed(() => {
72
82
height : 80px ;
73
83
border-radius : 50% ;
74
84
}
85
+
86
+ .member-social-icon {
87
+ width : 24px ;
88
+ height : 24px ;
89
+ fill : rgba (60 , 60 , 60 , 0.6 );
90
+ margin-right : 14px ;
91
+ }
92
+
93
+ .member-social-item :before {
94
+ /* Override list bullet which exists in
95
+ .vt-doc ul > li:before */
96
+ display : none ;
97
+ }
98
+
99
+ .member-social-list {
100
+ padding : 0 ;
101
+ display : flex ;
102
+ }
75
103
</style >
Original file line number Diff line number Diff line change 13
13
"url" : " https://www.patreon.com/evanyou"
14
14
},
15
15
"social" : {
16
- "twitter " : " youyuxi " ,
17
- "github " : " yyx990803 "
16
+ "github " : " yyx990803 " ,
17
+ "twitter " : " youyuxi "
18
18
}
19
19
},
20
20
{
31
31
"url" : " https://www.bencodezen.io"
32
32
},
33
33
"social" : {
34
- "twitter " : " bencodezen" ,
35
- "github " : " bencodezen"
34
+ "github " : " bencodezen" ,
35
+ "twitter " : " bencodezen"
36
36
}
37
37
}
38
38
]
You can’t perform that action at this time.
0 commit comments