jschan - Anonymous imageboard software. Classic look, modern features and feel. Works without JavaScript and supports Tor, I2P, Lokinet, etc.
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.
 
 
 
 
 

14 lines
805 B

mixin catalogfile(postURL, post, file, small=false)
- const type = file.mimetype.split('/')[0]
.post-file-src
a(href=`${postURL}#${post.postId}`)
if post.spoiler || file.spoiler
div.spoilerimg.catalog-thumb(class=(small?'small':''))
else if file.hasThumb
img.catalog-thumb(class=(small?'small':'') src=`/file/thumb/${file.hash}${file.thumbextension}` width=file.geometry.thumbwidth height=file.geometry.thumbheight loading='lazy')
else if file.attachment
div.attachmentimg.catalog-thumb(class=(small?'small':'') data-mimetype=file.mimetype)
else if type === 'audio'
div.audioimg.catalog-thumb(class=(small?'small':''))
else
img.catalog-thumb(class=(small?'small':'') src=`/file/${file.filename}` width=file.geometry.width height=file.geometry.height loading='lazy')