forked from Public/pics
AlbumIndex: enable rendering of more double-density thumbnails
This commit is contained in:
parent
2ef1289628
commit
6b028aac41
@ -46,8 +46,17 @@ class AlbumIndex extends SubTemplate
|
||||
<a href="', $album['link'], '">';
|
||||
|
||||
if (isset($album['thumbnail']))
|
||||
{
|
||||
$thumbs = [];
|
||||
foreach ([1, 2] as $factor)
|
||||
$thumbs[$factor] = $album['thumbnail']->getThumbnailUrl(
|
||||
static::TILE_WIDTH * $factor, static::TILE_HEIGHT * $factor, true, true);
|
||||
|
||||
echo '
|
||||
<img src="', $album['thumbnail']->getThumbnailUrl(static::TILE_WIDTH, static::TILE_HEIGHT, true, true), '" alt="">';
|
||||
<img src="', $thumbs[1], '"' . (isset($thumbs[2]) ?
|
||||
' srcset="' . $thumbs[2] . ' 2x"' : '') .
|
||||
' alt="">';
|
||||
}
|
||||
else
|
||||
echo '
|
||||
<img src="', BASEURL, '/images/nothumb.png" alt="">';
|
||||
|
Loading…
Reference in New Issue
Block a user