1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-10 02:27:29 +00:00
cloudtube/pug/includes/video-list-item.pug

20 lines
744 B
Plaintext
Raw Normal View History

mixin video_list_item(video, instanceOrigin)
2020-08-24 10:43:55 +00:00
- let link = `/watch?v=${video.videoId}`
2020-08-30 15:14:05 +00:00
a(href=link tabindex="-1").thumbnail
2020-11-25 00:34:08 +00:00
img(src=`/vi/${video.videoId}/mqdefault.jpg` width=320 height=180 alt="").image
2020-09-23 11:45:02 +00:00
if video.second__lengthText != undefined
2020-08-31 13:22:16 +00:00
span.duration= video.second__lengthText
2020-08-24 10:43:55 +00:00
.info
div.title: a(href=link).title-link= video.title
div.author-line
a(href=`/channel/${video.authorId}`).author= video.author
2020-08-30 15:14:05 +00:00
- const views = video.viewCountText || video.second__viewCountText
if views
= ` • `
span.views= views
2020-08-24 10:43:55 +00:00
if video.publishedText
= ` • `
span.published= video.publishedText
if video.descriptionHtml
2020-08-24 13:49:48 +00:00
div.description!= video.descriptionHtml