Skip to content

Commit 0c1277c

Browse files
authored
refactor: clean up footer (#1342)
Clean up footer to use shared theme's footer instead of recreating it There should be no user changes Co-authored-by: mdong1909 <mdong1909@users.noreply.github.com>
1 parent a058939 commit 0c1277c

File tree

2 files changed

+30
-118
lines changed

2 files changed

+30
-118
lines changed

docs/.vitepress/config.mts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,28 @@ export default extendConfig(
179179
search: {
180180
provider: 'local',
181181
},
182+
183+
footer: {
184+
copyright: ${new Date().getFullYear()} VoidZero Inc. and Vite+ contributors.`,
185+
nav: [
186+
{
187+
title: "Company",
188+
items: [
189+
{ text: "VoidZero", link: "https://voidzero.dev" },
190+
{ text: "Vite", link: "https://vite.dev" },
191+
{ text: "Vitest", link: "https://vitest.dev" },
192+
{ text: "Rolldown", link: "https://rolldown.rs" },
193+
{ text: "Oxc", link: "https://oxc.rs" },
194+
],
195+
},
196+
],
197+
social: [
198+
{ icon: "github", link: "https://github.com/voidzero-dev/vite-plus" },
199+
{ icon: "x", link: "https://x.com/voidzerodev" },
200+
{ icon: "discord", link: "https://discord.gg/cC6TEVFKSx" },
201+
{ icon: "bluesky", link: "https://bsky.app/profile/voidzero.dev" },
202+
],
203+
}
182204
},
183205
transformHead({ page, pageData }) {
184206
const url = 'https://viteplus.dev/' + page.replace(/\.md$/, '').replace(/index$/, '');

docs/.vitepress/theme/components/Footer.vue

Lines changed: 8 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -6,129 +6,19 @@
66
sponsorLink="https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md"
77
/>
88
<section class="wrapper">
9-
<div
10-
class="bg-wine bg-[url(/cta-background.jpg)] bg-cover py-16 md:py-30 px-5 md:px-0 overflow-clip flex flex-col items-center justify-center gap-8 md:gap-12"
11-
>
12-
<h2 class="text-white w-full md:w-2xl text-center text-balance">
13-
Take your team's productivity to the next level with Vite+
14-
</h2>
15-
<div class="flex items-center gap-5">
16-
<a href="/guide" target="_self" class="button button--white">Get started</a>
17-
</div>
18-
</div>
19-
<div
20-
class="px-5 md:px-24 pt-10 md:pt-16 pb-16 md:pb-30 flex flex-col md:flex-row gap-10 md:gap-0 md:justify-between"
21-
>
22-
<div>
23-
<p class="text-grey text-xs font-mono uppercase tracking-wide mb-8">Company</p>
24-
<ul class="flex flex-col gap-3">
25-
<li>
26-
<a
27-
href="https://voidzero.dev/"
28-
target="_blank"
29-
rel="noopener noreferrer"
30-
class="text-white text-base"
31-
>VoidZero</a
32-
>
33-
</li>
34-
<li>
35-
<a
36-
href="https://vite.dev/"
37-
target="_blank"
38-
rel="noopener noreferrer"
39-
class="text-white text-base"
40-
>Vite</a
41-
>
42-
</li>
43-
<li>
44-
<a
45-
href="https://vitest.dev/"
46-
target="_blank"
47-
rel="noopener noreferrer"
48-
class="text-white text-base"
49-
>Vitest</a
50-
>
51-
</li>
52-
<li>
53-
<a
54-
href="https://rolldown.rs/"
55-
target="_blank"
56-
rel="noopener noreferrer"
57-
class="text-white text-base"
58-
>Rolldown</a
59-
>
60-
</li>
61-
<li>
62-
<a
63-
href="https://oxc.rs/"
64-
target="_blank"
65-
rel="noopener noreferrer"
66-
class="text-white text-base"
67-
>Oxc</a
68-
>
69-
</li>
70-
</ul>
71-
</div>
72-
<div>
73-
<p class="text-grey text-xs font-mono uppercase tracking-wide mb-8">Social</p>
74-
<ul class="flex flex-col gap-3">
75-
<li>
76-
<a
77-
href="https://github.com/voidzero-dev"
78-
target="_blank"
79-
rel="noopener noreferrer"
80-
class="text-white text-base flex gap-3 items-center"
81-
><Icon icon="simple-icons:github" aria-label="GitHub" class="size-[18px]" />
82-
GitHub</a
83-
>
84-
</li>
85-
<li>
86-
<a
87-
href="https://x.com/voidzerodev"
88-
target="_blank"
89-
rel="noopener noreferrer"
90-
class="text-white text-base flex gap-3 items-center"
91-
><Icon icon="simple-icons:x" aria-label="X" class="size-[18px]" />X.com</a
92-
>
93-
</li>
94-
<li>
95-
<a
96-
href="https://discord.gg/cC6TEVFKSx"
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
class="text-white text-base flex gap-3 items-center"
100-
><Icon
101-
icon="simple-icons:discord"
102-
aria-label="Discord"
103-
class="size-[18px]"
104-
/>Discord</a
105-
>
106-
</li>
107-
<li>
108-
<a
109-
href="https://bsky.app/profile/voidzero.dev"
110-
target="_blank"
111-
rel="noopener noreferrer"
112-
class="text-white text-base flex gap-3 items-center"
113-
><Icon icon="simple-icons:bluesky" aria-label="Bluesky" class="size-[18px]" />
114-
Bluesky</a
115-
>
116-
</li>
117-
</ul>
118-
</div>
119-
</div>
120-
</section>
121-
<section class="wrapper wrapper--ticks border-t py-5 px-5 md:px-24">
122-
<p class="text-sm">
123-
© {{ new Date().getFullYear() }} VoidZero Inc.
124-
<span class="hidden sm:inline">All Rights Reserved.</span>
125-
</p>
9+
<Footer
10+
heading="Take your team's productivity to the next level with Vite+"
11+
subheading=" "
12+
button-text="Get started"
13+
button-link="/guide"
14+
/>
12615
</section>
12716
</footer>
12817
</template>
12918

13019
<style scoped></style>
13120
<script setup lang="ts">
13221
import Sponsors from '@components/oss/Sponsors.vue';
133-
import { Icon } from '@iconify/vue';
22+
import Footer from "@components/oss/Footer.vue";
23+
13424
</script>

0 commit comments

Comments
 (0)