diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 598e2cbd..cfa22e0f 100644 --- a/.vitepress/config.ts +++ b/.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 }], @@ -146,7 +170,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/.vitepress/theme/components/AsideSponsors.vue b/.vitepress/theme/components/AsideSponsors.vue index c23c8ee2..a63361f4 100644 --- a/.vitepress/theme/components/AsideSponsors.vue +++ b/.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/.vitepress/theme/components/BlogIndex.vue b/.vitepress/theme/components/BlogIndex.vue index cddd7c16..5f77ee19 100644 --- a/.vitepress/theme/components/BlogIndex.vue +++ b/.vitepress/theme/components/BlogIndex.vue @@ -1,5 +1,5 @@ - - - - diff --git a/.vitepress/theme/components/landing/1. hero-section/HeroDiagram.vue b/.vitepress/theme/components/landing/1. hero-section/HeroDiagram.vue new file mode 100644 index 00000000..10bd32fa --- /dev/null +++ b/.vitepress/theme/components/landing/1. hero-section/HeroDiagram.vue @@ -0,0 +1,821 @@ + + + + + diff --git a/.vitepress/theme/components/landing/1. hero-section/HeroSection.vue b/.vitepress/theme/components/landing/1. hero-section/HeroSection.vue new file mode 100644 index 00000000..26109328 --- /dev/null +++ b/.vitepress/theme/components/landing/1. hero-section/HeroSection.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgBlueIndicator.vue b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgBlueIndicator.vue new file mode 100644 index 00000000..6f5854f7 --- /dev/null +++ b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgBlueIndicator.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgInputs.vue b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgInputs.vue new file mode 100644 index 00000000..c4fe4d32 --- /dev/null +++ b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgInputs.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgOutputs.vue b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgOutputs.vue new file mode 100644 index 00000000..320e9997 --- /dev/null +++ b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgOutputs.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgPinkIndicator.vue b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgPinkIndicator.vue new file mode 100644 index 00000000..063816b6 --- /dev/null +++ b/.vitepress/theme/components/landing/1. hero-section/svg-elements/SvgPinkIndicator.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue new file mode 100644 index 00000000..10272c23 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue @@ -0,0 +1,503 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue new file mode 100644 index 00000000..e570ef80 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue @@ -0,0 +1,557 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureHMR.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureHMR.vue new file mode 100644 index 00000000..f30c224c --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureHMR.vue @@ -0,0 +1,515 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue new file mode 100644 index 00000000..b37ecb2a --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue @@ -0,0 +1,425 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureOptimizedBuild.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureOptimizedBuild.vue new file mode 100644 index 00000000..d7e1c0ee --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureOptimizedBuild.vue @@ -0,0 +1,623 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureRichFeatures.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureRichFeatures.vue new file mode 100644 index 00000000..e50978c9 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureRichFeatures.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue new file mode 100644 index 00000000..f5a6acf2 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue @@ -0,0 +1,540 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue new file mode 100644 index 00000000..70aa8f18 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue new file mode 100644 index 00000000..2cc4e408 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/images/css3.svg b/.vitepress/theme/components/landing/2. feature-section/images/css3.svg new file mode 100644 index 00000000..afa66d98 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/images/css3.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/images/js.svg b/.vitepress/theme/components/landing/2. feature-section/images/js.svg new file mode 100644 index 00000000..59a03751 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/images/js.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/images/json.svg b/.vitepress/theme/components/landing/2. feature-section/images/json.svg new file mode 100644 index 00000000..20d86ed7 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/images/json.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/images/postcss.svg b/.vitepress/theme/components/landing/2. feature-section/images/postcss.svg new file mode 100644 index 00000000..5251081b --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/images/postcss.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/images/ts.svg b/.vitepress/theme/components/landing/2. feature-section/images/ts.svg new file mode 100644 index 00000000..223587b2 --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/images/ts.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/2. feature-section/images/wa.svg b/.vitepress/theme/components/landing/2. feature-section/images/wa.svg new file mode 100644 index 00000000..8e6f976d --- /dev/null +++ b/.vitepress/theme/components/landing/2. feature-section/images/wa.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue b/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue new file mode 100644 index 00000000..f154f7ab --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue b/.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue new file mode 100644 index 00000000..1c13b1c0 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue @@ -0,0 +1,419 @@ + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/analog.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/analog.svg new file mode 100644 index 00000000..2e7fe7d6 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/analog.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/angular.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/angular.svg new file mode 100644 index 00000000..b6eb20ab --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/angular.svg @@ -0,0 +1 @@ + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/astro.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/astro.svg new file mode 100644 index 00000000..bbe512ed --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/astro.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/ember.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/ember.svg new file mode 100644 index 00000000..4f1e6889 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/ember.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/laravel.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/laravel.svg new file mode 100644 index 00000000..a8d8fb19 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/laravel.svg @@ -0,0 +1 @@ + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/marko.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/marko.svg new file mode 100644 index 00000000..44c26273 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/marko.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/nuxt.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/nuxt.svg new file mode 100644 index 00000000..fb2de2c6 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/nuxt.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/playwright.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/playwright.svg new file mode 100644 index 00000000..63ef7c4c --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/playwright.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/qwik.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/qwik.svg new file mode 100644 index 00000000..606a2b7c --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/qwik.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/react.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/react.svg new file mode 100644 index 00000000..c4fcecce --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/react.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/redwood.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/redwood.svg new file mode 100644 index 00000000..2d611735 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/redwood.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/remix.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/remix.svg new file mode 100644 index 00000000..a9457061 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/remix.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/solid.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/solid.svg new file mode 100644 index 00000000..1cf619e5 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/solid.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/storybook.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/storybook.svg new file mode 100644 index 00000000..43176b92 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/storybook.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/svelte.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/svelte.svg new file mode 100644 index 00000000..62309a1d --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/svelte.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/vitest.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/vitest.svg new file mode 100644 index 00000000..c9d5fd3e --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/vitest.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/3. frameworks-section/images/vue.svg b/.vitepress/theme/components/landing/3. frameworks-section/images/vue.svg new file mode 100644 index 00000000..b29e1a42 --- /dev/null +++ b/.vitepress/theme/components/landing/3. frameworks-section/images/vue.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue b/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue new file mode 100644 index 00000000..161c9738 --- /dev/null +++ b/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue b/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue new file mode 100644 index 00000000..558dd644 --- /dev/null +++ b/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue b/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue new file mode 100644 index 00000000..a5f1d2a9 --- /dev/null +++ b/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/.vitepress/theme/components/landing/5. sponsor-section/voidzero.svg b/.vitepress/theme/components/landing/5. sponsor-section/voidzero.svg new file mode 100644 index 00000000..99cb8182 --- /dev/null +++ b/.vitepress/theme/components/landing/5. sponsor-section/voidzero.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.vitepress/theme/components/landing/6. get-started-section/GetStartedSection.vue b/.vitepress/theme/components/landing/6. get-started-section/GetStartedSection.vue new file mode 100644 index 00000000..dae39c8b --- /dev/null +++ b/.vitepress/theme/components/landing/6. get-started-section/GetStartedSection.vue @@ -0,0 +1,292 @@ + + + diff --git a/.vitepress/theme/components/landing/common/SvgNode.vue b/.vitepress/theme/components/landing/common/SvgNode.vue new file mode 100644 index 00000000..8ac6c76b --- /dev/null +++ b/.vitepress/theme/components/landing/common/SvgNode.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/.vitepress/theme/composables/sponsor.ts b/.vitepress/theme/composables/sponsor.ts index 55bc82ad..973bd84f 100644 --- a/.vitepress/theme/composables/sponsor.ts +++ b/.vitepress/theme/composables/sponsor.ts @@ -48,7 +48,7 @@ const viteSponsors: Pick = { ], gold: [ // now automated via sponsors.vuejs.org too - ] + ], } function toggleDarkLogos() { @@ -99,17 +99,17 @@ export function useSponsor() { function mapSponsors(sponsors: Sponsors) { return [ { - tier: 'Special Sponsors', + tier: 'パートナーシップ', size: 'big', items: viteSponsors['special'], }, { - tier: 'Platinum Sponsors', + tier: 'プラチナスポンサー', size: 'big', items: mapImgPath(sponsors['platinum']), }, { - tier: 'Gold Sponsors', + tier: 'ゴールドスポンサー', size: 'medium', items: [...mapImgPath(sponsors['gold']), ...viteSponsors['gold']], }, diff --git a/.vitepress/theme/composables/useCardAnimation.ts b/.vitepress/theme/composables/useCardAnimation.ts new file mode 100644 index 00000000..2a6c7c83 --- /dev/null +++ b/.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/.vitepress/theme/composables/useSlideIn.ts b/.vitepress/theme/composables/useSlideIn.ts new file mode 100644 index 00000000..e41cd898 --- /dev/null +++ b/.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/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index d2303b78..7ce4bafe 100644 --- a/.vitepress/theme/index.ts +++ b/.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/.vitepress/theme/styles/landing.css b/.vitepress/theme/styles/landing.css new file mode 100644 index 00000000..b535baa0 --- /dev/null +++ b/.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: 19px; /* 日本語版: 元は 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/.vitepress/theme/styles/vars.css b/.vitepress/theme/styles/vars.css index e07a5704..189cf20c 100644 --- a/.vitepress/theme/styles/vars.css +++ b/.vitepress/theme/styles/vars.css @@ -2,7 +2,7 @@ * Colors * -------------------------------------------------------------------------- */ - :root { +:root { --vp-c-brand: #646cff; --vp-c-brand-light: #747bff; --vp-c-brand-lighter: #9499ff; @@ -28,43 +28,11 @@ --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 * -------------------------------------------------------------------------- */ - :root { +:root { --vp-custom-block-tip-border: var(--vp-c-brand); --vp-custom-block-tip-text: var(--vp-c-brand-darker); --vp-custom-block-tip-bg: var(--vp-c-brand-dimm); diff --git a/.vitepress/theme/components/blog.data.ts b/_data/blog.data.ts similarity index 100% rename from .vitepress/theme/components/blog.data.ts rename to _data/blog.data.ts diff --git a/images/community/placeholder.jpg b/images/community/placeholder.jpg new file mode 100644 index 00000000..5bd0f69a Binary files /dev/null and b/images/community/placeholder.jpg differ diff --git a/index.md b/index.md index cb414385..3bac83f0 100644 --- a/index.md +++ b/index.md @@ -1,56 +1,47 @@ --- -layout: home - title: Vite titleTemplate: 次世代フロントエンドツール +pageClass: landing dark -hero: - name: Vite - text: 次世代フロントエンドツール - tagline: 最先端をいく開発環境を構築しましょう - image: - src: /logo-with-shadow.png - alt: Vite - actions: - - theme: brand - text: Vite を始める - link: /guide/ - - theme: alt - text: Vite を使う理由 - link: /guide/why - - theme: alt - text: GitHub で見る - link: https://github.com/vitejs/vite - - theme: alt - text: ⚡ ViteConf 24! - link: https://viteconf.org/?utm=vite-homepage - -features: - - icon: 💡 - title: 瞬時にスタートするサーバー - details: ネイティブ ESM により要求時にファイルが提供されるため、バンドルが不要です! - - icon: ⚡️ - title: 超高速な HMR - details: アプリのサイズに関係なく高速を維持する HMR を提供します。 - - icon: 🛠️ - title: 豊富な機能 - details: TypeScript、JSX、CSS などがすぐに使えるようにサポートされています。 - - icon: 📦 - title: 最適化されたビルド - details: 設定済みの Rollup によるビルドによってマルチページおよびライブラリーモードをサポートします。 - - icon: 🔩 - title: ユニバーサルなプラグイン - details: 開発とビルドの間で共有される Rollup と互換性のあるプラグインを提供します。 - - icon: 🔑 - title: 完全に型定義がされている API - details: 完全な TypeScript の型定義を備えた柔軟なプログラミング志向の API です。 +layout: home +aside: false +editLink: false +markdownStyles: false --- - + + +
+ + + + + + + + + + + + + + + + + +
diff --git a/package.json b/package.json index 66bb8c47..3d467413 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@types/express": "^4.17.21", "@types/node": "^20.16.10", "feed": "^4.2.2", + "gsap": "^3.12.4", "lint-staged": "^15.2.10", "textlint": "^13.4.1", "textlint-filter-rule-allowlist": "^4.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c8fdc91..feafc641 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: feed: specifier: ^4.2.2 version: 4.2.2 + gsap: + specifier: ^3.12.4 + version: 3.12.5 lint-staged: specifier: ^15.2.10 version: 15.2.10 @@ -1178,6 +1181,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gsap@3.12.5: + resolution: {integrity: sha512-srBfnk4n+Oe/ZnMIOXt3gT605BX9x5+rh/prT2F1SsNJsU1XuMiP0E2aptW481OnonOGACZWBqseH5Z7csHxhQ==} + has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -3802,6 +3808,8 @@ snapshots: graceful-fs@4.2.11: {} + gsap@3.12.5: {} + has-bigints@1.0.2: {} has-flag@4.0.0: {} diff --git a/public/_redirects b/public/_redirects index 5c262dda..4dc8a830 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1,5 +1,5 @@ # temporary, we'll flip this around some day -https://ja.vite.dev/* https://ja.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/public/github.svg b/public/github.svg new file mode 100644 index 00000000..a1e44f33 --- /dev/null +++ b/public/github.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/heart.svg b/public/heart.svg new file mode 100644 index 00000000..142e518c --- /dev/null +++ b/public/heart.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/logo-home.svg b/public/logo-home.svg new file mode 100644 index 00000000..0942f44d --- /dev/null +++ b/public/logo-home.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/noise.png b/public/noise.png new file mode 100644 index 00000000..fd9a7cf2 Binary files /dev/null and b/public/noise.png differ