2021-01-09 01:09:59 +00:00
|
|
|
|
mixin video_list_item(className, video, instanceOrigin, options = {})
|
2020-12-28 12:42:25 +00:00
|
|
|
|
div(class={[className]: true, "video-list-item--watched": video.watched})
|
|
|
|
|
- let link = `/watch?v=${video.videoId}`
|
2021-04-25 12:02:59 +00:00
|
|
|
|
if options.continuous
|
|
|
|
|
- link += `&continuous=1&session-watched=${sessionWatchedNext}`
|
2021-05-03 12:50:51 +00:00
|
|
|
|
div.thumbnail
|
|
|
|
|
a(href=link tabindex="-1").thumbnail__link
|
|
|
|
|
img(src=`/vi/${video.videoId}/mqdefault.jpg` width=320 height=180 alt="").image
|
2020-12-28 12:42:25 +00:00
|
|
|
|
if video.second__lengthText != undefined
|
|
|
|
|
span.duration= video.second__lengthText
|
2021-05-11 12:29:44 +00:00
|
|
|
|
details.thumbnail__more
|
|
|
|
|
summary.thumbnail__show-more ×
|
|
|
|
|
.thumbnail__options-container
|
|
|
|
|
.thumbnail__options-list
|
|
|
|
|
- const paramsBase = {}
|
2021-05-11 12:43:53 +00:00
|
|
|
|
- if (url) paramsBase.referrer = url.pathname + url.search
|
2021-05-11 12:29:44 +00:00
|
|
|
|
a(href=`/filters?${new URLSearchParams({"channel-id": video.authorId, label: video.author, ...paramsBase})}`).menu-look Hide this channel
|
|
|
|
|
a(href=`/filters?${new URLSearchParams({title: video.title, ...paramsBase})}`).menu-look Hide by title
|
|
|
|
|
a(href="/filters").menu-look Edit all filters
|
2020-12-28 12:42:25 +00:00
|
|
|
|
.info
|
|
|
|
|
div.title: a(href=link).title-link= video.title
|
|
|
|
|
div.author-line
|
|
|
|
|
a(href=`/channel/${video.authorId}`).author= video.author
|
|
|
|
|
- const views = video.viewCountText || video.second__viewCountText
|
|
|
|
|
if views
|
|
|
|
|
= ` • `
|
|
|
|
|
span.views= views
|
|
|
|
|
if video.publishedText
|
|
|
|
|
= ` • `
|
|
|
|
|
span.published= video.publishedText
|
2021-01-09 01:09:59 +00:00
|
|
|
|
if options.showMarkWatched
|
|
|
|
|
form(method="post" action=`/formapi/markwatched/${video.videoId}`).mark-watched
|
|
|
|
|
= ` • `
|
|
|
|
|
button.mark-watched__button Mark watched
|
2020-12-28 12:42:25 +00:00
|
|
|
|
if video.descriptionHtml
|
|
|
|
|
div.description!= video.descriptionHtml
|