1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-03-02 02:31:35 +00:00

Add subscriptions page

This commit is contained in:
Cadence Ember 2020-08-31 03:14:05 +12:00
parent f24e1bb39c
commit 59a7489545
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
11 changed files with 159 additions and 6 deletions

View file

@ -10,6 +10,8 @@ html
body.show-focus
nav.main-nav
a(href="/").link.home CloudTube
a(href="/subscriptions" title="Subscriptions").link.subscriptions-link
img(src=getStaticURL("html", "/static/images/subscriptions.svg") width=30 height=25 alt="Subscriptions.").subscriptions-icon
form(method="get" action="/search").search-form
input(type="text" placeholder="Search" name="q" autocomplete="off" value=query).search

View file

@ -1,14 +1,16 @@
mixin video_list_item(video)
- let link = `/watch?v=${video.videoId}`
a(href=link).thumbnail
a(href=link tabindex="-1").thumbnail
img(src=`https://i.ytimg.com/vi/${video.videoId}/mqdefault.jpg` width=320 height=180 alt="").image
span.duration= video.second__lengthText
.info
div.title: a(href=link).title-link= video.title
div.author-line
a(href=`/channel/${video.authorId}`).author= video.author
= ` • `
span.views= video.viewCountText || video.second__viewCountText
- const views = video.viewCountText || video.second__viewCountText
if views
= ` • `
span.views= views
if video.publishedText
= ` • `
span.published= video.publishedText

12
pug/subscriptions.pug Normal file
View file

@ -0,0 +1,12 @@
extends includes/layout.pug
include includes/video-list-item.pug
block head
title Subscriptions - CloudTube
block content
main.subscriptions-page
each video in videos
.subscriptions-video
+video_list_item(video)