diff --git a/docs/.vitepress/theme/components/Downloader.vue b/docs/.vitepress/theme/components/Downloader.vue index b1790546..db343f37 100644 --- a/docs/.vitepress/theme/components/Downloader.vue +++ b/docs/.vitepress/theme/components/Downloader.vue @@ -18,7 +18,6 @@ import { ref, useTemplateRef } from "vue"; const q = ref(""); const videoSrc = ref(""); const videoEl = useTemplateRef("video"); -const wsRef = ref(); function onSubmit(ev: SubmitEvent) { ev.preventDefault(); @@ -29,7 +28,6 @@ function onSubmit(ev: SubmitEvent) { function onVideoLoad() { const ws = new WebSocket("ws://localhost:8080"); - wsRef.value = ws; const vid = videoEl.value!; @@ -81,7 +79,6 @@ function onVideoLoad() { }; ws.onclose = () => { - wsRef.value = undefined; }; } diff --git a/docs/.vitepress/theme/components/Video.vue b/docs/.vitepress/theme/components/Video.vue new file mode 100644 index 00000000..d42313c6 --- /dev/null +++ b/docs/.vitepress/theme/components/Video.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index d6d713b3..bbbd9a0c 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,9 +1,17 @@ import type { Theme } from "vitepress"; import DefaultTheme from "vitepress/theme"; +import { h } from 'vue' + import Downloader from "./components/Downloader.vue"; +import Video from './components/Video.vue' export default { extends: DefaultTheme, + Layout() { + return h(DefaultTheme.Layout, null, { + 'sidebar-nav-after': () => h(Video) + }) + }, enhanceApp({ app }) { // register your custom global components app.component("Downloader", Downloader); diff --git a/docs/index.md b/docs/index.md index 61ce5f52..6629b6fd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,22 +5,8 @@ layout: home hero: name: "yt2press" text: "video to vitepress" - tagline: My great project tagline - actions: - - theme: brand - text: Markdown Examples - link: /markdown-examples - - theme: alt - text: API Examples - link: /api-examples - -features: - - title: Feature A - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature B - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature C - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit --- + +[qVVhBGT0K7Y.webm](/qVVhBGT0K7Y) diff --git a/docs/qVVhBGT0K7Y.md b/docs/qVVhBGT0K7Y.md index 43aa2c4d..1033f3d1 100644 --- a/docs/qVVhBGT0K7Y.md +++ b/docs/qVVhBGT0K7Y.md @@ -1,4 +1,6 @@ - +--- +video: /qVVhBGT0K7Y.webm +--- ![0:14](./qVVhBGT0K7Y/0_14.png)