mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-27 11:06:41 -05:00
feat(blog): implement shorthand for yt embeds
Co-Authored-By: mrjvs <mistrjvs@gmail.com>
This commit is contained in:
17
src/components/MdIframe/MdIframe.vue
Normal file
17
src/components/MdIframe/MdIframe.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts" setup>
|
||||
// eslint-disable-next-line vue/prop-name-casing -- this is gonna be used in markdown
|
||||
const { videoId } = defineProps({ 'video-id': { type: String, required: true } });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
:src="`https://www.youtube-nocookie.com/embed/${videoId}`"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
referrerpolicy="strict-origin-when-cross-origin"
|
||||
allowfullscreen
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user