@voidzero-dev/vitepress-theme 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/aliases.js +14 -0
- package/src/vitepress/assets/clients/clickup.svg +5 -0
- package/src/vitepress/assets/clients/stripe.svg +3 -0
- package/src/vitepress/components/oss/Footer.vue +4 -21
- package/src/vitepress/components/oss/Header.vue +82 -180
- package/src/vitepress/components/oss/Sponsors.vue +3 -3
- package/src/vitepress/components/oss/TopBanner.vue +20 -79
- package/src/vitepress/components/oss/TrustedBy.vue +1 -1
- package/src/vitepress/components/vite/Community.vue +3 -3
- package/src/vitepress/components/vite/FeatureGrid1.vue +63 -0
- package/src/vitepress/components/vite/{FeatureGrid.vue → FeatureGrid2.vue} +8 -10
- package/src/vitepress/components/vite/Hero.vue +6 -15
- package/src/vitepress/components/vitepress-default/VPDocOutlineItem.vue +2 -2
- package/src/vitepress/components/vitepress-default/VPFlyout.vue +1 -1
- package/src/vitepress/components/vitepress-default/VPMenuLink.vue +1 -1
- package/src/vitepress/components/vitepress-default/VPNavBarMenuLink.vue +1 -1
- package/src/vitepress/components/vitepress-default/VPSidebarItem.vue +1 -1
- package/src/vitepress/components/vitepress-default/VPSocialLink.vue +1 -2
- package/src/vitepress/fonts/APK-Protocol-Semi-Bold.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-cyrillic-ext.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-cyrillic.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-greek-ext.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-greek.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-latin-ext.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-latin.woff2 +0 -0
- package/src/vitepress/fonts/inter-italic-vietnamese.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-cyrillic-ext.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-cyrillic.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-greek-ext.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-greek.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-latin-ext.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-latin.woff2 +0 -0
- package/src/vitepress/fonts/inter-roman-vietnamese.woff2 +0 -0
- package/src/vitepress/index.ts +64 -230
- package/src/vitepress/layouts/VPLayout.vue +2 -17
- package/src/vitepress/styles/tokens.css +194 -10
- package/src/vitepress/types/theme-context.ts +33 -0
- package/src/vitepress/assets/clients/beehiiv.svg +0 -30
- package/src/vitepress/assets/clients/excalidraw.svg +0 -82
- package/src/vitepress/assets/clients/get-your-guide.svg +0 -1
- package/src/vitepress/assets/clients/posthog.svg +0 -1
- package/src/vitepress/assets/clients/ramp.svg +0 -1
- package/src/vitepress/assets/clients/shopee.svg +0 -55
- package/src/vitepress/components/vite/FeaturePanel1.vue +0 -41
- package/src/vitepress/components/vite/FeaturePanel2.vue +0 -37
- package/src/vitepress/components/vite/FeaturePanel3.vue +0 -43
- package/src/vitepress/components/vite/FeaturePanel4.vue +0 -46
- package/src/vitepress/components/voidzero/Footer.vue +0 -65
- package/src/vitepress/components/voidzero/Header.vue +0 -560
- package/src/vitepress/components/voidzero/Megamenu.vue +0 -190
- package/src/vitepress/components/voidzero/about/CareerCTA.vue +0 -56
- package/src/vitepress/components/voidzero/about/Hero.vue +0 -206
- package/src/vitepress/components/voidzero/about/Investors.vue +0 -112
- package/src/vitepress/components/voidzero/about/TeamGrid.vue +0 -161
- package/src/vitepress/components/voidzero/about/TeamSectionHeading.vue +0 -13
- package/src/vitepress/components/voidzero/blog/BlogArchive.vue +0 -223
- package/src/vitepress/components/voidzero/blog/BlogSingleContent.vue +0 -364
- package/src/vitepress/components/voidzero/blog/BlogSingleHero.vue +0 -113
- package/src/vitepress/components/voidzero/blog/BlogSingleRelated.vue +0 -92
- package/src/vitepress/components/voidzero/blog/FeaturedArticles.vue +0 -146
- package/src/vitepress/components/voidzero/blog/types.ts +0 -56
- package/src/vitepress/components/voidzero/home/CaseStudySlider.vue +0 -235
- package/src/vitepress/components/voidzero/home/CustomersSectionHeading.vue +0 -5
- package/src/vitepress/components/voidzero/home/GitHubStats.vue +0 -27
- package/src/vitepress/components/voidzero/home/Hero.vue +0 -69
- package/src/vitepress/components/voidzero/home/Investors.vue +0 -30
- package/src/vitepress/components/voidzero/home/NewsletterCTA.vue +0 -23
- package/src/vitepress/components/voidzero/home/OpenSourceSectionHeading.vue +0 -6
- package/src/vitepress/components/voidzero/home/OpenSourceSectionProjects.vue +0 -419
- package/src/vitepress/components/voidzero/home/Resources.vue +0 -144
- package/src/vitepress/components/voidzero/home/Statistics.vue +0 -507
- package/src/vitepress/components/voidzero/home/StatisticsSectionHeading.vue +0 -5
- package/src/vitepress/components/voidzero/home/TeamCTA.vue +0 -17
- package/src/vitepress/components/voidzero/home/TrustedBy.vue +0 -248
- package/src/vitepress/components/voidzero/home/VitePlusSectionFeatures.vue +0 -55
- package/src/vitepress/components/voidzero/home/VitePlusSectionHeading.vue +0 -17
- package/src/vitepress/fonts/KHTeka-Medium.woff2 +0 -0
- package/src/vitepress/fonts/KHTeka-Regular.woff2 +0 -0
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, onMounted, onUnmounted, watch } from "vue";
|
|
3
|
-
import GitHubStats from "./GitHubStats.vue";
|
|
4
|
-
import RiveAnimation from "@components/shared/RiveAnimation.vue";
|
|
5
|
-
|
|
6
|
-
// Import project icons
|
|
7
|
-
import viteIcon from "@assets/icons/vite-light.svg";
|
|
8
|
-
import vitestIcon from "@assets/icons/vitest-light.svg";
|
|
9
|
-
import rolldownIcon from "@assets/icons/rolldown-light.svg";
|
|
10
|
-
import oxcIcon from "@assets/icons/oxc-light.svg";
|
|
11
|
-
|
|
12
|
-
// Import terminal SVGs
|
|
13
|
-
import viteTerminal from "@assets/voidzero/terminals/vite.svg";
|
|
14
|
-
import vitestTerminal from "@assets/voidzero/terminals/vitest.svg";
|
|
15
|
-
import rolldownTerminal from "@assets/voidzero/terminals/rolldown.svg";
|
|
16
|
-
|
|
17
|
-
// Import Rive animations
|
|
18
|
-
import viteAnimation from "@assets/voidzero/animations/480_x_480_build_tool_for_web.riv";
|
|
19
|
-
import vitestAnimation from "@assets/voidzero/animations/480_x_480_next_generation_runner.riv";
|
|
20
|
-
import rolldownAnimation from "@assets/voidzero/animations/480_x_480_fastest_javascript_bundler.riv";
|
|
21
|
-
import oxcAnimation from "@assets/voidzero/animations/480_x_480_language_toolchain.riv";
|
|
22
|
-
|
|
23
|
-
const activeProject = ref(0);
|
|
24
|
-
const activatedProjects = ref<Set<number>>(new Set([0])); // Track projects that have been activated
|
|
25
|
-
const cardRefs = ref<HTMLElement[]>([]);
|
|
26
|
-
let observer: IntersectionObserver | null = null;
|
|
27
|
-
|
|
28
|
-
// Once a project becomes active, add it to the set (animations only play in, never out)
|
|
29
|
-
watch(activeProject, (newIndex) => {
|
|
30
|
-
activatedProjects.value.add(newIndex);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const projects = [
|
|
34
|
-
{
|
|
35
|
-
id: "vite",
|
|
36
|
-
name: "Vite",
|
|
37
|
-
url: "https://vite.dev",
|
|
38
|
-
icon: viteIcon,
|
|
39
|
-
terminal: viteTerminal,
|
|
40
|
-
animation: viteAnimation,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: "vitest",
|
|
44
|
-
name: "Vitest",
|
|
45
|
-
url: "https://vitest.dev",
|
|
46
|
-
icon: vitestIcon,
|
|
47
|
-
terminal: vitestTerminal,
|
|
48
|
-
animation: vitestAnimation,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: "rolldown",
|
|
52
|
-
name: "Rolldown",
|
|
53
|
-
url: "https://rolldown.rs",
|
|
54
|
-
icon: rolldownIcon,
|
|
55
|
-
terminal: rolldownTerminal,
|
|
56
|
-
animation: rolldownAnimation,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: "oxc",
|
|
60
|
-
name: "Oxc",
|
|
61
|
-
url: "https://oxc.rs",
|
|
62
|
-
icon: oxcIcon,
|
|
63
|
-
terminal: null, // Oxc uses Rive animation instead
|
|
64
|
-
animation: oxcAnimation,
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
const scrollToProject = (index: number) => {
|
|
69
|
-
const card = cardRefs.value[index];
|
|
70
|
-
if (card) {
|
|
71
|
-
card.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
onMounted(() => {
|
|
76
|
-
observer = new IntersectionObserver(
|
|
77
|
-
() => {
|
|
78
|
-
// Calculate which card's center is closest to viewport center
|
|
79
|
-
const viewportCenter = window.innerHeight / 2;
|
|
80
|
-
let closestIndex = 0;
|
|
81
|
-
let closestDistance = Infinity;
|
|
82
|
-
|
|
83
|
-
cardRefs.value.forEach((card, index) => {
|
|
84
|
-
if (!card) return;
|
|
85
|
-
const rect = card.getBoundingClientRect();
|
|
86
|
-
|
|
87
|
-
// Skip if card is completely out of viewport
|
|
88
|
-
if (rect.bottom < 0 || rect.top > window.innerHeight) return;
|
|
89
|
-
|
|
90
|
-
// Calculate card's center position relative to viewport
|
|
91
|
-
const cardCenter = rect.top + rect.height / 2;
|
|
92
|
-
|
|
93
|
-
// Calculate absolute distance to viewport center
|
|
94
|
-
const distance = Math.abs(cardCenter - viewportCenter);
|
|
95
|
-
|
|
96
|
-
// Track the closest card
|
|
97
|
-
if (distance < closestDistance) {
|
|
98
|
-
closestDistance = distance;
|
|
99
|
-
closestIndex = index;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
activeProject.value = closestIndex;
|
|
104
|
-
},
|
|
105
|
-
{ threshold: [0, 0.1, 0.5, 1] }
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
cardRefs.value.forEach((card) => {
|
|
109
|
-
if (card) observer?.observe(card);
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
onUnmounted(() => {
|
|
114
|
-
observer?.disconnect();
|
|
115
|
-
});
|
|
116
|
-
</script>
|
|
117
|
-
|
|
118
|
-
<template>
|
|
119
|
-
<section class="wrapper wrapper--ticks border-t flex">
|
|
120
|
-
<div class="w-72 p-10 sticky top-0 self-start hidden md:flex flex-col">
|
|
121
|
-
<ul class="flex flex-col gap-4">
|
|
122
|
-
<li
|
|
123
|
-
v-for="(project, index) in projects"
|
|
124
|
-
:key="project.id"
|
|
125
|
-
:class="[
|
|
126
|
-
'transition-all duration-500 ease-out',
|
|
127
|
-
activeProject === index ? '' : 'opacity-40 grayscale',
|
|
128
|
-
]"
|
|
129
|
-
>
|
|
130
|
-
<button
|
|
131
|
-
type="button"
|
|
132
|
-
class="flex gap-4 text-base cursor-pointer bg-transparent border-none p-0"
|
|
133
|
-
@click="scrollToProject(index)"
|
|
134
|
-
>
|
|
135
|
-
<img :src="project.icon" :alt="project.name" class="size-6" />
|
|
136
|
-
{{ project.name }}
|
|
137
|
-
</button>
|
|
138
|
-
</li>
|
|
139
|
-
</ul>
|
|
140
|
-
</div>
|
|
141
|
-
<div class="w-full md:border-l border-nickel">
|
|
142
|
-
<!-- Vite -->
|
|
143
|
-
<div
|
|
144
|
-
class="grid md:grid-cols-2 w-full"
|
|
145
|
-
:ref="el => cardRefs[0] = el as HTMLElement"
|
|
146
|
-
data-project="0"
|
|
147
|
-
>
|
|
148
|
-
<div class="flex flex-col p-10 justify-between gap-20">
|
|
149
|
-
<div class="flex flex-col gap-5 max-w-[20rem]">
|
|
150
|
-
<span class="text-grey text-xs font-mono uppercase tracking-wide"
|
|
151
|
-
>Vite</span
|
|
152
|
-
>
|
|
153
|
-
<h4 class="text-white text-pretty">The build tool for the web</h4>
|
|
154
|
-
<p class="text-white/70 text-base max-w-[25rem] text-pretty">
|
|
155
|
-
Vite is the default choice for single-page web applications and
|
|
156
|
-
the foundation for fullstack frameworks like TanStack Start, Nuxt,
|
|
157
|
-
SvelteKit and more.
|
|
158
|
-
</p>
|
|
159
|
-
<a
|
|
160
|
-
:href="projects[0].url"
|
|
161
|
-
target="_blank"
|
|
162
|
-
rel="noopener noreferrer"
|
|
163
|
-
class="button button--sm inline-block w-fit mt-5"
|
|
164
|
-
>Explore Vite</a
|
|
165
|
-
>
|
|
166
|
-
</div>
|
|
167
|
-
<GitHubStats
|
|
168
|
-
href="https://github.com/vitejs/vite"
|
|
169
|
-
stars="75.0k"
|
|
170
|
-
contributors="1,161"
|
|
171
|
-
/>
|
|
172
|
-
</div>
|
|
173
|
-
<div class="flex flex-col min-h-[22rem] sm:min-h-[30rem]">
|
|
174
|
-
<div
|
|
175
|
-
class="relative pl-10 h-full flex flex-col justify-center overflow-clip"
|
|
176
|
-
>
|
|
177
|
-
<div
|
|
178
|
-
:class="[
|
|
179
|
-
'absolute inset-0 bg-vite transition-opacity duration-700 ease-out',
|
|
180
|
-
activatedProjects.has(0) ? 'opacity-100' : 'opacity-0',
|
|
181
|
-
]"
|
|
182
|
-
></div>
|
|
183
|
-
<div
|
|
184
|
-
:class="[
|
|
185
|
-
'block p-2 relative bg-slate rounded-tl rounded-bl outline-1 outline-offset-[2px] outline-white/20 transition-transform duration-700 ease-out z-10',
|
|
186
|
-
activatedProjects.has(0) ? 'translate-x-0' : 'translate-x-10',
|
|
187
|
-
]"
|
|
188
|
-
>
|
|
189
|
-
<img
|
|
190
|
-
v-if="projects[0].terminal"
|
|
191
|
-
loading="lazy"
|
|
192
|
-
:src="projects[0].terminal"
|
|
193
|
-
alt="terminal"
|
|
194
|
-
/>
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
<!-- Vitest -->
|
|
200
|
-
<div
|
|
201
|
-
class="grid md:grid-cols-2 w-full border-t border-nickel"
|
|
202
|
-
:ref="el => cardRefs[1] = el as HTMLElement"
|
|
203
|
-
data-project="1"
|
|
204
|
-
>
|
|
205
|
-
<div class="flex flex-col p-10 justify-between gap-20">
|
|
206
|
-
<div class="flex flex-col gap-5 max-w-[20rem]">
|
|
207
|
-
<span class="text-grey text-xs font-mono uppercase tracking-wide"
|
|
208
|
-
>Vitest</span
|
|
209
|
-
>
|
|
210
|
-
<h4 class="text-white text-pretty">The Vite-native test runner</h4>
|
|
211
|
-
<p class="text-white/70 text-base max-w-[25rem] text-pretty">
|
|
212
|
-
Vitest is a feature-rich test runner that understands your Vite
|
|
213
|
-
config, is Jest-compatible, and works out-of-the-box with
|
|
214
|
-
TypeScript & ESM.
|
|
215
|
-
</p>
|
|
216
|
-
<a
|
|
217
|
-
:href="projects[1].url"
|
|
218
|
-
target="_blank"
|
|
219
|
-
rel="noopener noreferrer"
|
|
220
|
-
class="button button--sm inline-block w-fit mt-5"
|
|
221
|
-
>Explore Vitest</a
|
|
222
|
-
>
|
|
223
|
-
</div>
|
|
224
|
-
<GitHubStats
|
|
225
|
-
href="https://github.com/vitest-dev/vitest"
|
|
226
|
-
stars="14.9k"
|
|
227
|
-
contributors="631"
|
|
228
|
-
/>
|
|
229
|
-
</div>
|
|
230
|
-
<div class="flex flex-col min-h-[22rem] sm:min-h-[30rem]">
|
|
231
|
-
<div
|
|
232
|
-
class="relative pl-10 h-full flex flex-col justify-end overflow-clip pt-10 sm:pt-0"
|
|
233
|
-
>
|
|
234
|
-
<div
|
|
235
|
-
:class="[
|
|
236
|
-
'absolute inset-0 bg-vitest transition-opacity duration-700 ease-out',
|
|
237
|
-
activatedProjects.has(1) ? 'opacity-100' : 'opacity-0',
|
|
238
|
-
]"
|
|
239
|
-
></div>
|
|
240
|
-
<div
|
|
241
|
-
:class="[
|
|
242
|
-
'block p-2 relative bg-slate rounded-tl outline-1 outline-offset-[2px] outline-white/20 transition-transform duration-700 ease-out z-10',
|
|
243
|
-
activatedProjects.has(1) ? 'translate-x-0' : 'translate-x-10',
|
|
244
|
-
]"
|
|
245
|
-
>
|
|
246
|
-
<img
|
|
247
|
-
v-if="projects[1].terminal"
|
|
248
|
-
loading="lazy"
|
|
249
|
-
:src="projects[1].terminal"
|
|
250
|
-
alt="terminal"
|
|
251
|
-
/>
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
</div>
|
|
256
|
-
<!-- Rolldown -->
|
|
257
|
-
<div
|
|
258
|
-
class="grid md:grid-cols-2 w-full border-t border-nickel"
|
|
259
|
-
:ref="el => cardRefs[2] = el as HTMLElement"
|
|
260
|
-
data-project="2"
|
|
261
|
-
>
|
|
262
|
-
<div class="flex flex-col p-10 justify-between gap-20">
|
|
263
|
-
<div class="flex flex-col gap-5 max-w-[20rem]">
|
|
264
|
-
<span class="text-grey text-xs font-mono uppercase tracking-wide"
|
|
265
|
-
>Rolldown</span
|
|
266
|
-
>
|
|
267
|
-
<h4 class="text-white text-pretty">
|
|
268
|
-
The blazing fast JavaScript bundler
|
|
269
|
-
</h4>
|
|
270
|
-
<p class="text-white/70 text-base max-w-[25rem] text-pretty">
|
|
271
|
-
Rolldown is a Rust-based bundler with Rollup-compatible API, and
|
|
272
|
-
esbuild-equivalent performance & feature set. It also powers Vite
|
|
273
|
-
version 8 and above.
|
|
274
|
-
</p>
|
|
275
|
-
<a
|
|
276
|
-
:href="projects[2].url"
|
|
277
|
-
target="_blank"
|
|
278
|
-
rel="noopener noreferrer"
|
|
279
|
-
class="button button--sm inline-block w-fit mt-5"
|
|
280
|
-
>Explore Rolldown</a
|
|
281
|
-
>
|
|
282
|
-
</div>
|
|
283
|
-
<GitHubStats
|
|
284
|
-
href="https://github.com/rolldown/rolldown"
|
|
285
|
-
stars="12.2k"
|
|
286
|
-
contributors="148"
|
|
287
|
-
/>
|
|
288
|
-
</div>
|
|
289
|
-
<div class="flex flex-col min-h-[22rem] sm:min-h-[30rem]">
|
|
290
|
-
<div
|
|
291
|
-
class="relative pl-10 h-full flex flex-col justify-center overflow-clip py-10 sm:py-0"
|
|
292
|
-
>
|
|
293
|
-
<div
|
|
294
|
-
:class="[
|
|
295
|
-
'absolute inset-0 bg-rolldown transition-opacity duration-700 ease-out',
|
|
296
|
-
activatedProjects.has(2) ? 'opacity-100' : 'opacity-0',
|
|
297
|
-
]"
|
|
298
|
-
></div>
|
|
299
|
-
<div
|
|
300
|
-
:class="[
|
|
301
|
-
'block p-2 relative bg-slate rounded-tl rounded-bl outline-1 outline-offset-[2px] outline-white/20 transition-transform duration-700 ease-out z-10',
|
|
302
|
-
activatedProjects.has(2) ? 'translate-x-0' : 'translate-x-10',
|
|
303
|
-
]"
|
|
304
|
-
>
|
|
305
|
-
<img
|
|
306
|
-
v-if="projects[2].terminal"
|
|
307
|
-
loading="lazy"
|
|
308
|
-
:src="projects[2].terminal"
|
|
309
|
-
alt="terminal"
|
|
310
|
-
/>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
314
|
-
</div>
|
|
315
|
-
<!-- Oxc -->
|
|
316
|
-
<div
|
|
317
|
-
class="grid md:grid-cols-2 w-full border-t border-nickel"
|
|
318
|
-
:ref="el => cardRefs[3] = el as HTMLElement"
|
|
319
|
-
data-project="3"
|
|
320
|
-
>
|
|
321
|
-
<div class="flex flex-col p-10 justify-between gap-20">
|
|
322
|
-
<div class="flex flex-col gap-5 max-w-[20rem]">
|
|
323
|
-
<span class="text-grey text-xs font-mono uppercase tracking-wide"
|
|
324
|
-
>Oxc</span
|
|
325
|
-
>
|
|
326
|
-
<h4 class="text-white text-pretty">
|
|
327
|
-
The fastest JavaScript language toolchain
|
|
328
|
-
</h4>
|
|
329
|
-
<p class="text-white/70 text-base max-w-[25rem] text-pretty">
|
|
330
|
-
Oxc is the foundation of our unified toolchain. It includes linter
|
|
331
|
-
(oxlint), formatter (oxfmt), parser, resolver, transformer, and
|
|
332
|
-
minifier, all with state-of-the-art performance.
|
|
333
|
-
</p>
|
|
334
|
-
<a
|
|
335
|
-
:href="projects[3].url"
|
|
336
|
-
target="_blank"
|
|
337
|
-
rel="noopener noreferrer"
|
|
338
|
-
class="button button--sm inline-block w-fit mt-5"
|
|
339
|
-
>Explore Oxc</a
|
|
340
|
-
>
|
|
341
|
-
</div>
|
|
342
|
-
<GitHubStats
|
|
343
|
-
href="https://github.com/oxc-project/oxc"
|
|
344
|
-
stars="17.2k"
|
|
345
|
-
contributors="268"
|
|
346
|
-
/>
|
|
347
|
-
</div>
|
|
348
|
-
<div class="flex flex-col min-h-[22rem] sm:min-h-[30rem]">
|
|
349
|
-
<div
|
|
350
|
-
class="relative pl-10 h-full flex flex-col justify-center overflow-clip"
|
|
351
|
-
>
|
|
352
|
-
<div
|
|
353
|
-
:class="[
|
|
354
|
-
'absolute inset-0 bg-oxc transition-opacity duration-700 ease-out',
|
|
355
|
-
activatedProjects.has(3) ? 'opacity-100' : 'opacity-0',
|
|
356
|
-
]"
|
|
357
|
-
></div>
|
|
358
|
-
<div
|
|
359
|
-
:class="[
|
|
360
|
-
'relative transition-transform duration-700 ease-out z-10',
|
|
361
|
-
activatedProjects.has(3) ? 'translate-x-0' : 'translate-x-10',
|
|
362
|
-
]"
|
|
363
|
-
>
|
|
364
|
-
<RiveAnimation
|
|
365
|
-
:desktop-src="projects[3].animation"
|
|
366
|
-
:mobile-src="projects[3].animation"
|
|
367
|
-
:desktop-width="480"
|
|
368
|
-
:desktop-height="480"
|
|
369
|
-
:mobile-width="480"
|
|
370
|
-
:mobile-height="480"
|
|
371
|
-
canvas-class="w-full"
|
|
372
|
-
/>
|
|
373
|
-
</div>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
</section>
|
|
379
|
-
</template>
|
|
380
|
-
|
|
381
|
-
<style scoped>
|
|
382
|
-
.bg-vite {
|
|
383
|
-
background-image: url("@assets/voidzero/backgrounds/vite.jpg");
|
|
384
|
-
background-size: cover;
|
|
385
|
-
background-position: center;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.bg-vitest {
|
|
389
|
-
background-image: url("@assets/voidzero/backgrounds/vitest.jpg");
|
|
390
|
-
background-size: cover;
|
|
391
|
-
background-position: center;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.bg-rolldown {
|
|
395
|
-
background-image: url("@assets/voidzero/backgrounds/rolldown.jpg");
|
|
396
|
-
background-size: cover;
|
|
397
|
-
background-position: center;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.bg-oxc {
|
|
401
|
-
background-image: url("@assets/voidzero/backgrounds/oxc.jpg");
|
|
402
|
-
background-size: cover;
|
|
403
|
-
background-position: center;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
/* Respect user's motion preferences */
|
|
407
|
-
@media (prefers-reduced-motion: reduce) {
|
|
408
|
-
* {
|
|
409
|
-
animation-duration: 0.01ms !important;
|
|
410
|
-
animation-iteration-count: 1 !important;
|
|
411
|
-
transition-duration: 0.01ms !important;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/* Ensure smooth scrolling behavior */
|
|
416
|
-
html {
|
|
417
|
-
scroll-behavior: smooth;
|
|
418
|
-
}
|
|
419
|
-
</style>
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import 'vue3-carousel/carousel.css'
|
|
3
|
-
import {Carousel, Slide, Pagination} from 'vue3-carousel'
|
|
4
|
-
|
|
5
|
-
type BaseAuthor = {
|
|
6
|
-
name: string
|
|
7
|
-
}
|
|
8
|
-
type GravatarAuthor = {
|
|
9
|
-
type: 'gravatar',
|
|
10
|
-
gravatar: string
|
|
11
|
-
}
|
|
12
|
-
type GitHubAuthor = {
|
|
13
|
-
type: 'github',
|
|
14
|
-
username: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type Author = BaseAuthor & (GravatarAuthor | GitHubAuthor)
|
|
18
|
-
|
|
19
|
-
export interface Post {
|
|
20
|
-
title: string
|
|
21
|
-
url: string
|
|
22
|
-
category: string
|
|
23
|
-
cover: string
|
|
24
|
-
authors: Author[]
|
|
25
|
-
date: {
|
|
26
|
-
time: number
|
|
27
|
-
string: string
|
|
28
|
-
}
|
|
29
|
-
excerpt: string | undefined
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface Props {
|
|
33
|
-
posts?: Post[]
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
withDefaults(defineProps<Props>(), {
|
|
37
|
-
posts: () => []
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const carouselConfig = {
|
|
41
|
-
itemsToShow: 'auto',
|
|
42
|
-
wrapAround: true,
|
|
43
|
-
snapAlign: 'start',
|
|
44
|
-
autoplay: 3000,
|
|
45
|
-
transition: 500,
|
|
46
|
-
mouseDrag: true,
|
|
47
|
-
touchDrag: true
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<template>
|
|
52
|
-
<section
|
|
53
|
-
class="wrapper border-t wrapper--ticks grid grid-cols-1 md:grid-cols-10 divide-x-0 md:divide-x divide-stroke h-auto md:h-[32.5rem]">
|
|
54
|
-
<div class="flex flex-col divide-y divide-stroke md:col-span-4">
|
|
55
|
-
<div class="p-5 md:p-10 grow-0 md:grow flex flex-col gap-6 md:gap-10 md:h-72 justify-center md:justify-start">
|
|
56
|
-
<h3 class="text-pretty">Featured resources & updates</h3>
|
|
57
|
-
<a href="/blog" class="button w-fit">All Resources</a>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="px-6 py-6 md:px-10 pt-16 md:pb-8 flex flex-col gap-4 relative">
|
|
60
|
-
<span class="bg-[#F4F3EC]/40 text-primary text-xs absolute top-3 left-3 p-2 rounded font-mono">js</span>
|
|
61
|
-
<div class="flex flex-col gap-0">
|
|
62
|
-
<div class="text-grey text-xs font-mono">resources</div>
|
|
63
|
-
<div class="text-primary text-xs font-mono">.filter<span class="text-grey">(i => i.collection ===</span> "featured"<span class="text-grey">)</span></div>
|
|
64
|
-
<div class="text-primary text-xs font-mono">.filter<span class="text-grey">(i => i.postedBy ===</span> "VoidZero"<span class="text-grey">)</span></div>
|
|
65
|
-
<div class="text-primary text-xs font-mono">.filter<span class="text-grey">(i => i.articles.length ===</span> {{posts.length}}<span class="text-grey">)</span></div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="col-span-1 md:col-span-6 border-t border-stroke md:border-t-0">
|
|
70
|
-
<Carousel v-bind="carouselConfig" class="resources-carousel py-10 pb-30 md:pb-10">
|
|
71
|
-
<Slide v-for="(post, index) in posts" :key="index">
|
|
72
|
-
<a
|
|
73
|
-
:href="post.url"
|
|
74
|
-
class="bg-white outline-1 outline-stroke my-1 ml-5 md:ml-4 rounded w-[80vw] md:w-[25rem] lg:w-[21rem] aspect-square translate-x-[-1px] flex flex-col overflow-hidden hover:outline-2 transition-all">
|
|
75
|
-
<div class="w-full aspect-[2/1] overflow-hidden">
|
|
76
|
-
<img
|
|
77
|
-
loading="lazy"
|
|
78
|
-
:src="post.cover"
|
|
79
|
-
:alt="post.title"
|
|
80
|
-
class="w-full h-full object-cover">
|
|
81
|
-
</div>
|
|
82
|
-
<div class="p-5 flex flex-col gap-4">
|
|
83
|
-
<span class="text-xs text-grey font-mono uppercase tracking-widest">// {{ post.category }}</span>
|
|
84
|
-
<h4 class="text-xl text-primary font-sans text-pretty font-normal">
|
|
85
|
-
{{ post.title }}
|
|
86
|
-
</h4>
|
|
87
|
-
</div>
|
|
88
|
-
</a>
|
|
89
|
-
</Slide>
|
|
90
|
-
<template #addons>
|
|
91
|
-
<Pagination />
|
|
92
|
-
</template>
|
|
93
|
-
</Carousel>
|
|
94
|
-
</div>
|
|
95
|
-
</section>
|
|
96
|
-
</template>
|
|
97
|
-
|
|
98
|
-
<style>
|
|
99
|
-
.is-dragging {
|
|
100
|
-
pointer-events: none;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/* Add left padding to first slide, right padding to last slide - scoped to Resources carousel only */
|
|
104
|
-
.resources-carousel .carousel__slide:first-child {
|
|
105
|
-
padding-left: 1.25rem;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.resources-carousel .carousel__slide:last-child {
|
|
109
|
-
padding-right: 1.25rem;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/* Pagination dots - positioned at bottom left */
|
|
113
|
-
.resources-carousel .carousel__pagination {
|
|
114
|
-
position: absolute;
|
|
115
|
-
bottom: 1rem;
|
|
116
|
-
left: 1.25rem;
|
|
117
|
-
transform: none;
|
|
118
|
-
gap: 0.5rem;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@media (min-width: 768px) {
|
|
122
|
-
.resources-carousel .carousel__pagination {
|
|
123
|
-
left: 2rem;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@media (min-width: 1024px) {
|
|
128
|
-
.resources-carousel .carousel__pagination {
|
|
129
|
-
bottom: -2.5rem;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.resources-carousel .carousel__pagination-button {
|
|
134
|
-
width: 0.5rem;
|
|
135
|
-
height: 0.5rem;
|
|
136
|
-
border-radius: 50%;
|
|
137
|
-
background-color: var(--color-stroke);
|
|
138
|
-
transition: background-color 0.2s;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.resources-carousel .carousel__pagination-button--active {
|
|
142
|
-
background-color: var(--color-primary);
|
|
143
|
-
}
|
|
144
|
-
</style>
|