Add gaussian blurs behind photos #34

Merged
Aaron merged 7 commits from image-blur into master 2023-11-11 12:05:01 +01:00
Showing only changes of commit 66478c5922 - Show all commits

View File

@ -42,7 +42,7 @@ class AlbumIndex extends Template
{
echo '
<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)
echo '
@ -58,15 +58,20 @@ class AlbumIndex extends Template
$thumbs[$factor] = $album['thumbnail']->getThumbnailUrl(
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]) ?
' srcset="' . $thumbs[2] . ' 2x"' : '') .
' class="', $className, '"' .
' alt="" style="aspect-ratio: ', self::TILE_RATIO, '">';
}
}
else
{
echo '
<img alt="" src="', BASEURL, '/images/nothumb.svg"',
' class="placeholder-image"',
' style="aspect-ratio: ', self::TILE_RATIO, '; object-fit: unset">';
}