mirror of
https://github.com/yamadashy/repomix.git
synced 2025-06-11 00:25:54 +03:00
41 lines
754 B
Vue
41 lines
754 B
Vue
<script setup lang="ts">
|
|
defineProps({
|
|
videoId: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="full-width-youtube-video">
|
|
<iframe
|
|
width="560"
|
|
height="315"
|
|
:src="`https://www.youtube.com/embed/${videoId}`"
|
|
title="YouTube video player"
|
|
frameborder="0"
|
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
allowfullscreen
|
|
></iframe>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.full-width-youtube-video {
|
|
position: relative;
|
|
padding-bottom: 56.25%;
|
|
height: 0;
|
|
}
|
|
|
|
.full-width-youtube-video iframe {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
}
|
|
</style>
|