@voidzero-dev/vitepress-theme 0.0.17 → 0.0.18
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/dist/_virtual/_/plugin-vue/export-helper.js +11 -0
- package/dist/assets/cta-background-CgYtVhnO.jpg +1 -0
- package/dist/assets/cta-background.jpg +1 -0
- package/dist/{style.css → index.css} +14 -11
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -6544
- package/dist/vitepress/assets/cta-background.js +5 -0
- package/dist/vitepress/components/Eyebrow.js +18 -0
- package/dist/vitepress/components/Footer.js +72 -0
- package/dist/vitepress/components/Header.js +34 -0
- package/dist/vitepress/components/RiveAnimation.js +117 -0
- package/dist/vitepress/components/Terminal.js +161 -0
- package/dist/vitepress/components/icons/VZIconBluesky.js +21 -0
- package/dist/vitepress/components/icons/VZIconGitHub.js +21 -0
- package/dist/vitepress/components/icons/VZIconLogo.js +24 -0
- package/dist/vitepress/components/icons/VZIconTwitter.js +21 -0
- package/dist/vitepress/components/terminal-animations/TerminalAnimation1.js +37 -0
- package/dist/vitepress/components/terminal-animations/TerminalAnimation2.js +44 -0
- package/dist/vitepress/components/terminal-animations/TerminalAnimation3.js +37 -0
- package/dist/vitepress/components/terminal-animations/TerminalAnimation4.js +37 -0
- package/dist/vitepress/components/terminal-animations/TerminalAnimation5.js +37 -0
- package/dist/vitepress/components/terminal-animations/TerminalAnimation6.js +37 -0
- package/dist/vitepress/index.d.ts +34 -0
- package/dist/vitepress/index.js +21 -0
- package/package.json +14 -22
- package/assets/checkmark.svg +0 -1
- package/assets/primary-button-background.jpg +0 -0
- package/assets/terminal-background.jpg +0 -0
- package/components/Eyebrow.vue +0 -11
- package/components/Footer.vue +0 -44
- package/components/Header.vue +0 -38
- package/components/RiveAnimation.vue +0 -144
- package/components/Terminal.vue +0 -165
- package/components/terminal-animations/TerminalAnimation1.vue +0 -54
- package/components/terminal-animations/TerminalAnimation2.vue +0 -59
- package/components/terminal-animations/TerminalAnimation3.vue +0 -46
- package/components/terminal-animations/TerminalAnimation4.vue +0 -50
- package/components/terminal-animations/TerminalAnimation5.vue +0 -51
- package/components/terminal-animations/TerminalAnimation6.vue +0 -55
- package/composables/useTypewriter.ts +0 -43
- package/dist/assets/terminal-background.jpg +0 -0
- package/dist/index.js.map +0 -1
- package/fonts/APK-Protocol-Medium.woff2 +0 -0
- package/fonts/KHTeka-Medium.woff2 +0 -0
- package/fonts/KHTeka-Regular.woff2 +0 -0
- package/fonts/KHTekaMono-Medium.woff2 +0 -0
- package/fonts/KHTekaMono-Regular.woff2 +0 -0
- package/style.css +0 -343
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, onMounted, onUnmounted, openBlock } from "vue";
|
|
2
|
+
import Typewriter from "typewriter-effect/dist/core";
|
|
3
|
+
|
|
4
|
+
//#region src/vitepress/components/terminal-animations/TerminalAnimation4.vue
|
|
5
|
+
const _hoisted_1 = { class: "font-mono text-sm text-white leading-[1.5rem]" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "TerminalAnimation4",
|
|
8
|
+
props: { onAnimationComplete: { type: Function } },
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
let typewriter;
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
const target = document.getElementById("terminal-code");
|
|
14
|
+
typewriter = new Typewriter(target, {
|
|
15
|
+
loop: false,
|
|
16
|
+
delay: 1
|
|
17
|
+
});
|
|
18
|
+
typewriter.typeString(`<span>$ vite fmt</span>`).pauseFor(200).pasteString(`<span class="block w-full h-[1rem]"></span>`).pasteString(`<div class="block text-grey"><span class="text-vite">VITE+ v1.0.0</span> <span class="text-aqua">fmt</span></div>`).pauseFor(500).pasteString(`<div class="block">src/App.css <span class="text-aqua">0ms</span> <span class="text-grey">(unchanged)</span></div>`).pasteString(`<div class="block">src/App.tsx <span class="text-aqua">1ms</span></div>`).pasteString(`<div class="block">src/index.css <span class="text-aqua">0ms</span> <span class="text-grey">(unchanged)</span></div>`).pasteString(`<div class="block">src/main.tsx <span class="text-aqua">1ms</span></div>`).pasteString(`<div class="block">src/vite-env.d.ts <span class="text-aqua">0ms</span> <span class="text-grey">(unchanged)</span></div>`).pasteString(`<div class="block"><span class="text-zest">✓</span> Formatted <span class="text-aqua">2 files</span> in <span class="text-aqua">2ms</span>.</div>`).pasteString(`<span class="block w-full h-[1rem]"></span>`).callFunction(() => {
|
|
19
|
+
if (props.onAnimationComplete) {
|
|
20
|
+
props.onAnimationComplete();
|
|
21
|
+
}
|
|
22
|
+
}).start();
|
|
23
|
+
});
|
|
24
|
+
onUnmounted(() => {
|
|
25
|
+
if (typewriter) {
|
|
26
|
+
typewriter.stop();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("p", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("span", { id: "terminal-code" }, null, -1)])]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var TerminalAnimation4_default = _sfc_main;
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { TerminalAnimation4_default as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, onMounted, onUnmounted, openBlock } from "vue";
|
|
2
|
+
import Typewriter from "typewriter-effect/dist/core";
|
|
3
|
+
|
|
4
|
+
//#region src/vitepress/components/terminal-animations/TerminalAnimation5.vue
|
|
5
|
+
const _hoisted_1 = { class: "font-mono text-sm text-white leading-[1.5rem]" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "TerminalAnimation5",
|
|
8
|
+
props: { onAnimationComplete: { type: Function } },
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
let typewriter;
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
const target = document.getElementById("terminal-code");
|
|
14
|
+
typewriter = new Typewriter(target, {
|
|
15
|
+
loop: false,
|
|
16
|
+
delay: 1
|
|
17
|
+
});
|
|
18
|
+
typewriter.typeString(`<span>$ vite test</span>`).pauseFor(200).pasteString(`<span class="block w-full h-[1rem]"></span>`).pasteString(`<div class="block"><span class="text-vite">VITE+ v1.0.0</span> <span class="text-aqua">test</span> RUN ~/vite-plus-demo</div>`).pasteString(`<span class="block w-full h-[1rem]"></span>`).pauseFor(300).pasteString(`<div class="block"><span class="text-zest">✓</span> test/hello.spec.ts <span class="text-grey">(1 test)</span> <span class="text-zest">1ms</span></div>`).pasteString(`<span class="block w-full h-[1rem]"></span>`).pasteString(`<div class="block text-grey">Test Files <span class="text-zest">1 passed</span> <span class="text-grey">(1)</span></div>`).pasteString(`<div class="block text-grey">Tests <span class="text-zest">1 passed</span> <span class="text-grey">(1)</span></div>`).pasteString(`<div class="block text-grey">Start at <span class="text-white">00:13:44</span></div>`).pasteString(`<div class="block text-grey">Duration <span class="text-white">199ms</span> <span class="text-grey">(transform 13ms, setup 0ms, collect 8ms, tests 1ms, environment 0ms, prepare 33ms)</span></div>`).pasteString(`<span class="block w-full h-[1rem]"></span>`).callFunction(() => {
|
|
19
|
+
if (props.onAnimationComplete) {
|
|
20
|
+
props.onAnimationComplete();
|
|
21
|
+
}
|
|
22
|
+
}).start();
|
|
23
|
+
});
|
|
24
|
+
onUnmounted(() => {
|
|
25
|
+
if (typewriter) {
|
|
26
|
+
typewriter.stop();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("p", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("span", { id: "terminal-code" }, null, -1)])]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var TerminalAnimation5_default = _sfc_main;
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { TerminalAnimation5_default as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, onMounted, onUnmounted, openBlock } from "vue";
|
|
2
|
+
import Typewriter from "typewriter-effect/dist/core";
|
|
3
|
+
|
|
4
|
+
//#region src/vitepress/components/terminal-animations/TerminalAnimation6.vue
|
|
5
|
+
const _hoisted_1 = { class: "font-mono text-sm text-white leading-[1.5rem]" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "TerminalAnimation6",
|
|
8
|
+
props: { onAnimationComplete: { type: Function } },
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
let typewriter;
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
const target = document.getElementById("terminal-code");
|
|
14
|
+
typewriter = new Typewriter(target, {
|
|
15
|
+
loop: false,
|
|
16
|
+
delay: 1
|
|
17
|
+
});
|
|
18
|
+
typewriter.typeString(`<span>$ vite build</span>`).pauseFor(200).pasteString(`<span class="block w-full h-[1rem]"></span>`).pasteString(`<div class="block"><span class="text-vite">VITE+ v1.0.0</span> <span class="text-aqua">building for production</span></div>`).pauseFor(100).pasteString(`<div class="block">transforming...</div>`).pauseFor(400).pasteString(`<div class="block"><span class="text-zest">✓</span> <span class="text-grey">32 modules transformed...</span></div>`).pauseFor(300).pasteString(`<div class="block">rendering chunks...</div>`).pasteString(`<div class="block">computing gzip size...</div>`).pasteString(`<div class="block text-grey"><span class="w-72 inline-block">dist/<span class="text-white">index.html</span></span> 0.46 kB | gzip: 0.30 kB</div>`).pasteString(`<div class="block text-grey"><span class="w-72 inline-block">dist/assets/<span class="text-vite">react-CHdo91hT.svg</span></span> 4.13 kB | gzip: 2.05 kB</div>`).pasteString(`<div class="block text-grey"><span class="w-72 inline-block">dist/assets/<span class="text-electric">index-D8b4DHJx.css</span></span> 1.39 kB | gzip: 0.71 kB</div>`).pasteString(`<div class="block text-grey"><span class="w-72 inline-block">dist/assets/<span class="text-aqua">index-CAl1KfkQ.js</span></span>188.06 kB | gzip: 59.21 kB</div>`).pasteString(`<div class="block"><span class="text-zest">✓ built in 308ms</span></div>`).pasteString(`<span class="block w-full h-[1rem]"></span>`).callFunction(() => {
|
|
19
|
+
if (props.onAnimationComplete) {
|
|
20
|
+
props.onAnimationComplete();
|
|
21
|
+
}
|
|
22
|
+
}).start();
|
|
23
|
+
});
|
|
24
|
+
onUnmounted(() => {
|
|
25
|
+
if (typewriter) {
|
|
26
|
+
typewriter.stop();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("p", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("span", { id: "terminal-code" }, null, -1)])]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var TerminalAnimation6_default = _sfc_main;
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { TerminalAnimation6_default as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as vitepress0 from "vitepress";
|
|
2
|
+
|
|
3
|
+
//#region src/vitepress/index.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @voidzerodev/vitepress-theme
|
|
7
|
+
*
|
|
8
|
+
* Shared VitePress theme providing base styles, fonts, and design tokens
|
|
9
|
+
* for VoidZero projects.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* Extend this theme in your project's VitePress theme.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // In your-project/.vitepress/theme/index.ts
|
|
17
|
+
* import Theme from '@voidzero-dev/vitepress-theme'
|
|
18
|
+
* import './overrides.css' // Your project-specific styles
|
|
19
|
+
*
|
|
20
|
+
* export default {
|
|
21
|
+
* extends: Theme,
|
|
22
|
+
* Layout: YourLayout
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
declare const VPTheme: {
|
|
28
|
+
Layout: () => null;
|
|
29
|
+
enhanceApp({
|
|
30
|
+
app
|
|
31
|
+
}: vitepress0.EnhanceAppContext): void;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { VPTheme };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Footer_default from "./components/Footer.js";
|
|
2
|
+
import Header_default from "./components/Header.js";
|
|
3
|
+
import Terminal_default from "./components/Terminal.js";
|
|
4
|
+
import Eyebrow_default from "./components/Eyebrow.js";
|
|
5
|
+
import RiveAnimation_default from "./components/RiveAnimation.js";
|
|
6
|
+
|
|
7
|
+
//#region src/vitepress/index.ts
|
|
8
|
+
const VPTheme = {
|
|
9
|
+
Layout: () => null,
|
|
10
|
+
enhanceApp({ app }) {
|
|
11
|
+
app.component("Footer", Footer_default);
|
|
12
|
+
app.component("Header", Header_default);
|
|
13
|
+
app.component("Terminal", Terminal_default);
|
|
14
|
+
app.component("Eyebrow", Eyebrow_default);
|
|
15
|
+
app.component("RiveAnimation", RiveAnimation_default);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var vitepress_default = VPTheme;
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { VPTheme, vitepress_default as default };
|
package/package.json
CHANGED
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vitepress-theme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "Shared VitePress theme for VoidZero projects",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
6
7
|
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
+
"style": "./dist/index.css",
|
|
11
12
|
"types": "./dist/index.d.ts",
|
|
12
13
|
"import": "./dist/index.js"
|
|
13
14
|
},
|
|
14
|
-
"./
|
|
15
|
+
"./index.css": "./dist/index.css"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
"components",
|
|
19
|
-
"composables",
|
|
20
|
-
"assets",
|
|
21
|
-
"fonts",
|
|
22
|
-
"style.css"
|
|
18
|
+
"dist"
|
|
23
19
|
],
|
|
24
20
|
"scripts": {
|
|
25
|
-
"
|
|
21
|
+
"dev": "tsdown --watch",
|
|
22
|
+
"build": "tsdown"
|
|
26
23
|
},
|
|
27
24
|
"peerDependencies": {
|
|
28
|
-
"@tailwindcss/typography": "^0.5.19",
|
|
29
|
-
"tailwindcss": "^4.0.0",
|
|
30
25
|
"vitepress": "^2.0.0-alpha.12",
|
|
31
26
|
"vue": "^3.5.0"
|
|
32
27
|
},
|
|
33
28
|
"dependencies": {
|
|
34
29
|
"@rive-app/canvas": "^2.31.6",
|
|
35
|
-
"
|
|
30
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
31
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
32
|
+
"reka-ui": "^2.5.1",
|
|
33
|
+
"tailwindcss": "^4.1.13",
|
|
34
|
+
"typewriter-effect": "^2.22.0"
|
|
36
35
|
},
|
|
37
|
-
"keywords": [
|
|
38
|
-
"vitepress",
|
|
39
|
-
"theme",
|
|
40
|
-
"voidzero",
|
|
41
|
-
"tailwind"
|
|
42
|
-
],
|
|
43
|
-
"license": "MIT",
|
|
44
36
|
"devDependencies": {
|
|
45
|
-
"
|
|
37
|
+
"tsdown": "^0.15.11",
|
|
46
38
|
"typescript": "^5.9.3",
|
|
47
|
-
"
|
|
39
|
+
"unplugin-vue": "^7.0.4",
|
|
48
40
|
"vue-tsc": "^3.1.2"
|
|
49
41
|
}
|
|
50
42
|
}
|
package/assets/checkmark.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" fill="none" viewBox="0 0 20 19"><circle cx="10" cy="9.5" r="9" stroke="#3b3440" stroke-width=".5"/><path stroke="#fff" stroke-width="1.2" d="M17.794 14a9 9 0 0 0 0-9M2.206 14a9 9 0 0 1 0-9"/><path stroke="#fff" stroke-linejoin="bevel" stroke-width="1.2" d="m6.249 9.788 2.308 2.309 5.195-5.195"/></svg>
|
|
Binary file
|
|
Binary file
|
package/components/Eyebrow.vue
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
defineProps<{
|
|
3
|
-
title: string
|
|
4
|
-
}>()
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<section class="wrapper wrapper--ticks border-t p-5 pl-10">
|
|
9
|
-
<span class="text-nickel dark:text-white text-xs font-medium font-mono uppercase tracking-wide">{{ title }}</span>
|
|
10
|
-
</section>
|
|
11
|
-
</template>
|
package/components/Footer.vue
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<footer class="bg-primary" data-theme="dark">
|
|
3
|
-
<section class="wrapper">
|
|
4
|
-
<div class="bg-wine py-16 md:py-30 px-5 md:px-0 overflow-clip flex flex-col items-center justify-center gap-8 md:gap-12">
|
|
5
|
-
<h2 class="text-white w-full md:w-2xl text-center text-balance">Take your team's productivity to the next level with Vite+</h2>
|
|
6
|
-
<div class="flex items-center gap-5">
|
|
7
|
-
<a href="https://tally.so/r/nGWebL" target="_blank" rel="noopener noreferrer" class="button">Register your interest</a>
|
|
8
|
-
<a href="https://voidzero.dev/posts/announcing-vite-plus?utm_source=viteplusdev&utm_content=bottom_learn_more" target="_blank" rel="noopener noreferrer" class="button">
|
|
9
|
-
Learn more
|
|
10
|
-
</a>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="px-5 md:px-24 pt-10 md:pt-16 pb-16 md:pb-30 flex flex-col md:flex-row gap-10 md:gap-0 md:justify-between">
|
|
14
|
-
<div>
|
|
15
|
-
<p class="text-grey text-xs font-mono uppercase tracking-wide mb-8">Company</p>
|
|
16
|
-
<ul class="flex flex-col gap-3">
|
|
17
|
-
<li><a href="https://voidzero.dev/" target="_blank" rel="noopener noreferrer" class="text-white text-base">VoidZero</a></li>
|
|
18
|
-
<li><a href="https://vite.dev/" target="_blank" rel="noopener noreferrer" class="text-white text-base">Vite</a></li>
|
|
19
|
-
<li><a href="https://rolldown.rs/" target="_blank" rel="noopener noreferrer" class="text-white text-base">Rolldown</a></li>
|
|
20
|
-
<li><a href="https://vitest.dev/" target="_blank" rel="noopener noreferrer" class="text-white text-base">Vitest</a></li>
|
|
21
|
-
<li><a href="https://oxc.rs/" target="_blank" rel="noopener noreferrer" class="text-white text-base">Oxc</a></li>
|
|
22
|
-
</ul>
|
|
23
|
-
</div>
|
|
24
|
-
<div>
|
|
25
|
-
<p class="text-grey text-xs font-mono uppercase tracking-wide mb-8">Social</p>
|
|
26
|
-
<ul class="flex flex-col gap-3">
|
|
27
|
-
<li><a href="https://github.com/voidzero-dev" target="_blank" rel="noopener noreferrer" class="text-white text-base">GitHub</a></li>
|
|
28
|
-
<li><a href="https://web-cdn.bsky.app/profile/voidzero.dev" target="_blank" rel="noopener noreferrer" class="text-white text-base">Bluesky</a></li>
|
|
29
|
-
<li><a href="https://x.com/voidzerodev" target="_blank" rel="noopener noreferrer" class="text-white text-base">X.com</a></li>
|
|
30
|
-
</ul>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</section>
|
|
34
|
-
<section class="wrapper wrapper--ticks border-t py-5 px-5 md:px-24">
|
|
35
|
-
<p class="text-sm">© {{ new Date().getFullYear() }} VoidZero Inc. <span class="hidden sm:inline ">All Rights Reserved.</span></p>
|
|
36
|
-
</section>
|
|
37
|
-
</footer>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<style scoped>
|
|
41
|
-
|
|
42
|
-
</style>
|
|
43
|
-
<script setup lang="ts">
|
|
44
|
-
</script>
|
package/components/Header.vue
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {useData, useRoute} from 'vitepress'
|
|
3
|
-
|
|
4
|
-
const {site, theme} = useData()
|
|
5
|
-
const nav = theme.value.nav
|
|
6
|
-
|
|
7
|
-
const route = useRoute()
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<header class="wrapper px-6 py-7 flex items-center justify-between">
|
|
12
|
-
<div class="flex items-center gap-10">
|
|
13
|
-
<a href="/" class="text-primary dark:text-white font-heading text-lg font-medium">
|
|
14
|
-
{{ site.title }}
|
|
15
|
-
</a>
|
|
16
|
-
<ul class="nav">
|
|
17
|
-
<li v-for="navItem in nav" :key="navItem.link">
|
|
18
|
-
<a
|
|
19
|
-
:class="{ active: route.path === navItem.link }"
|
|
20
|
-
:href="navItem.link"
|
|
21
|
-
>
|
|
22
|
-
{{ navItem.text }}
|
|
23
|
-
</a>
|
|
24
|
-
</li>
|
|
25
|
-
</ul>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<div class="flex items-center gap-6">
|
|
29
|
-
<slot name="right-side">
|
|
30
|
-
<!-- Right-aligned links / calls-to-action -->
|
|
31
|
-
</slot>
|
|
32
|
-
</div>
|
|
33
|
-
</header>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<style scoped>
|
|
37
|
-
|
|
38
|
-
</style>
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import * as rive from "@rive-app/canvas"
|
|
3
|
-
import { ref, onMounted, onUnmounted, computed } from "vue"
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
desktopSrc: string
|
|
7
|
-
mobileSrc?: string
|
|
8
|
-
breakpoint?: number
|
|
9
|
-
stateMachines?: string
|
|
10
|
-
canvasClass?: string
|
|
11
|
-
desktopWidth?: number
|
|
12
|
-
desktopHeight?: number
|
|
13
|
-
mobileWidth?: number
|
|
14
|
-
mobileHeight?: number
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
-
breakpoint: 768, // md breakpoint
|
|
19
|
-
stateMachines: "State Machine 1",
|
|
20
|
-
canvasClass: "w-full"
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const canvasRef = ref<HTMLCanvasElement | null>(null)
|
|
24
|
-
const containerRef = ref<HTMLElement | null>(null)
|
|
25
|
-
let riveInstance: rive.Rive | null = null
|
|
26
|
-
let hasStarted = ref(false)
|
|
27
|
-
let observer: IntersectionObserver | null = null
|
|
28
|
-
|
|
29
|
-
const isMobile = ref(false)
|
|
30
|
-
|
|
31
|
-
const checkMobile = () => {
|
|
32
|
-
isMobile.value = window.innerWidth < props.breakpoint
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const getCurrentSrc = () => {
|
|
36
|
-
return isMobile.value && props.mobileSrc ? props.mobileSrc : props.desktopSrc
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const currentWidth = computed(() => {
|
|
40
|
-
return isMobile.value && props.mobileWidth ? props.mobileWidth : props.desktopWidth
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
const currentHeight = computed(() => {
|
|
44
|
-
return isMobile.value && props.mobileHeight ? props.mobileHeight : props.desktopHeight
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
const loadAnimation = () => {
|
|
48
|
-
if (!canvasRef.value || riveInstance) return
|
|
49
|
-
|
|
50
|
-
const src = getCurrentSrc()
|
|
51
|
-
|
|
52
|
-
riveInstance = new rive.Rive({
|
|
53
|
-
src,
|
|
54
|
-
canvas: canvasRef.value,
|
|
55
|
-
autoplay: false,
|
|
56
|
-
stateMachines: props.stateMachines,
|
|
57
|
-
onLoad: () => {
|
|
58
|
-
riveInstance?.resizeDrawingSurfaceToCanvas()
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const playAnimation = () => {
|
|
64
|
-
if (riveInstance) {
|
|
65
|
-
riveInstance.play()
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const cleanupAnimation = () => {
|
|
70
|
-
if (riveInstance) {
|
|
71
|
-
riveInstance.cleanup()
|
|
72
|
-
riveInstance = null
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const handleResize = () => {
|
|
77
|
-
const wasMobile = isMobile.value
|
|
78
|
-
checkMobile()
|
|
79
|
-
|
|
80
|
-
// If mobile state changed, reload with correct source
|
|
81
|
-
if (wasMobile !== isMobile.value) {
|
|
82
|
-
const wasPlaying = hasStarted.value
|
|
83
|
-
cleanupAnimation()
|
|
84
|
-
loadAnimation()
|
|
85
|
-
if (wasPlaying) {
|
|
86
|
-
playAnimation()
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
onMounted(() => {
|
|
92
|
-
checkMobile()
|
|
93
|
-
|
|
94
|
-
// Load animation immediately
|
|
95
|
-
loadAnimation()
|
|
96
|
-
|
|
97
|
-
// Set up intersection observer to play animation when in viewport
|
|
98
|
-
observer = new IntersectionObserver(
|
|
99
|
-
(entries) => {
|
|
100
|
-
entries.forEach((entry) => {
|
|
101
|
-
if (entry.isIntersecting && !hasStarted.value) {
|
|
102
|
-
hasStarted.value = true
|
|
103
|
-
playAnimation()
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
threshold: 0.1 // Start when 10% visible
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
if (containerRef.value) {
|
|
113
|
-
observer.observe(containerRef.value)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Listen for window resize to handle breakpoint changes
|
|
117
|
-
window.addEventListener('resize', handleResize)
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
onUnmounted(() => {
|
|
121
|
-
cleanupAnimation()
|
|
122
|
-
|
|
123
|
-
if (observer && containerRef.value) {
|
|
124
|
-
observer.unobserve(containerRef.value)
|
|
125
|
-
observer.disconnect()
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
window.removeEventListener('resize', handleResize)
|
|
129
|
-
})
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<template>
|
|
133
|
-
<div ref="containerRef" class="pointer-events-none touch-none select-none">
|
|
134
|
-
<canvas
|
|
135
|
-
ref="canvasRef"
|
|
136
|
-
:width="currentWidth"
|
|
137
|
-
:height="currentHeight"
|
|
138
|
-
:class="canvasClass"
|
|
139
|
-
/>
|
|
140
|
-
</div>
|
|
141
|
-
</template>
|
|
142
|
-
|
|
143
|
-
<style scoped>
|
|
144
|
-
</style>
|
package/components/Terminal.vue
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {ref, onMounted, onUnmounted} from 'vue'
|
|
3
|
-
import {TabsContent, TabsList, TabsRoot, TabsTrigger} from 'reka-ui'
|
|
4
|
-
import TerminalAnimation1 from "./terminal-animations/TerminalAnimation1.vue";
|
|
5
|
-
import TerminalAnimation2 from "./terminal-animations/TerminalAnimation2.vue";
|
|
6
|
-
import TerminalAnimation3 from "./terminal-animations/TerminalAnimation3.vue";
|
|
7
|
-
import TerminalAnimation4 from "./terminal-animations/TerminalAnimation4.vue";
|
|
8
|
-
import TerminalAnimation5 from "./terminal-animations/TerminalAnimation5.vue";
|
|
9
|
-
import TerminalAnimation6 from "./terminal-animations/TerminalAnimation6.vue";
|
|
10
|
-
import terminalBg from '../assets/terminal-background.jpg';
|
|
11
|
-
|
|
12
|
-
// Auto-progression configuration
|
|
13
|
-
const AUTO_ADVANCE_DELAY = 1500
|
|
14
|
-
|
|
15
|
-
// State management
|
|
16
|
-
const activeTab = ref('tab1')
|
|
17
|
-
const autoPlayEnabled = ref(true)
|
|
18
|
-
let autoAdvanceTimeout: ReturnType<typeof setTimeout> | null = null
|
|
19
|
-
|
|
20
|
-
// Intersection Observer state
|
|
21
|
-
const sectionRef = ref<HTMLElement | null>(null)
|
|
22
|
-
const isVisible = ref(false)
|
|
23
|
-
let observer: IntersectionObserver | null = null
|
|
24
|
-
|
|
25
|
-
// Tab progression logic
|
|
26
|
-
const tabSequence = ['tab1', 'tab2', 'tab3', 'tab4', 'tab5', 'tab6']
|
|
27
|
-
|
|
28
|
-
const goToNextTab = () => {
|
|
29
|
-
const currentIndex = tabSequence.indexOf(activeTab.value)
|
|
30
|
-
const nextIndex = (currentIndex + 1) % tabSequence.length
|
|
31
|
-
activeTab.value = tabSequence[nextIndex]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Handle animation completion
|
|
35
|
-
const onAnimationComplete = () => {
|
|
36
|
-
if (!autoPlayEnabled.value) return
|
|
37
|
-
|
|
38
|
-
// Clear any existing timeout
|
|
39
|
-
if (autoAdvanceTimeout) {
|
|
40
|
-
clearTimeout(autoAdvanceTimeout)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Schedule next tab
|
|
44
|
-
autoAdvanceTimeout = setTimeout(() => {
|
|
45
|
-
goToNextTab()
|
|
46
|
-
}, AUTO_ADVANCE_DELAY)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Handle user interaction with tabs
|
|
50
|
-
const onTabChange = () => {
|
|
51
|
-
// User clicked a tab, disable auto-play
|
|
52
|
-
autoPlayEnabled.value = false
|
|
53
|
-
|
|
54
|
-
// Clear any pending auto-advance
|
|
55
|
-
if (autoAdvanceTimeout) {
|
|
56
|
-
clearTimeout(autoAdvanceTimeout)
|
|
57
|
-
autoAdvanceTimeout = null
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Setup Intersection Observer
|
|
62
|
-
onMounted(() => {
|
|
63
|
-
if (!sectionRef.value) return
|
|
64
|
-
|
|
65
|
-
observer = new IntersectionObserver(
|
|
66
|
-
(entries) => {
|
|
67
|
-
entries.forEach((entry) => {
|
|
68
|
-
if (entry.isIntersecting && !isVisible.value) {
|
|
69
|
-
isVisible.value = true
|
|
70
|
-
// Disconnect observer after first intersection
|
|
71
|
-
observer?.disconnect()
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
threshold: 0.2, // Trigger when 20% of the element is visible
|
|
77
|
-
rootMargin: '0px'
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
observer.observe(sectionRef.value)
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
// Cleanup
|
|
85
|
-
onUnmounted(() => {
|
|
86
|
-
if (autoAdvanceTimeout) {
|
|
87
|
-
clearTimeout(autoAdvanceTimeout)
|
|
88
|
-
}
|
|
89
|
-
if (observer) {
|
|
90
|
-
observer.disconnect()
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<template>
|
|
96
|
-
<section
|
|
97
|
-
ref="sectionRef"
|
|
98
|
-
:style="{ backgroundImage: `url(${terminalBg})` }"
|
|
99
|
-
class="wrapper border-t h-[40rem] bg-wine bg-cover bg-top flex justify-center pt-28 overflow-clip">
|
|
100
|
-
<div
|
|
101
|
-
:class="[
|
|
102
|
-
'self-stretch px-4 sm:px-8 py-5 sm:py-7 relative bg-primary rounded-tl-lg rounded-tr-lg inline-flex flex-col justify-start items-start gap-2 overflow-hidden w-[62rem] outline-1 outline-offset-[3px] outline-white/30',
|
|
103
|
-
'transition-transform duration-1000',
|
|
104
|
-
isVisible ? 'translate-y-0' : 'translate-y-24'
|
|
105
|
-
]"
|
|
106
|
-
style="transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);">
|
|
107
|
-
<TabsRoot
|
|
108
|
-
v-if="isVisible"
|
|
109
|
-
v-model="activeTab"
|
|
110
|
-
@update:modelValue="onTabChange"
|
|
111
|
-
>
|
|
112
|
-
<TabsList
|
|
113
|
-
aria-label="features"
|
|
114
|
-
:class="[
|
|
115
|
-
'absolute bottom-6 left-1/2 -translate-x-1/2 flex items-center p-1 rounded-md border border-white/10',
|
|
116
|
-
'transition-transform duration-700 delay-300',
|
|
117
|
-
isVisible ? 'translate-y-0' : 'translate-y-12'
|
|
118
|
-
]"
|
|
119
|
-
style="transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);">
|
|
120
|
-
<TabsTrigger value="tab1">
|
|
121
|
-
new
|
|
122
|
-
</TabsTrigger>
|
|
123
|
-
<TabsTrigger value="tab2">
|
|
124
|
-
dev
|
|
125
|
-
</TabsTrigger>
|
|
126
|
-
<TabsTrigger value="tab3">
|
|
127
|
-
lint
|
|
128
|
-
</TabsTrigger>
|
|
129
|
-
<TabsTrigger value="tab4">
|
|
130
|
-
fmt
|
|
131
|
-
</TabsTrigger>
|
|
132
|
-
<TabsTrigger value="tab5">
|
|
133
|
-
test
|
|
134
|
-
</TabsTrigger>
|
|
135
|
-
<TabsTrigger value="tab6">
|
|
136
|
-
build
|
|
137
|
-
</TabsTrigger>
|
|
138
|
-
</TabsList>
|
|
139
|
-
<TabsContent value="tab1">
|
|
140
|
-
<TerminalAnimation1 :on-animation-complete="onAnimationComplete"/>
|
|
141
|
-
</TabsContent>
|
|
142
|
-
<TabsContent value="tab2">
|
|
143
|
-
<TerminalAnimation2 :on-animation-complete="onAnimationComplete"/>
|
|
144
|
-
</TabsContent>
|
|
145
|
-
<TabsContent value="tab3">
|
|
146
|
-
<TerminalAnimation3 :on-animation-complete="onAnimationComplete"/>
|
|
147
|
-
</TabsContent>
|
|
148
|
-
<TabsContent value="tab4">
|
|
149
|
-
<TerminalAnimation4 :on-animation-complete="onAnimationComplete"/>
|
|
150
|
-
</TabsContent>
|
|
151
|
-
<TabsContent value="tab5">
|
|
152
|
-
<TerminalAnimation5 :on-animation-complete="onAnimationComplete"/>
|
|
153
|
-
</TabsContent>
|
|
154
|
-
<TabsContent value="tab6">
|
|
155
|
-
<TerminalAnimation6 :on-animation-complete="onAnimationComplete"/>
|
|
156
|
-
</TabsContent>
|
|
157
|
-
</TabsRoot>
|
|
158
|
-
|
|
159
|
-
</div>
|
|
160
|
-
</section>
|
|
161
|
-
</template>
|
|
162
|
-
|
|
163
|
-
<style scoped>
|
|
164
|
-
|
|
165
|
-
</style>
|