Add gaussian blurs behind photos #34

Sloučený
Aaron sloučil 7 commity z větve image-blur do větve master před 2023-11-11 12:05:01 +01:00
Zobrazuji pouze změny commitu 66478c5922 - Zobrazit všechny commity

Zobrazit soubor

@ -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">';
}