From 54c4294d08efc2660cddb0051bc1a11c455f1677 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 11 Mar 2023 17:16:53 +0100 Subject: [PATCH] Add 'no thumb' vector image for use while loading --- public/css/default.css | 1 + public/images/nothumb.png | Bin 3694 -> 0 bytes public/images/nothumb.svg | 10 ++++++++++ templates/AlbumIndex.php | 5 +++-- templates/PhotosIndex.php | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) delete mode 100644 public/images/nothumb.png create mode 100644 public/images/nothumb.svg diff --git a/public/css/default.css b/public/css/default.css index 8e85c9c..3c60ef9 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -180,6 +180,7 @@ i.space-invader.alt-7::before { width: 31%; } .tiled_grid div img { + background: url('../images/nothumb.svg') center no-repeat; border: none; width: 100%; } diff --git a/public/images/nothumb.png b/public/images/nothumb.png deleted file mode 100644 index ce6a2f2d8c7db907ef15baf54f579481e35a5e7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3694 zcma)93pmqzA766I<>)wBa(NqalE&OG3mt8WG?&6g$7Rhw)@)-NyCAQlbWZE-2oVlm zbkyt8mP^WQ#n~YfMNK85NEsQqgz)~SQ|Eo2_w79Io;~0F{=eV%^Z8!?zvsK3e7p{* ztLUgeAP{vAcl2QhWJ4ObZdaBAr3VvM3;t|lxZxN_sK*&hJPm-jhEtCLFb^_50yqrd z!`U%+0VfD#;|`)9j)B7*LK3KCbG%H)oJEcX(GZB!URE@oKmr)BV?YFv;%qq8ATWdx z!<`MWwipXcGzy3$x^rm25ssH1fkPrVh8ym6fjO~|AORU*;9)Fs6ormtIUBC?BEhw6 z8(|1rS7DHx4L>@C!}!2ZR2l%YHMce+SXf%Z?Ci`fZEWrAEa5OK3rj161^Bfyv$R3l z+99p%VSjuKL2I<|NZ5&6(EbR9XbW($UdT#$jb;25Okm z*%StzWk#VJePTcZbOMbS%^*@KFc~BM7&VsRYzTV#F$8k-XIcvVk2HY^L$L7C2upJ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>7BSmmpHcQxu6*}7uXYR8_2(h_B`{4z&CC9%Rx{!K>i<7 + + + + + + + + + diff --git a/templates/AlbumIndex.php b/templates/AlbumIndex.php index 56635a4..3205b81 100644 --- a/templates/AlbumIndex.php +++ b/templates/AlbumIndex.php @@ -55,11 +55,12 @@ class AlbumIndex extends Template echo ' '; + ' alt="" style="width: ', static::TILE_WIDTH, + 'px; height: ', static::TILE_HEIGHT, 'px">'; } else echo ' - '; + '; if ($this->show_labels) echo ' diff --git a/templates/PhotosIndex.php b/templates/PhotosIndex.php index 7fbdf55..29fa06a 100644 --- a/templates/PhotosIndex.php +++ b/templates/PhotosIndex.php @@ -100,7 +100,7 @@ class PhotosIndex extends Template else echo ' srcset="', $image->getThumbnailUrl($image->width(), $image->height(), true), ' 2x"'; - echo ' alt="" title="', $image->getTitle(), '" style="aspect-ratio: ', $image->ratio(), '">'; + echo ' alt="" title="', $image->getTitle(), '" style="width: ', $width, 'px; height: ', $height, 'px">'; if ($this->show_labels) echo '