fix(talks): Vimeo video embed
This commit is contained in:
parent
2862fd78b9
commit
6e1d9a0309
14
src/components/VimeoVideo.astro
Normal file
14
src/components/VimeoVideo.astro
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
interface Props {
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const videoId = Astro.props.id;
|
||||||
|
---
|
||||||
|
|
||||||
|
<iframe
|
||||||
|
allowfullscreen
|
||||||
|
class="w-full border border-gray-500 aspect-[16/9]"
|
||||||
|
frameborder="0"
|
||||||
|
src={`https://player.vimeo.com/video/${videoId}`}
|
||||||
|
/>
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
import Markdown from '../Markdown.astro';
|
import Markdown from '../Markdown.astro';
|
||||||
|
import VimeoVideo from '../VimeoVideo.astro';
|
||||||
import YouTubeVideo from '../YouTubeVideo.astro';
|
import YouTubeVideo from '../YouTubeVideo.astro';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -21,3 +22,14 @@ const { id, type }: Props = Astro.props;
|
||||||
</Markdown>
|
</Markdown>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
type == "vimeo" && (
|
||||||
|
<Markdown>
|
||||||
|
<h2 class="mb-2">Video</h2>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<VimeoVideo id={id} />
|
||||||
|
</div>
|
||||||
|
</Markdown>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue