0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-09 04:55:07 +00:00
VueTube/NUXT/components/SectionRenderers/itemSectionRenderer.vue

59 lines
1.4 KiB
Vue
Raw Normal View History

2022-03-24 11:47:13 +00:00
<template>
<div>
<div
v-for="(video, index) in render.contents"
:key="index"
class="pa-0 fill-screen"
>
<component
v-if="getComponents()[Object.keys(video)[0]]"
:is="Object.keys(video)[0]"
:key="video[Object.keys(video)[0]].videoId"
:video="video[Object.keys(video)[0]]"
></component>
</div>
<div
v-if="
render.separatorDetails && render.separatorDetails.hasBottomSeparator
"
2022-03-31 06:01:29 +00:00
class="separator-bottom background"
:class="$vuetify.theme.dark ? 'lighten-4' : 'darken-4'"
2022-03-24 11:47:13 +00:00
:style="{ height: render.separatorDetails.height + 'px' }"
></div>
</div>
</template>
<style scoped>
.shelf-header {
width: 100%; /* Prevent Loading Weirdness */
padding: 10px;
}
.fill-screen {
2022-03-24 20:56:18 +00:00
width: 100vw; /* Very Hacky */
2022-03-24 11:47:13 +00:00
}
</style>
<script>
2022-03-24 20:46:17 +00:00
import compactVideoRenderer from "~/components/CompactRenderers/compactVideoRenderer.vue";
import compactChannelRenderer from "~/components/CompactRenderers/compactChannelRenderer.vue";
2022-03-24 20:54:21 +00:00
import gridVideoRenderer from "~/components/gridRenderers/gridVideoRenderer.vue";
import videoWithContextRenderer from "~/components/gridRenderers/videoWithContextRenderer.vue";
2022-03-24 11:47:13 +00:00
export default {
components: {
gridVideoRenderer,
compactVideoRenderer,
compactChannelRenderer,
videoWithContextRenderer,
2022-03-24 11:47:13 +00:00
},
props: ["render"],
methods: {
getComponents() {
return this.$options.components;
},
},
};
</script>