Skip to content

Commit 99c7251

Browse files
committed
docs: refactor and fix become sponsor button colors
1 parent 00dd266 commit 99c7251

File tree

3 files changed

+39
-38
lines changed

3 files changed

+39
-38
lines changed

packages/docs/.vitepress/theme/components/HomeSponsors.vue

+39-11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
<script setup lang="ts">
2+
import HomeSponsorsGroup from './HomeSponsorsGroup.vue'
3+
import sponsors from './sponsors.json'
4+
import { useData } from 'vitepress'
5+
6+
const { site } = useData()
7+
const translations = {
8+
en: 'Become a sponsor',
9+
'en-US': 'Become a Sponsor!',
10+
'zh-CN': '成为赞助者!',
11+
}
12+
</script>
13+
114
<template>
215
<div class="sponsors_outer">
316
<div>
@@ -24,20 +37,35 @@
2437
</div>
2538
</template>
2639

27-
<script setup lang="ts">
28-
import HomeSponsorsGroup from './HomeSponsorsGroup.vue'
29-
import sponsors from './sponsors.json'
30-
import { useData } from 'vitepress'
3140

32-
const { site } = useData()
33-
const translations = {
34-
en: 'Become a sponsor',
35-
'en-US': 'Become a Sponsor!',
36-
'zh-CN': '成为赞助者!',
41+
<style scoped>
42+
.become-sponsor {
43+
font-size: 0.9em;
44+
font-weight: 700;
45+
width: auto;
46+
text-align: center;
47+
background-color: transparent;
48+
padding: 0.75em 2em;
49+
border-radius: 2em;
50+
transition: all 0.30s ease;
51+
box-sizing: border-box;
52+
border: 2px solid var(--vp-c-brand-1);
53+
text-decoration: none;
54+
}
55+
56+
.become-sponsor:hover {
57+
background-color: var(--vp-c-brand);
58+
border-color: var(--vp-c-brand);
59+
color: var(--vp-button-brand-text) !important;
60+
}
61+
62+
.sponsors-top .become-sponsor {
63+
font-size: 0.75em;
64+
padding: 0.2em;
65+
width: auto;
66+
max-width: 150px;
3767
}
38-
</script>
3968
40-
<style scoped>
4169
.sponsors_outer {
4270
text-align: center;
4371
padding: 35px 40px 45px;

packages/docs/.vitepress/theme/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import AsideSponsors from './components/AsideSponsors.vue'
55
// import HomeSponsors from './components/HomeSponsors.vue'
66
import TranslationStatus from 'vitepress-translation-helper/ui/TranslationStatus.vue'
77
import './styles/vars.css'
8-
import './styles/sponsors.css'
98
import VueSchoolLink from './components/VueSchoolLink.vue'
109
import VueMasteryLogoLink from './components/VueMasteryLogoLink.vue'
1110
import status from '../translation-status.json'

packages/docs/.vitepress/theme/styles/sponsors.css

-26
This file was deleted.

0 commit comments

Comments
 (0)