video thumbnails maintain aspect ratio

merge-requests/208/head
fatchan 5 years ago
parent 9792f123d5
commit 21e6ce8874
  1. 2
      helpers/files/video-thumbnail.js
  2. 10
      static/css/style.css
  3. 5
      views/mixins/catalogtile.pug

@ -14,7 +14,7 @@ module.exports = (filename) => {
count: 1, count: 1,
filename: `thumb-${filename.split('.')[0]}.png`, filename: `thumb-${filename.split('.')[0]}.png`,
folder: uploadDirectory, folder: uploadDirectory,
size: '128x128' size: '128x?'
}); });
}); });

@ -9,6 +9,14 @@ body {
margin: 0; margin: 0;
} }
.code {
border-left: 10px solid #B7C5D9;
display: block;
padding-left: 5px;
font-family: monospace;
margin: 0.5em 0;
}
.pages a { .pages a {
text-decoration: none; text-decoration: none;
} }
@ -101,7 +109,7 @@ blockquote a {
} }
blockquote { blockquote {
/*word-break: break-all;*/ word-break: break-all;
white-space: pre-wrap; white-space: pre-wrap;
} }

@ -4,7 +4,10 @@ mixin catalogtile(board, post, truncate)
if post.files.length > 0 if post.files.length > 0
.post-file-src .post-file-src
a(href=`/${board._id}/thread/${post.postId}#${post.postId}`) a(href=`/${board._id}/thread/${post.postId}#${post.postId}`)
object.catalog-thumb(data=`/img/thumb-${post.files[0].filename.split('.')[0]}.png` width='64' height='64') if post.spoiler
object(data='/img/spoiler.png' width='64' height='64')
else
object.catalog-thumb(data=`/img/thumb-${post.files[0].filename.split('.')[0]}.png` width='64' height='64')
header.post-info header.post-info
if post.subject if post.subject
span: a.no-decoration.post-subject(href=`/${board._id}/thread/${post.postId}#${post.postId}`) #{post.subject} span: a.no-decoration.post-subject(href=`/${board._id}/thread/${post.postId}#${post.postId}`) #{post.subject}

Loading…
Cancel
Save