Skip to content

Commit cf0e522

Browse files
mdong1909CopilotBrooooooklyn
authored
fix(docs): update marketing page to make vite+ oss (#669)
Changes to docs home page: - CTA button → get started to docs - Animation → down to bottom above footer. - Bring up terminal as hero image - Remove “everything you love about vite” section - Remove enterprise section - Remove pricing. Replace with free & open source --------- Co-authored-by: mdong1909 <mdong1909@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> Co-authored-by: LongYinan <lynweklm@gmail.com>
1 parent d8fe16b commit cf0e522

5 files changed

Lines changed: 34 additions & 61 deletions

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<template>
22
<footer class="bg-primary" data-theme="dark">
3+
<Sponsors
4+
description="Vite+ is free and open source, made possible by a full-time team and passionate open-source contributors."
5+
sponsorLinkText="Contribute"
6+
sponsorLink="https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md"
7+
/>
38
<section class="wrapper">
49
<div
510
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"
@@ -121,4 +126,6 @@
121126
</template>
122127

123128
<style scoped></style>
124-
<script setup lang="ts"></script>
129+
<script setup lang="ts">
130+
import Sponsors from '@components/oss/Sponsors.vue';
131+
</script>

docs/.vitepress/theme/components/home/Hero.vue

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -26,64 +26,8 @@
2626
</div>
2727
</div>
2828
</div>
29-
<div class="wrapper md:border-none mt-10 md:mt-0">
30-
<RiveAnimation
31-
:desktop-src="homepageAnimation"
32-
:mobile-src="homepageAnimationMobile"
33-
:desktop-width="1280"
34-
:desktop-height="580"
35-
:mobile-width="253"
36-
:mobile-height="268"
37-
canvas-class="w-full"
38-
/>
39-
</div>
4029
</template>
4130

42-
<script setup lang="ts">
43-
import RiveAnimation from '@components/shared/RiveAnimation.vue';
44-
import homepageAnimation from '@local-assets/animations/1280_x_580_vite+_masthead.riv';
45-
import homepageAnimationMobile from '@local-assets/animations/253_x_268_vite+_masthead_mobile.riv';
46-
47-
const smoothScrollTo = (e: Event, targetId: string) => {
48-
e.preventDefault();
49-
e.stopPropagation();
50-
51-
const element = document.getElementById(targetId);
52-
if (!element) {
53-
return;
54-
}
55-
56-
const elementPosition = element.getBoundingClientRect().top + window.scrollY;
57-
const offsetPosition = elementPosition;
58-
59-
// Custom smooth scroll with requestAnimationFrame
60-
const startPosition = window.scrollY;
61-
const distance = offsetPosition - startPosition;
62-
const duration = 800; // ms
63-
let startTime: number | null = null;
64-
65-
const animation = (currentTime: number) => {
66-
if (startTime === null) {
67-
startTime = currentTime;
68-
}
69-
const timeElapsed = currentTime - startTime;
70-
const progress = Math.min(timeElapsed / duration, 1);
71-
72-
// Easing function (easeInOutCubic)
73-
const ease =
74-
progress < 0.5 ? 4 * progress * progress * progress : 1 - Math.pow(-2 * progress + 2, 3) / 2;
75-
76-
window.scrollTo(0, startPosition + distance * ease);
77-
78-
if (progress < 1) {
79-
requestAnimationFrame(animation);
80-
}
81-
};
82-
83-
requestAnimationFrame(animation);
84-
};
85-
</script>
86-
8731
<style scoped>
8832
.shine-text {
8933
background: linear-gradient(
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div class="wrapper md:border-none mt-10 md:mt-0">
3+
<RiveAnimation
4+
:desktop-src="homepageAnimation"
5+
:mobile-src="homepageAnimationMobile"
6+
:desktop-width="1280"
7+
:desktop-height="580"
8+
:mobile-width="253"
9+
:mobile-height="268"
10+
canvas-class="w-full"
11+
/>
12+
</div>
13+
</template>
14+
15+
<script setup lang="ts">
16+
import RiveAnimation from '@components/shared/RiveAnimation.vue';
17+
import homepageAnimation from '@local-assets/animations/1280_x_580_vite+_masthead.riv';
18+
import homepageAnimationMobile from '@local-assets/animations/253_x_268_vite+_masthead_mobile.riv';
19+
</script>

docs/.vitepress/theme/components/home/Terminal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ onUnmounted(() => {
118118
]"
119119
style="transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1)"
120120
>
121-
<TabsTrigger value="tab1"> new </TabsTrigger>
121+
<TabsTrigger value="tab1"> create </TabsTrigger>
122122
<TabsTrigger value="tab2"> dev </TabsTrigger>
123123
<TabsTrigger value="tab3"> lint </TabsTrigger>
124124
<TabsTrigger value="tab4"> fmt </TabsTrigger>

docs/.vitepress/theme/layouts/Home.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ import FeatureFormat from '../components/home/FeatureFormat.vue';
2020
import FeatureRun from '../components/home/FeatureRun.vue';
2121
import FeatureUI from '../components/home/FeatureUI.vue';
2222
import FeatureLib from '../components/home/FeatureLib.vue';
23+
import HeroRive from '../components/home/HeroRive.vue';
2324
</script>
2425

2526
<template>
2627
<Hero />
2728
<!-- <PartnerLogos /> -->
28-
<HeadingSection1 />
29+
<!-- <HeadingSection1 /> -->
2930
<Terminal />
3031
<CoreFeature3Col />
31-
<HeadingSection2 />
32+
<!-- <HeadingSection2 /> -->
3233
<ProductivityGrid />
3334
<section id="features" data-theme="dark" class="bg-primary">
3435
<HeadingSection4 />
@@ -44,9 +45,11 @@ import FeatureLib from '../components/home/FeatureLib.vue';
4445
<HeadingSection3 />
4546
<Fullstack2Col />
4647
<Spacer />
48+
<HeroRive />
49+
<Spacer />
4750
<!--
4851
<Testimonials/>
4952
<Spacer/>
5053
-->
51-
<Pricing />
54+
<!-- <Pricing /> -->
5255
</template>

0 commit comments

Comments
 (0)