2022-04-23 05:22:18 +00:00
|
|
|
<template>
|
2022-04-25 03:24:46 +00:00
|
|
|
<v-card
|
2022-05-29 17:08:21 +00:00
|
|
|
class="entry videoRenderer background overflow-hidden"
|
2022-04-25 03:24:46 +00:00
|
|
|
:to="`/watch?v=${vidId}`"
|
|
|
|
:style="{
|
2022-05-13 22:25:47 +00:00
|
|
|
borderRadius: roundThumb ? `${roundTweak / 2}rem` : '0',
|
2022-05-06 00:57:40 +00:00
|
|
|
margin:
|
2022-05-13 22:25:47 +00:00
|
|
|
roundThumb && roundTweak > 0 ? '0 1rem 1rem 1rem' : '0 0 0.25rem 0',
|
2022-04-25 03:24:46 +00:00
|
|
|
}"
|
|
|
|
flat
|
|
|
|
>
|
|
|
|
<div style="position: relative" class="thumbnail-container overflow-hidden">
|
2022-04-23 05:22:18 +00:00
|
|
|
<v-img
|
|
|
|
:aspect-ratio="16 / 9"
|
|
|
|
:src="$youtube.getThumbnail(vidId, 'max', thumbnails)"
|
2022-05-05 23:09:28 +00:00
|
|
|
:style="{
|
2022-05-29 17:08:21 +00:00
|
|
|
borderRadius: roundThumb ? `${roundTweak / 12}rem` : '0',
|
2022-05-05 23:09:28 +00:00
|
|
|
}"
|
2022-04-23 05:22:18 +00:00
|
|
|
/>
|
|
|
|
<div
|
|
|
|
v-if="thumbnailOverlayText && thumbnailOverlayStyle"
|
|
|
|
class="videoRuntimeFloat"
|
|
|
|
:class="'style-' + thumbnailOverlayStyle"
|
|
|
|
style="color: #fff"
|
|
|
|
v-text="thumbnailOverlayText"
|
|
|
|
/>
|
|
|
|
</div>
|
2022-05-29 17:08:21 +00:00
|
|
|
<div
|
|
|
|
id="details"
|
|
|
|
class="background mt-1"
|
|
|
|
:class="
|
|
|
|
roundThumb && roundTweak > 0
|
|
|
|
? $vuetify.theme.dark
|
|
|
|
? 'lighten-1'
|
|
|
|
: 'darken-1'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
:style="{
|
|
|
|
borderRadius: roundThumb ? `${roundTweak / 12}rem` : '0',
|
|
|
|
}"
|
|
|
|
>
|
2022-05-19 19:00:02 +00:00
|
|
|
<a
|
2022-05-29 17:08:21 +00:00
|
|
|
class="avatar-link pl-2 pt-2"
|
2022-05-19 19:00:02 +00:00
|
|
|
@click.prevent="
|
|
|
|
$store.dispatch('channel/fetchChannel', channelUrl),
|
|
|
|
$router.push('/channel')
|
|
|
|
"
|
|
|
|
>
|
2022-04-23 05:22:18 +00:00
|
|
|
<v-img class="avatar-thumbnail" :src="channelIcon" />
|
|
|
|
</a>
|
|
|
|
<v-card-text class="video-info pt-2" v-emoji>
|
|
|
|
<span
|
|
|
|
v-for="title in titles"
|
|
|
|
:key="title.text"
|
|
|
|
style="margin-top: 0.5em"
|
|
|
|
class="font-weight-medium vid-title"
|
|
|
|
>
|
|
|
|
{{ title.text }}
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<div
|
2022-05-21 02:01:39 +00:00
|
|
|
class="background--text caption"
|
|
|
|
:class="$vuetify.theme.dark ? 'text--lighten-5' : 'text--darken-4'"
|
2022-04-23 05:22:18 +00:00
|
|
|
v-text="bottomText"
|
|
|
|
/>
|
|
|
|
</v-card-text>
|
|
|
|
</div>
|
|
|
|
</v-card>
|
|
|
|
</template>
|
|
|
|
|
2022-05-13 22:25:47 +00:00
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
vidId: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
thumbnails: {
|
|
|
|
type: Array,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
channelUrl: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
channelIcon: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
titles: {
|
|
|
|
type: Array,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
bottomText: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
thumbnailOverlayText: {
|
|
|
|
type: String,
|
|
|
|
},
|
|
|
|
thumbnailOverlayStyle: {
|
|
|
|
type: String,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
roundTweak() {
|
|
|
|
return this.$store.state.tweaks.roundTweak;
|
|
|
|
},
|
|
|
|
roundThumb() {
|
|
|
|
return this.$store.state.tweaks.roundThumb;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2022-04-23 05:22:18 +00:00
|
|
|
<style scoped>
|
|
|
|
.entry {
|
|
|
|
width: 100%; /* Prevent Loading Weirdness */
|
|
|
|
}
|
|
|
|
.videoRuntimeFloat {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 10px;
|
|
|
|
right: 10px;
|
2022-05-14 00:25:48 +00:00
|
|
|
border-radius: 4px;
|
2022-04-23 05:22:18 +00:00
|
|
|
padding: 0px 4px 0px 4px;
|
2022-05-14 00:25:48 +00:00
|
|
|
font-size: 0.66rem;
|
2022-04-23 05:22:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.videoRuntimeFloat.style-DEFAULT {
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
}
|
|
|
|
|
|
|
|
.videoRuntimeFloat.style-LIVE {
|
|
|
|
background: rgba(255, 0, 0, 0.5);
|
|
|
|
}
|
|
|
|
|
2022-04-24 04:01:52 +00:00
|
|
|
.videoRuntimeFloat.style-UPCOMING {
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
}
|
|
|
|
|
2022-04-23 05:22:18 +00:00
|
|
|
.vid-title {
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-thumbnail {
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
margin-left: 0.5rem;
|
|
|
|
border-radius: 50%;
|
|
|
|
width: 35px;
|
|
|
|
height: 35px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#details {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-basis: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (orientation: landscape) {
|
|
|
|
.entry {
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
.thumbnail-container {
|
|
|
|
width: 50vh;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
#details {
|
|
|
|
flex-direction: column-reverse;
|
|
|
|
}
|
|
|
|
.avatar-thumbnail {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-left: 16px;
|
|
|
|
}
|
|
|
|
.video-info {
|
|
|
|
padding-top: 0 !important;
|
|
|
|
padding-bottom: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|