2022-03-23 11:21:06 +00:00
|
|
|
<template>
|
2022-05-14 04:45:48 +00:00
|
|
|
<v-card class="entry gridVideoRenderer background" to="/channel" flat>
|
2022-03-23 13:07:03 +00:00
|
|
|
<div id="details">
|
|
|
|
<a
|
2022-03-28 02:07:03 +00:00
|
|
|
:href="
|
|
|
|
this.$rendererUtils.getNavigationEndpoints(video.navigationEndpoint)
|
|
|
|
"
|
2022-03-23 13:07:03 +00:00
|
|
|
class="avatar-link pt-2"
|
|
|
|
>
|
|
|
|
<v-img
|
|
|
|
class="avatar-thumbnail"
|
2022-03-24 11:47:13 +00:00
|
|
|
:src="
|
|
|
|
video.thumbnail.thumbnails[video.thumbnail.thumbnails.length - 1]
|
|
|
|
.url
|
|
|
|
"
|
2022-03-23 11:21:06 +00:00
|
|
|
/>
|
2022-03-23 13:07:03 +00:00
|
|
|
</a>
|
2022-04-13 10:15:26 +00:00
|
|
|
<v-card-text class="video-info pt-2" v-emoji>
|
2022-03-23 13:07:03 +00:00
|
|
|
<div
|
|
|
|
v-for="title in video.title.runs"
|
|
|
|
:key="title.text"
|
|
|
|
style="margin-top: 0.5em"
|
2022-03-24 11:47:13 +00:00
|
|
|
class="vid-title"
|
2022-03-23 13:07:03 +00:00
|
|
|
>
|
|
|
|
{{ title.text }}
|
|
|
|
</div>
|
|
|
|
|
2022-03-31 06:01:29 +00:00
|
|
|
<div
|
|
|
|
class="caption background--text"
|
|
|
|
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
|
|
|
|
v-text="parseBottom(video)"
|
|
|
|
/>
|
2022-03-23 13:07:03 +00:00
|
|
|
</v-card-text>
|
|
|
|
</div>
|
2022-03-23 11:21:06 +00:00
|
|
|
</v-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.entry {
|
|
|
|
width: 100%; /* Prevent Loading Weirdness */
|
|
|
|
}
|
2022-03-23 13:07:03 +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%;
|
2022-03-24 11:47:13 +00:00
|
|
|
width: 50px;
|
|
|
|
height: 50px;
|
2022-03-23 13:07:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#details {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-basis: auto;
|
2022-03-24 11:47:13 +00:00
|
|
|
padding: 10px;
|
2022-03-23 13:07:03 +00:00
|
|
|
}
|
2022-03-23 16:13:43 +00:00
|
|
|
|
|
|
|
@media screen and (orientation: landscape) {
|
|
|
|
.entry {
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
#details {
|
|
|
|
flex-direction: column-reverse;
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 11:21:06 +00:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2022-03-23 13:07:03 +00:00
|
|
|
props: ["video"],
|
2022-03-23 11:21:06 +00:00
|
|
|
|
|
|
|
methods: {
|
|
|
|
parseBottom(video) {
|
2022-03-23 13:07:03 +00:00
|
|
|
const bottomText = [
|
2022-03-24 11:47:13 +00:00
|
|
|
video.subscriberCountText?.runs[0].text,
|
|
|
|
video.videoCountText?.runs.map((run) => run.text).join(" "),
|
2022-03-23 13:07:03 +00:00
|
|
|
];
|
|
|
|
return bottomText.join(" · ");
|
2022-03-23 11:21:06 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|