Skip to content

Commit 1e36c39

Browse files
author
xuqingkai
committed
docs: ✏️ 修复更新vitepress至1.0.1后友情链接丢失logo的问题
1 parent da7684f commit 1e36c39

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

docs/.vitepress/theme/components/HomeFriendly.vue

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import VPFeature from 'vitepress/dist/client/theme-default/components/VPFeature.
55
66
const { data } = useFriendly()
77
8-
98
const links = computed(() => {
109
return data.value.length ? data.value : []
1110
})
@@ -27,8 +26,12 @@ const grid = computed(() => {
2726

2827
<div class="items">
2928
<div v-for="feature in links" :key="feature.title" class="item" :class="[grid]">
30-
<VPFeature :icon="{ src: feature.icon, height: '48px', width: 'auto' }" :title="feature.title"
31-
:details="feature.details" :link="feature.link" />
29+
<VPFeature
30+
:icon="{ src: feature.icon, height: '48px', width: 'auto' }"
31+
:title="feature.title"
32+
:details="feature.details"
33+
:link="feature.link"
34+
/>
3235
</div>
3336
</div>
3437
</div>
@@ -41,6 +44,21 @@ const grid = computed(() => {
4144
padding: 0 24px;
4245
}
4346
47+
:deep(.VPImage) {
48+
display: flex;
49+
justify-content: center;
50+
align-items: center;
51+
margin-bottom: 20px;
52+
border-radius: 6px;
53+
/* background-color: var(--vp-c-default-soft); */
54+
width: 48px;
55+
height: 48px;
56+
font-size: 24px;
57+
transition: background-color 0.25s;
58+
}
59+
60+
61+
4462
@media (min-width: 640px) {
4563
.VPFeatures {
4664
padding: 0 48px;
@@ -77,7 +95,6 @@ const grid = computed(() => {
7795
}
7896
7997
@media (min-width: 640px) {
80-
8198
.item.grid-2,
8299
.item.grid-4,
83100
.item.grid-6 {
@@ -86,7 +103,6 @@ const grid = computed(() => {
86103
}
87104
88105
@media (min-width: 768px) {
89-
90106
.item.grid-2,
91107
.item.grid-4 {
92108
width: calc(100% / 2);
@@ -104,4 +120,3 @@ const grid = computed(() => {
104120
}
105121
}
106122
</style>
107-

0 commit comments

Comments
 (0)