AlbumIndex: use blurred images for albums as well
This commit is contained in:
parent
a69c987510
commit
66478c5922
@ -42,7 +42,7 @@ class AlbumIndex extends Template
|
|||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div class="col-md-6 col-xl-4">
|
<div class="col-md-6 col-xl-4">
|
||||||
<div class="polaroid landscape">';
|
<div class="polaroid landscape" style="aspect-ratio: 1.12">';
|
||||||
|
|
||||||
if ($this->show_edit_buttons)
|
if ($this->show_edit_buttons)
|
||||||
echo '
|
echo '
|
||||||
@ -58,15 +58,20 @@ class AlbumIndex extends Template
|
|||||||
$thumbs[$factor] = $album['thumbnail']->getThumbnailUrl(
|
$thumbs[$factor] = $album['thumbnail']->getThumbnailUrl(
|
||||||
static::TILE_WIDTH * $factor, static::TILE_HEIGHT * $factor, true, true);
|
static::TILE_WIDTH * $factor, static::TILE_HEIGHT * $factor, true, true);
|
||||||
|
|
||||||
echo '
|
foreach (['normal-photo', 'blur-photo'] as $className)
|
||||||
|
{
|
||||||
|
echo '
|
||||||
<img alt="" src="', $thumbs[1], '"' . (isset($thumbs[2]) ?
|
<img alt="" src="', $thumbs[1], '"' . (isset($thumbs[2]) ?
|
||||||
' srcset="' . $thumbs[2] . ' 2x"' : '') .
|
' srcset="' . $thumbs[2] . ' 2x"' : '') .
|
||||||
|
' class="', $className, '"' .
|
||||||
' alt="" style="aspect-ratio: ', self::TILE_RATIO, '">';
|
' alt="" style="aspect-ratio: ', self::TILE_RATIO, '">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<img alt="" src="', BASEURL, '/images/nothumb.svg"',
|
<img alt="" src="', BASEURL, '/images/nothumb.svg"',
|
||||||
|
' class="placeholder-image"',
|
||||||
' style="aspect-ratio: ', self::TILE_RATIO, '; object-fit: unset">';
|
' style="aspect-ratio: ', self::TILE_RATIO, '; object-fit: unset">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user