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

Rework thumbnails to make future changes possible

This commit is contained in:
Cadence Ember 2021-05-04 00:50:51 +12:00
parent 7caa4fb435
commit 1982ebf9e4
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
2 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,8 @@ mixin video_list_item(className, video, instanceOrigin, options = {})
- let link = `/watch?v=${video.videoId}` - let link = `/watch?v=${video.videoId}`
if options.continuous if options.continuous
- link += `&continuous=1&session-watched=${sessionWatchedNext}` - link += `&continuous=1&session-watched=${sessionWatchedNext}`
a(href=link tabindex="-1").thumbnail div.thumbnail
a(href=link tabindex="-1").thumbnail__link
img(src=`/vi/${video.videoId}/mqdefault.jpg` width=320 height=180 alt="").image img(src=`/vi/${video.videoId}/mqdefault.jpg` width=320 height=180 alt="").image
if video.second__lengthText != undefined if video.second__lengthText != undefined
span.duration= video.second__lengthText span.duration= video.second__lengthText

View File

@ -25,6 +25,9 @@
display: flex display: flex
background: c.$bg-darkest background: c.$bg-darkest
&__link
font-size: 0 // remove whitespace around the image
.image .image
width: 160px width: 160px
height: 90px height: 90px
@ -39,6 +42,7 @@
line-height: 1 line-height: 1
padding: 3px 5px 4px padding: 3px 5px 4px
border-radius: 4px border-radius: 4px
pointer-events: none
.title .title
font-size: 15px font-size: 15px