fix(talks): Vimeo video embed

This commit is contained in:
Oliver Davies 2023-09-21 21:47:21 +01:00
parent 2862fd78b9
commit 6e1d9a0309
2 changed files with 26 additions and 0 deletions

View 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}`}
/>

View file

@ -1,5 +1,6 @@
---
import Markdown from '../Markdown.astro';
import VimeoVideo from '../VimeoVideo.astro';
import YouTubeVideo from '../YouTubeVideo.astro';
interface Props {
@ -21,3 +22,14 @@ const { id, type }: Props = Astro.props;
</Markdown>
)
}
{
type == "vimeo" && (
<Markdown>
<h2 class="mb-2">Video</h2>
<div>
<VimeoVideo id={id} />
</div>
</Markdown>
)
}