0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-14 23:45:07 +00:00
VueTube/NUXT/components/SectionRenderers/shelfRenderer.vue

59 lines
1.5 KiB
Vue
Raw Normal View History

2022-03-24 11:47:13 +00:00
<template>
2022-04-25 03:24:46 +00:00
<div class="fill-width">
2022-05-18 03:19:22 +00:00
<h4
v-if="render.headerRenderer"
class="font-weight-bold shelf-header"
:style="{
marginLeft:
$store.state.tweaks.roundThumb && $store.state.tweaks.roundTweak > 0
? '1rem'
: '0',
}"
>
2022-03-24 11:47:13 +00:00
{{
render.headerRenderer.elementRenderer.newElement.type.componentType
.model.shelfHeaderModel.shelfHeaderData.title
}}
</h4>
2022-05-18 03:19:22 +00:00
<div class="pa-0 min-height-0">
2022-04-25 03:24:46 +00:00
<component
:is="Object.keys(render.content)[0]"
2022-05-18 03:19:22 +00:00
v-if="render.content && getComponents()[Object.keys(render.content)[0]]"
2022-04-25 03:24:46 +00:00
:render="render.content[Object.keys(render.content)[0]]"
2022-05-18 03:19:22 +00:00
></component>
</div>
2022-05-19 17:52:08 +00:00
<div
2022-03-24 11:47:13 +00:00
v-if="render.separator && render.separator.hasBottomSeparator"
2022-03-31 06:01:29 +00:00
class="separator-bottom background"
2022-04-25 03:24:46 +00:00
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
2022-03-24 11:47:13 +00:00
:style="{ height: render.separator.height + 'px' }"
2022-05-19 17:52:08 +00:00
></div>
2022-03-24 11:47:13 +00:00
</div>
</template>
<script>
2022-03-24 20:46:17 +00:00
import verticalListRenderer from "~/components/ListRenderers/verticalListRenderer.vue";
import horizontalListRenderer from "~/components/ListRenderers/horizontalListRenderer.vue";
2022-03-24 11:47:13 +00:00
export default {
components: {
horizontalListRenderer,
verticalListRenderer,
},
props: ["render"],
methods: {
getComponents() {
return this.$options.components;
},
},
};
</script>
2022-05-18 03:19:22 +00:00
<style scoped>
.shelf-header {
width: 100%; /* Prevent Loading Weirdness */
padding: 10px;
}
</style>