mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
28 lines
1.1 KiB
mixin catalogtile(board, post, index)
|
|
.catalog-tile(data-board=post.board data-post-id=post.postId data-user-id=post.userId)
|
|
- const postURL = `/${board._id}/thread/${post.postId}.html#${post.postId}`
|
|
.post-info
|
|
include ../includes/posticons.pug
|
|
a.no-decoration.post-subject(href=postURL) #{post.subject || 'No subject'}
|
|
br
|
|
span(title='Replies') R: #{post.replyposts}
|
|
| /
|
|
span(title='Files') F: #{post.replyfiles}
|
|
| /
|
|
span(title='Page') P: #{Math.ceil(index/10)}
|
|
if post.files.length > 0
|
|
.post-file-src
|
|
a(href=postURL)
|
|
- const file = post.files[0]
|
|
if post.spoiler
|
|
div.spoilerimg.catalog-thumb
|
|
else if file.attachment
|
|
div.attachmentimg.catalog-thumb
|
|
else if file.mimetype.startsWith('audio')
|
|
div.audioimg.catalog-thumb
|
|
else if file.hasThumb
|
|
img.catalog-thumb(src=`/file/thumb-${file.hash}${file.thumbextension}` width='64' height='64' loading='lazy')
|
|
else
|
|
img.catalog-thumb(src=`/file/${file.filename}` width='64' height='64' loading='lazy')
|
|
if post.message
|
|
pre.no-m-p.post-message !{post.message}
|
|
|