2022-03-23 11:21:06 +00:00
|
|
|
<template>
|
|
|
|
<v-card
|
2022-03-25 19:21:00 +00:00
|
|
|
class="entry gridVideoRenderer background"
|
2022-03-23 11:21:06 +00:00
|
|
|
:to="`/watch?v=${video.videoId}`"
|
|
|
|
flat
|
|
|
|
>
|
2022-04-12 04:04:03 +00:00
|
|
|
<div
|
|
|
|
style="position: relative; overflow: hidden !important"
|
|
|
|
class="thumbnail-container"
|
|
|
|
:style="{
|
|
|
|
borderRadius: `${$store.state.tweaks.roundTweak / 2}rem`,
|
|
|
|
margin: $store.state.tweaks.roundTweak > 0 ? '0 .5rem' : '0',
|
|
|
|
}"
|
|
|
|
>
|
2022-03-23 11:21:06 +00:00
|
|
|
<v-img
|
2022-03-28 19:59:08 +00:00
|
|
|
v-if="video.thumbnail"
|
2022-03-23 11:21:06 +00:00
|
|
|
:aspect-ratio="16 / 9"
|
2022-03-23 22:15:52 +00:00
|
|
|
:src="
|
|
|
|
$youtube.getThumbnail(
|
|
|
|
video.videoId,
|
|
|
|
'max',
|
|
|
|
video.thumbnail.thumbnails
|
|
|
|
)
|
|
|
|
"
|
2022-03-23 11:21:06 +00:00
|
|
|
/>
|
|
|
|
<div
|
2022-03-28 19:59:08 +00:00
|
|
|
v-if="video.thumbnailOverlays"
|
2022-03-23 11:21:06 +00:00
|
|
|
class="videoRuntimeFloat"
|
|
|
|
:class="
|
|
|
|
'style-' +
|
|
|
|
video.thumbnailOverlays[0].thumbnailOverlayTimeStatusRenderer.style
|
|
|
|
"
|
|
|
|
style="color: #fff"
|
|
|
|
v-text="
|
|
|
|
video.thumbnailOverlays[0].thumbnailOverlayTimeStatusRenderer.text
|
|
|
|
.runs[0].text
|
|
|
|
"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div id="details">
|
|
|
|
<a
|
|
|
|
:href="
|
2022-03-31 04:22:24 +00:00
|
|
|
$rendererUtils.getNavigationEndpoints(
|
2022-03-28 02:07:03 +00:00
|
|
|
video.shortBylineText.runs[0].navigationEndpoint
|
|
|
|
)
|
2022-03-23 11:21:06 +00:00
|
|
|
"
|
|
|
|
class="avatar-link pt-2"
|
|
|
|
>
|
|
|
|
<v-img
|
|
|
|
class="avatar-thumbnail"
|
|
|
|
:src="video.channelThumbnail.thumbnails[0].url"
|
|
|
|
/>
|
|
|
|
</a>
|
2022-04-13 10:15:26 +00:00
|
|
|
<v-card-text class="video-info pt-2" v-emoji>
|
2022-03-23 11:21:06 +00:00
|
|
|
<div
|
|
|
|
v-for="title in video.title.runs"
|
|
|
|
:key="title.text"
|
|
|
|
style="margin-top: 0.5em"
|
|
|
|
class="font-weight-medium vid-title"
|
|
|
|
>
|
|
|
|
{{ title.text }}
|
|
|
|
</div>
|
|
|
|
|
2022-03-30 02:37:54 +00:00
|
|
|
<div
|
|
|
|
class="background--text text--lighten-5 caption"
|
|
|
|
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
|
|
|
|
v-text="parseBottom(video)"
|
|
|
|
/>
|
2022-03-23 11:21:06 +00:00
|
|
|
</v-card-text>
|
|
|
|
</div>
|
|
|
|
</v-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.entry {
|
|
|
|
width: 100%; /* Prevent Loading Weirdness */
|
|
|
|
}
|
|
|
|
.videoRuntimeFloat {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 10px;
|
|
|
|
right: 10px;
|
|
|
|
border-radius: 5px;
|
|
|
|
padding: 0px 4px 0px 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.videoRuntimeFloat.style-DEFAULT {
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
}
|
|
|
|
|
|
|
|
.videoRuntimeFloat.style-LIVE {
|
|
|
|
background: rgba(255, 0, 0, 0.5);
|
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
|
|
|
}
|
2022-03-23 16:13:43 +00:00
|
|
|
|
|
|
|
@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;
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 11:21:06 +00:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: ["video"],
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
parseBottom(video) {
|
|
|
|
const bottomText = [
|
|
|
|
video.shortBylineText?.runs[0].text,
|
|
|
|
video.shortViewCountText?.runs[0].text,
|
|
|
|
];
|
|
|
|
if (video.publishedTimeText?.runs[0].text)
|
|
|
|
bottomText.push(video.publishedTimeText?.runs[0].text);
|
|
|
|
return bottomText.join(" · ");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|