client/general: show empty thumbnails as grid
This commit is contained in:
parent
495f98a65f
commit
ad8ed89e3c
|
@ -177,6 +177,10 @@ a .access-key
|
||||||
height: 100%
|
height: 100%
|
||||||
width: 20px
|
width: 20px
|
||||||
height: 20px
|
height: 20px
|
||||||
|
&.empty
|
||||||
|
background-image: url('/img/transparency_grid.png')
|
||||||
|
background-repeat: repeat
|
||||||
|
background-size: initial
|
||||||
|
|
||||||
.flexbox-dummy
|
.flexbox-dummy
|
||||||
height: 0 !important
|
height: 0 !important
|
||||||
|
|
|
@ -42,10 +42,12 @@ function makeRelativeTime(time) {
|
||||||
function makeThumbnail(url) {
|
function makeThumbnail(url) {
|
||||||
return makeNonVoidElement(
|
return makeNonVoidElement(
|
||||||
'span',
|
'span',
|
||||||
|
url ?
|
||||||
{
|
{
|
||||||
class: 'thumbnail',
|
class: 'thumbnail',
|
||||||
style: `background-image: url(\'${url}\')`,
|
style: `background-image: url(\'${url}\')`,
|
||||||
},
|
} :
|
||||||
|
{class: 'thumbnail empty'},
|
||||||
makeVoidElement('img', {alt: 'thumbnail', src: url}));
|
makeVoidElement('img', {alt: 'thumbnail', src: url}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue