client/general: show empty thumbnails as grid

This commit is contained in:
rr- 2016-08-23 22:31:56 +02:00
parent 495f98a65f
commit ad8ed89e3c
2 changed files with 10 additions and 4 deletions

View file

@ -177,6 +177,10 @@ a .access-key
height: 100%
width: 20px
height: 20px
&.empty
background-image: url('/img/transparency_grid.png')
background-repeat: repeat
background-size: initial
.flexbox-dummy
height: 0 !important

View file

@ -42,10 +42,12 @@ function makeRelativeTime(time) {
function makeThumbnail(url) {
return makeNonVoidElement(
'span',
{
class: 'thumbnail',
style: `background-image: url(\'${url}\')`,
},
url ?
{
class: 'thumbnail',
style: `background-image: url(\'${url}\')`,
} :
{class: 'thumbnail empty'},
makeVoidElement('img', {alt: 'thumbnail', src: url}));
}