diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index d3dd5054d..4a6dd49ae 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -77,6 +77,30 @@ export default defineConfig({ 'link', { rel: 'alternate', type: 'application/rss+xml', href: '/blog.rss' }, ], + ['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }], + [ + 'link', + { + rel: 'preconnect', + href: 'https://fonts.gstatic.com', + crossorigin: 'true', + }, + ], + [ + 'link', + { + rel: 'preload', + href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600&family=IBM+Plex+Mono:wght@400&display=swap', + as: 'style', + }, + ], + [ + 'link', + { + rel: 'stylesheet', + href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600&family=IBM+Plex+Mono:wght@400&display=swap', + }, + ], ['link', { rel: 'me', href: 'https://m.webtoo.ls/@vite' }], ['meta', { property: 'og:type', content: 'website' }], ['meta', { property: 'og:title', content: ogTitle }], @@ -139,7 +163,8 @@ export default defineConfig({ footer: { message: `Released under the MIT License. (${commitRef})`, - copyright: 'Copyright © 2019-present Evan You & Vite Contributors', + copyright: + 'Copyright © 2019-present Yuxi (Evan) You & Vite Contributors', }, nav: [ diff --git a/docs/.vitepress/theme/components/AsideSponsors.vue b/docs/.vitepress/theme/components/AsideSponsors.vue index 26b72345e..bf8d19653 100644 --- a/docs/.vitepress/theme/components/AsideSponsors.vue +++ b/docs/.vitepress/theme/components/AsideSponsors.vue @@ -23,7 +23,7 @@ const sponsors = computed(() => { href="https://viteconf.org/?utm=vite-sidebar" target="_blank" > - + ViteConf Logo

Building Together

ViteConf 24 - Oct 3

diff --git a/docs/.vitepress/theme/components/BlogIndex.vue b/docs/.vitepress/theme/components/BlogIndex.vue index cddd7c16e..5f77ee193 100644 --- a/docs/.vitepress/theme/components/BlogIndex.vue +++ b/docs/.vitepress/theme/components/BlogIndex.vue @@ -1,5 +1,5 @@ - - - - diff --git a/docs/.vitepress/theme/components/landing/1. hero-section/HeroDiagram.vue b/docs/.vitepress/theme/components/landing/1. hero-section/HeroDiagram.vue new file mode 100644 index 000000000..10bd32fa4 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/1. hero-section/HeroDiagram.vue @@ -0,0 +1,821 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/1. hero-section/HeroSection.vue b/docs/.vitepress/theme/components/landing/1. hero-section/HeroSection.vue new file mode 100644 index 000000000..9892f25de --- /dev/null +++ b/docs/.vitepress/theme/components/landing/1. hero-section/HeroSection.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgBlueIndicator.vue b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgBlueIndicator.vue new file mode 100644 index 000000000..6f5854f7a --- /dev/null +++ b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgBlueIndicator.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgInputs.vue b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgInputs.vue new file mode 100644 index 000000000..c4fe4d323 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgInputs.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgOutputs.vue b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgOutputs.vue new file mode 100644 index 000000000..320e99977 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgOutputs.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgPinkIndicator.vue b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgPinkIndicator.vue new file mode 100644 index 000000000..063816b63 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgPinkIndicator.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue new file mode 100644 index 000000000..0b02e148e --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue @@ -0,0 +1,503 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue new file mode 100644 index 000000000..e8a3e32ae --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue @@ -0,0 +1,557 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureHMR.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureHMR.vue new file mode 100644 index 000000000..938060602 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureHMR.vue @@ -0,0 +1,515 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue new file mode 100644 index 000000000..5e44b3bb7 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue @@ -0,0 +1,425 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureOptimizedBuild.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureOptimizedBuild.vue new file mode 100644 index 000000000..fc38a432b --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureOptimizedBuild.vue @@ -0,0 +1,623 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureRichFeatures.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureRichFeatures.vue new file mode 100644 index 000000000..b2d52f886 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureRichFeatures.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue new file mode 100644 index 000000000..8baaf18c8 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue @@ -0,0 +1,540 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue new file mode 100644 index 000000000..b503ba3e9 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue new file mode 100644 index 000000000..308df28a6 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/images/css3.svg b/docs/.vitepress/theme/components/landing/2. feature-section/images/css3.svg new file mode 100644 index 000000000..afa66d986 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/images/css3.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/images/js.svg b/docs/.vitepress/theme/components/landing/2. feature-section/images/js.svg new file mode 100644 index 000000000..59a037516 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/images/js.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/images/json.svg b/docs/.vitepress/theme/components/landing/2. feature-section/images/json.svg new file mode 100644 index 000000000..20d86ed7f --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/images/json.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/images/postcss.svg b/docs/.vitepress/theme/components/landing/2. feature-section/images/postcss.svg new file mode 100644 index 000000000..5251081b6 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/images/postcss.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/images/ts.svg b/docs/.vitepress/theme/components/landing/2. feature-section/images/ts.svg new file mode 100644 index 000000000..223587b2d --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/images/ts.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/2. feature-section/images/wa.svg b/docs/.vitepress/theme/components/landing/2. feature-section/images/wa.svg new file mode 100644 index 000000000..8e6f976d1 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/2. feature-section/images/wa.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue b/docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue new file mode 100644 index 000000000..f154f7abd --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue b/docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue new file mode 100644 index 000000000..8ddab8a1c --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue @@ -0,0 +1,411 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/analog.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/analog.svg new file mode 100644 index 000000000..2e7fe7d6c --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/analog.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/angular.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/angular.svg new file mode 100644 index 000000000..b6eb20ab8 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/angular.svg @@ -0,0 +1 @@ + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/astro.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/astro.svg new file mode 100644 index 000000000..bbe512ed2 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/astro.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/laravel.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/laravel.svg new file mode 100644 index 000000000..a8d8fb19f --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/laravel.svg @@ -0,0 +1 @@ + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/marko.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/marko.svg new file mode 100644 index 000000000..44c26273f --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/marko.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/nuxt.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/nuxt.svg new file mode 100644 index 000000000..fb2de2c62 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/nuxt.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/playwright.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/playwright.svg new file mode 100644 index 000000000..63ef7c4c2 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/playwright.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/qwik.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/qwik.svg new file mode 100644 index 000000000..606a2b7c6 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/qwik.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/react.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/react.svg new file mode 100644 index 000000000..c4fcecce0 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/react.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/redwood.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/redwood.svg new file mode 100644 index 000000000..2d6117353 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/redwood.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/remix.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/remix.svg new file mode 100644 index 000000000..a94570619 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/remix.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/solid.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/solid.svg new file mode 100644 index 000000000..1cf619e56 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/solid.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/storybook.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/storybook.svg new file mode 100644 index 000000000..43176b924 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/storybook.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/svelte.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/svelte.svg new file mode 100644 index 000000000..62309a1d1 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/svelte.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/vitest.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/vitest.svg new file mode 100644 index 000000000..c9d5fd3e7 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/vitest.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/3. frameworks-section/images/vue.svg b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/vue.svg new file mode 100644 index 000000000..b29e1a423 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/3. frameworks-section/images/vue.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue b/docs/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue new file mode 100644 index 000000000..161c9738e --- /dev/null +++ b/docs/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue b/docs/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue new file mode 100644 index 000000000..5ca50f78a --- /dev/null +++ b/docs/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue b/docs/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue new file mode 100644 index 000000000..5778ff16f --- /dev/null +++ b/docs/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/docs/.vitepress/theme/components/landing/5. sponsor-section/voidzero.svg b/docs/.vitepress/theme/components/landing/5. sponsor-section/voidzero.svg new file mode 100644 index 000000000..99cb8182e --- /dev/null +++ b/docs/.vitepress/theme/components/landing/5. sponsor-section/voidzero.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/.vitepress/theme/components/landing/6. get-started-section/GetStartedSection.vue b/docs/.vitepress/theme/components/landing/6. get-started-section/GetStartedSection.vue new file mode 100644 index 000000000..cca43da69 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/6. get-started-section/GetStartedSection.vue @@ -0,0 +1,292 @@ + + + diff --git a/docs/.vitepress/theme/components/landing/common/SvgNode.vue b/docs/.vitepress/theme/components/landing/common/SvgNode.vue new file mode 100644 index 000000000..8ac6c76b7 --- /dev/null +++ b/docs/.vitepress/theme/components/landing/common/SvgNode.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/docs/.vitepress/theme/composables/sponsor.ts b/docs/.vitepress/theme/composables/sponsor.ts index aa31d46d1..3f3ab8694 100644 --- a/docs/.vitepress/theme/composables/sponsor.ts +++ b/docs/.vitepress/theme/composables/sponsor.ts @@ -99,7 +99,7 @@ export function useSponsor() { function mapSponsors(sponsors: Sponsors) { return [ { - tier: 'Special Sponsors', + tier: 'in partnership with', size: 'big', items: viteSponsors['special'], }, diff --git a/docs/.vitepress/theme/composables/useCardAnimation.ts b/docs/.vitepress/theme/composables/useCardAnimation.ts new file mode 100644 index 000000000..2a6c7c83c --- /dev/null +++ b/docs/.vitepress/theme/composables/useCardAnimation.ts @@ -0,0 +1,107 @@ +import { type Ref, onMounted, onUnmounted, ref } from 'vue' +import { gsap } from 'gsap' +import { ScrollTrigger } from 'gsap/dist/ScrollTrigger' + +gsap.registerPlugin(ScrollTrigger) + +/** + * A custom hook for animating a card element. + * + * @param {HTMLElement | string} el - The element or selector for the element to be animated + * @param {() => GSAPTimeline | null} animation - A function that returns a GSAP timeline for the animation + * @param {object} options - Options for the animation + */ +export function useCardAnimation( + el: HTMLElement | string, + animation: (() => GSAPTimeline) | undefined = undefined, + options?: { + /** + * A flag to indicate whether the animation should only run once, and not reset once complete. + */ + once?: boolean + }, +) { + /** + * The GSAP timeline for this animation. + */ + let timeline: GSAPTimeline | null + + /** + * A flag to indicate whether the card is currently active or not. + * May be inactive while the animation is still finishing up, due to CSS transitions. + */ + const isCardActive: Ref = ref(false) + + /** + * An internal flag to prevent multiple animations from running at the same time. + */ + const isAnimationRunning: Ref = ref(false) + + /** + * Starts the card's animation, managing the lifecycle internally to prevent multiple animations from running at the same time. + */ + const startAnimation = () => { + if (isAnimationRunning.value) { + return + } else { + isAnimationRunning.value = true + isCardActive.value = true + } + if (timeline) { + timeline.kill() + } + if (!animation) { + return + } + timeline = gsap.timeline({ + onComplete: () => { + if (!options?.once) { + isCardActive.value = false + setTimeout(() => { + isAnimationRunning.value = false + }, 3000) + } + }, + }) + timeline.add(animation()) + } + + /** + * The ScrollTrigger instance for this card. + */ + let scrollTriggerInstance: ScrollTrigger | null = null + + /** + * Trigger's the card's animation automatically on mobile devices (no hover method) + */ + onMounted(() => { + if (window.innerWidth < 768) { + scrollTriggerInstance = ScrollTrigger.create({ + trigger: el, + start: 'top 60%', + onEnter: () => { + startAnimation() + }, + }) + } + }) + + /** + * Remove the ScrollTrigger and GSAP timeline instances when the component is unmounted + */ + onUnmounted(() => { + if (scrollTriggerInstance) { + scrollTriggerInstance.kill() + scrollTriggerInstance = null + } + if (timeline) { + timeline.kill() + timeline = null + } + }) + + return { + startAnimation, + isCardActive, + } +} diff --git a/docs/.vitepress/theme/composables/useSlideIn.ts b/docs/.vitepress/theme/composables/useSlideIn.ts new file mode 100644 index 000000000..e41cd8983 --- /dev/null +++ b/docs/.vitepress/theme/composables/useSlideIn.ts @@ -0,0 +1,19 @@ +import { nextTick, onMounted } from 'vue' +import { gsap } from 'gsap' + +export function useSlideIn(el: HTMLElement | string) { + onMounted(async () => { + await nextTick(() => { + gsap.to(el, { + x: 0, + duration: 1, + ease: 'power3.out', + scrollTrigger: { + trigger: el, + start: 'top 100%', + once: true, + }, + }) + }) + }) +} diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index d2303b783..7ce4bafe5 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -4,7 +4,7 @@ import DefaultTheme from 'vitepress/theme' import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' import '@shikijs/vitepress-twoslash/style.css' import './styles/vars.css' -import HomeSponsors from './components/HomeSponsors.vue' +import './styles/landing.css' import AsideSponsors from './components/AsideSponsors.vue' import SvgImage from './components/SvgImage.vue' import 'virtual:group-icons.css' @@ -13,7 +13,6 @@ export default { extends: DefaultTheme, Layout() { return h(DefaultTheme.Layout, null, { - 'home-features-after': () => h(HomeSponsors), 'aside-ads-before': () => h(AsideSponsors), }) }, diff --git a/docs/.vitepress/theme/styles/landing.css b/docs/.vitepress/theme/styles/landing.css new file mode 100644 index 000000000..c3582f209 --- /dev/null +++ b/docs/.vitepress/theme/styles/landing.css @@ -0,0 +1,218 @@ +/* /////////////////////// */ +/* Landing Page CSS Styles */ +/* /////////////////////// */ + +html:has(.landing) { + background-color: #101010; + --vp-c-bg: #101010; + + body { + background-color: #101010; + } +} + +.landing { + overflow-x: hidden; + background-color: #101010; + + * { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; + text-rendering: optimizeLegibility !important; + } + + /* /////////////////// */ + /* VitePress Overrides */ + /* /////////////////// */ + + .VPNavBar, + .VPNavBar:not(.top) { + background: transparent !important; + + @media (min-width: 768px) { + backdrop-filter: blur(10px); + background: rgba(15, 15, 15, 0.8) !important; + border-bottom: 1px solid #262626 !important; + } + + .content-body { + background: none !important; + } + } + + .VPFooter { + border-top: 1px solid #262626 !important; + background: radial-gradient(circle at top center, #0f151a 30%, #000000 80%); + } + + .VPHome { + padding-bottom: 0 !important; + margin-bottom: 0 !important; + } + + /* /////////////// */ + /* Force Dark Mode */ + /* /////////////// */ + + .VPNavBarAppearance { + display: none; + } + + .VPNavScreenAppearance { + visibility: hidden; + } + + .social-links::before { + margin-left: 0 !important; + } + + /* ////////// */ + /* Typography */ + /* ////////// */ + + h1 { + text-align: center; + font-family: 'Manrope', sans-serif; + font-style: normal; + font-weight: 600; + background: linear-gradient( + 180deg, + #fff 0%, + rgba(255, 255, 255, 0.31) 100% + ); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + text-wrap: balance; + cursor: default; + font-size: 44px; + line-height: 120%; + letter-spacing: -0.88px; + padding: 0 20px; + margin-bottom: 15px; + + @media (min-width: 768px) { + font-size: 64px; + line-height: 81px; + letter-spacing: -1.28px; + } + + @media (min-width: 1025px) { + font-size: 72px; + letter-spacing: -1.44px; + padding-bottom: 8px; /* Fix for hanging descender on "g" in "tooling" */ + } + } + + h2 { + display: block; + width: fit-content; + font-family: Manrope, sans-serif; + font-size: 32px; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.64px; + cursor: default; + text-wrap: balance; + padding: 0 20px; + + @media (min-width: 768px) { + font-size: 44px; + letter-spacing: -0.88px; + } + } + + h3 { + color: #a9a9a9; + text-align: center; + font-family: Inter, sans-serif; + font-size: 20px; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.4px; + max-width: 500px; + text-wrap: balance; + cursor: default; + margin-bottom: 25px; + padding: 0 20px; + } + + /* /////// */ + /* Buttons */ + /* /////// */ + + .btn { + display: flex; + padding: 10px 18px; + justify-content: center; + align-items: center; + gap: 8px; + border-radius: 8px; + color: #fff; + font-family: Inter, sans-serif; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 24px; + text-shadow: 0 0 2px rgba(0, 0, 0, 0.2); + transition: all 0.2s ease-in-out; + width: fit-content; + + &:hover { + transform: translate3d(0, -2px, 0); + } + + &.btn--primary { + position: relative; + background: radial-gradient( + 141.42% 141.42% at 100% 0%, + rgba(255, 255, 255, 0.4) 0%, + rgba(255, 255, 255, 0) 100% + ), + radial-gradient( + 140.35% 140.35% at 100% 94.74%, + #bd34fe 0%, + rgba(189, 52, 254, 0) 100% + ), + radial-gradient( + 89.94% 89.94% at 18.42% 15.79%, + #41d1ff 0%, + rgba(65, 209, 255, 0) 100% + ); + box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.75) inset; + + &:hover { + background: radial-gradient( + 141.42% 141.42% at 100% 0%, + rgba(255, 255, 255, 0.5) 0%, + rgba(255, 255, 255, 0) 100% + ), + radial-gradient( + 140.35% 140.35% at 100% 94.74%, + #bd34fe 0%, + rgba(189, 52, 254, 0) 100% + ), + radial-gradient( + 89.94% 89.94% at 18.42% 15.79%, + #41d1ff 0%, + rgba(65, 209, 255, 0) 100% + ); + box-shadow: 0 1.5px 0 0 rgba(255, 255, 255, 0.8) inset; + } + } + + &.btn--outline { + border: 1px solid rgba(255, 255, 255, 0.2); + + &:hover { + border: 1px solid rgba(255, 255, 255, 0.4); + } + } + + &.btn--rounded { + border-radius: 100px; + } + } +} diff --git a/docs/.vitepress/theme/styles/vars.css b/docs/.vitepress/theme/styles/vars.css index 645a1e922..189cf20cb 100644 --- a/docs/.vitepress/theme/styles/vars.css +++ b/docs/.vitepress/theme/styles/vars.css @@ -28,38 +28,6 @@ --vp-button-brand-active-bg: var(--vp-button-brand-bg); } -/** - * Component: Home - * -------------------------------------------------------------------------- */ - -:root { - --vp-home-hero-name-color: transparent; - --vp-home-hero-name-background: -webkit-linear-gradient( - 120deg, - #bd34fe 30%, - #41d1ff - ); - - --vp-home-hero-image-background-image: linear-gradient( - -45deg, - #bd34fe 50%, - #47caff 50% - ); - --vp-home-hero-image-filter: blur(40px); -} - -@media (min-width: 640px) { - :root { - --vp-home-hero-image-filter: blur(56px); - } -} - -@media (min-width: 960px) { - :root { - --vp-home-hero-image-filter: blur(72px); - } -} - /** * Component: Custom Block * -------------------------------------------------------------------------- */ diff --git a/docs/.vitepress/theme/components/blog.data.ts b/docs/_data/blog.data.ts similarity index 100% rename from docs/.vitepress/theme/components/blog.data.ts rename to docs/_data/blog.data.ts diff --git a/docs/images/community/placeholder.jpg b/docs/images/community/placeholder.jpg new file mode 100644 index 000000000..5bd0f69a1 Binary files /dev/null and b/docs/images/community/placeholder.jpg differ diff --git a/docs/index.md b/docs/index.md index d0daea0d0..301751101 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,60 +1,47 @@ --- -layout: home - title: Vite titleTemplate: Next Generation Frontend Tooling +pageClass: landing dark -hero: - name: Vite - text: Next Generation Frontend Tooling - tagline: Get ready for a development environment that can finally catch up with you. - image: - src: /logo-with-shadow.png - alt: Vite - actions: - - theme: brand - text: Get Started - link: /guide/ - - theme: alt - text: Why Vite? - link: /guide/why - - theme: alt - text: View on GitHub - link: https://github.com/vitejs/vite - - theme: brand - text: ⚡ ViteConf 24! - link: https://viteconf.org/?utm=vite-homepage - -features: - - icon: 💡 - title: Instant Server Start - details: On demand file serving over native ESM, no bundling required! - - icon: ⚡️ - title: Lightning Fast HMR - details: Hot Module Replacement (HMR) that stays fast regardless of app size. - - icon: 🛠️ - title: Rich Features - details: Out-of-the-box support for TypeScript, JSX, CSS and more. - - icon: 📦 - title: Optimized Build - details: Pre-configured Rollup build with multi-page and library mode support. - - icon: 🔩 - title: Universal Plugins - details: Rollup-superset plugin interface shared between dev and build. - - icon: 🔑 - title: Fully Typed APIs - details: Flexible programmatic APIs with full TypeScript typing. +layout: home +aside: false +editLink: false +markdownStyles: false --- + +
+ + + + + + + + + + + + + + + + + +
diff --git a/docs/public/_redirects b/docs/public/_redirects index 16bba13ba..4dc8a830e 100644 --- a/docs/public/_redirects +++ b/docs/public/_redirects @@ -1,5 +1,5 @@ # temporary, we'll flip this around some day -https://vite.dev/* https://vitejs.dev/:splat 302! +https://vitejs.dev/* https://vite.dev/:splat 301! /guide/api-vite-runtime /guide/api-environment 302 /guide/api-vite-runtime.html /guide/api-environment 302 diff --git a/docs/public/github.svg b/docs/public/github.svg new file mode 100644 index 000000000..a1e44f332 --- /dev/null +++ b/docs/public/github.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/public/heart.svg b/docs/public/heart.svg new file mode 100644 index 000000000..142e518c1 --- /dev/null +++ b/docs/public/heart.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/public/logo-home.svg b/docs/public/logo-home.svg new file mode 100644 index 000000000..0942f44db --- /dev/null +++ b/docs/public/logo-home.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/public/noise.png b/docs/public/noise.png new file mode 100644 index 000000000..fd9a7cf22 Binary files /dev/null and b/docs/public/noise.png differ diff --git a/package.json b/package.json index c69524176..feb60139d 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "eslint-plugin-regexp": "^2.6.0", "execa": "^9.4.0", "globals": "^15.9.0", + "gsap": "^3.12.4", "lint-staged": "^15.2.10", "picocolors": "^1.1.0", "playwright-chromium": "^1.47.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3082a1256..6c6692690 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,6 +94,9 @@ importers: globals: specifier: ^15.9.0 version: 15.9.0 + gsap: + specifier: ^3.12.4 + version: 3.12.5 lint-staged: specifier: ^15.2.10 version: 15.2.10 @@ -5000,6 +5003,9 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + gsap@3.12.5: + resolution: {integrity: sha512-srBfnk4n+Oe/ZnMIOXt3gT605BX9x5+rh/prT2F1SsNJsU1XuMiP0E2aptW481OnonOGACZWBqseH5Z7csHxhQ==} + handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} @@ -10769,6 +10775,8 @@ snapshots: graphemer@1.4.0: {} + gsap@3.12.5: {} + handlebars@4.7.8: dependencies: minimist: 1.2.8