2022-10-15 14:28:36 +01:00
|
|
|
---
|
|
|
|
interface Props {
|
2023-01-08 19:25:23 +00:00
|
|
|
id: string;
|
|
|
|
type: string;
|
2022-10-15 14:28:36 +01:00
|
|
|
}
|
|
|
|
|
2023-01-08 19:25:23 +00:00
|
|
|
const { id, type }: Props = Astro.props;
|
2022-10-15 14:28:36 +01:00
|
|
|
---
|
|
|
|
|
2023-01-08 19:25:23 +00:00
|
|
|
{
|
|
|
|
type == "youtube" && (
|
|
|
|
<div>
|
|
|
|
<h2 class="mb-2">Video</h2>
|
2022-10-15 14:28:36 +01:00
|
|
|
|
2023-01-08 21:03:43 +00:00
|
|
|
<div>
|
2023-01-08 19:25:23 +00:00
|
|
|
<iframe
|
|
|
|
allowfullscreen
|
2023-01-31 00:17:09 +00:00
|
|
|
class="w-full aspect-[16/9]"
|
2023-01-08 21:03:43 +00:00
|
|
|
frameborder="0"
|
|
|
|
src={`https://www.youtube.com/embed/${id}?rel=0&iv_load_policy=3`}
|
2023-01-08 19:25:23 +00:00
|
|
|
/>
|
|
|
|
</div>
|
2022-10-15 14:28:36 +01:00
|
|
|
</div>
|
2023-01-08 19:25:23 +00:00
|
|
|
)
|
|
|
|
}
|