mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-02 02:31:35 +00:00
Add home page and search page
This commit is contained in:
parent
cbc3a2bf67
commit
2cc6a2912a
13 changed files with 210 additions and 69 deletions
|
|
@ -10,6 +10,7 @@ html
|
|||
body.show-focus
|
||||
nav.main-nav
|
||||
a(href="/").link.home CloudTube
|
||||
input(type="text" placeholder="Search" name="q" autocomplete="off").search
|
||||
form(method="get" action="/search").search-form
|
||||
input(type="text" placeholder="Search" name="q" autocomplete="off").search
|
||||
|
||||
block content
|
||||
|
|
|
|||
16
pug/includes/video-list-item.pug
Normal file
16
pug/includes/video-list-item.pug
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
mixin video_list_item(video)
|
||||
- let link = `/watch?v=${video.videoId}`
|
||||
a(href=link).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
|
||||
if video.publishedText
|
||||
= ` • `
|
||||
span.published= video.publishedText
|
||||
= ` • `
|
||||
span.views= video.viewCountText || video.second__viewCountText
|
||||
if video.descriptionHtml
|
||||
div.description!= video.descriptionHtml
|
||||
Loading…
Add table
Add a link
Reference in a new issue