Skip to content

Commit e4b5026

Browse files
wangxiaoyyx990803
authored andcommitted
fix: Fix the in-document advertising styles.
1 parent ca478f1 commit e4b5026

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/.vitepress/theme/AdComponent.vue

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@ import icon from './documate.vue'
33
</script>
44

55
<template>
6-
<a class="ad-component" target="_blank" href="https://documate.site/">
7-
<icon class="icon"/>
8-
<span>Embed AI chat in your VitePress using your own content. Open-source.</span>
9-
<span class="cta">Try now →</span>
10-
</a>
6+
<div class="ad-component">
7+
<a target="_blank" href="https://documate.site/">
8+
<icon class="icon"/>
9+
<span>Embed AI chat in your VitePress using your own content. Open-source.</span>
10+
<span class="cta">Try now →</span>
11+
</a>
12+
</div>
1113
</template>
1214

1315
<style scoped>
1416
.ad-component {
1517
margin-bottom: 2rem;
16-
padding: .65rem 1rem;
18+
padding: .5rem .85rem;
1719
border: 1px solid var(--vp-c-divider);
1820
border-radius: 4px;
19-
text-align: center;
20-
display: flex;
21-
align-items: center;
2221
text-decoration: none;
2322
color: var(--vp-c-text-2);
2423
transition: color 0.4s ease-in-out;
25-
font-size: 0.9rem;
24+
font-size: 0.8rem;
2625
}
2726
2827
.ad-component:hover {
2928
color: var(--vp-c-text-1);
3029
}
3130
3231
.ad-component .icon {
33-
width: 1rem;
34-
height: 1rem;
35-
margin-right: 0.45rem;
32+
display: inline-block;
33+
width: .75rem;
34+
height: .75rem;
35+
margin-right: 0.3rem;
3636
}
3737
3838
.ad-component .cta {
39-
margin-left: 0.2rem;
39+
margin-left: 0.3rem;
4040
text-decoration: underline;
4141
text-underline-offset: 2px;
4242
}

0 commit comments

Comments
 (0)