@voidzero-dev/vitepress-theme 0.0.15 → 0.0.17
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/assets/checkmark.svg +1 -0
- package/assets/primary-button-background.jpg +0 -0
- package/assets/terminal-background.jpg +0 -0
- package/components/Eyebrow.vue +11 -0
- package/components/Footer.vue +44 -0
- package/components/Header.vue +38 -0
- package/components/RiveAnimation.vue +144 -0
- package/components/Terminal.vue +165 -0
- package/components/terminal-animations/TerminalAnimation1.vue +54 -0
- package/components/terminal-animations/TerminalAnimation2.vue +59 -0
- package/components/terminal-animations/TerminalAnimation3.vue +46 -0
- package/components/terminal-animations/TerminalAnimation4.vue +50 -0
- package/components/terminal-animations/TerminalAnimation5.vue +51 -0
- package/components/terminal-animations/TerminalAnimation6.vue +55 -0
- package/composables/useTypewriter.ts +43 -0
- package/dist/index.js.map +1 -1
- package/dist/style.css +343 -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/package.json +9 -5
- package/style.css +343 -0
- package/dist/assets/index-Bi151L4O.css +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {useTypewriter} from '../../composables/useTypewriter'
|
|
3
|
+
import {onMounted, onUnmounted} from "vue";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
onAnimationComplete?: () => void
|
|
7
|
+
}>()
|
|
8
|
+
|
|
9
|
+
let typewriter;
|
|
10
|
+
|
|
11
|
+
onMounted(async () => {
|
|
12
|
+
const Typewriter = await useTypewriter()
|
|
13
|
+
const target = document.getElementById('terminal-code');
|
|
14
|
+
typewriter = new Typewriter(target, {
|
|
15
|
+
loop: false,
|
|
16
|
+
delay: 1,
|
|
17
|
+
})
|
|
18
|
+
typewriter
|
|
19
|
+
.typeString(`<span>$ vite build</span>`)
|
|
20
|
+
.pauseFor(200)
|
|
21
|
+
.pasteString(`<span class="block w-full h-[1rem]"></span>`)
|
|
22
|
+
.pasteString(`<div class="block"><span class="text-vite">VITE+ v1.0.0</span> <span class="text-aqua">building for production</span></div>`)
|
|
23
|
+
.pauseFor(100)
|
|
24
|
+
.pasteString(`<div class="block">transforming...</div>`)
|
|
25
|
+
.pauseFor(400)
|
|
26
|
+
.pasteString(`<div class="block"><span class="text-zest">✓</span> <span class="text-grey">32 modules transformed...</span></div>`)
|
|
27
|
+
.pauseFor(300)
|
|
28
|
+
.pasteString(`<div class="block">rendering chunks...</div>`)
|
|
29
|
+
.pasteString(`<div class="block">computing gzip size...</div>`)
|
|
30
|
+
.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>`)
|
|
31
|
+
.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>`)
|
|
32
|
+
.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>`)
|
|
33
|
+
.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>`)
|
|
34
|
+
.pasteString(`<div class="block"><span class="text-zest">✓ built in 308ms</span></div>`)
|
|
35
|
+
.pasteString(`<span class="block w-full h-[1rem]"></span>`)
|
|
36
|
+
.callFunction(() => {
|
|
37
|
+
if (props.onAnimationComplete) {
|
|
38
|
+
props.onAnimationComplete()
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
.start();
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
onUnmounted(() => {
|
|
45
|
+
if(typewriter){
|
|
46
|
+
typewriter.stop()
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<p class="font-mono text-sm text-white leading-[1.5rem]">
|
|
53
|
+
<span id="terminal-code"></span>
|
|
54
|
+
</p>
|
|
55
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Dynamically load Typewriter from CDN
|
|
2
|
+
let TypewriterClass: any = null
|
|
3
|
+
let loadingPromise: Promise<any> | null = null
|
|
4
|
+
|
|
5
|
+
export async function useTypewriter() {
|
|
6
|
+
// Return cached class if already loaded
|
|
7
|
+
if (TypewriterClass) {
|
|
8
|
+
return TypewriterClass
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Return existing loading promise if already loading
|
|
12
|
+
if (loadingPromise) {
|
|
13
|
+
return loadingPromise
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Start loading from CDN
|
|
17
|
+
loadingPromise = new Promise((resolve, reject) => {
|
|
18
|
+
// Check if already loaded globally
|
|
19
|
+
if ((window as any).Typewriter) {
|
|
20
|
+
TypewriterClass = (window as any).Typewriter
|
|
21
|
+
resolve(TypewriterClass)
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Create script tag to load from CDN
|
|
26
|
+
const script = document.createElement('script')
|
|
27
|
+
script.src = 'https://unpkg.com/typewriter-effect@2.22.0/dist/core.js'
|
|
28
|
+
script.async = true
|
|
29
|
+
|
|
30
|
+
script.onload = () => {
|
|
31
|
+
TypewriterClass = (window as any).Typewriter
|
|
32
|
+
resolve(TypewriterClass)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
script.onerror = () => {
|
|
36
|
+
reject(new Error('Failed to load Typewriter from CDN'))
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
document.head.appendChild(script)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
return loadingPromise
|
|
43
|
+
}
|