GalleryItem img now acts as a link to full file when clicked

This commit is contained in:
Sheldon Lee 2024-03-11 18:40:46 +08:00
parent d332635d6a
commit 76b50ec462
2 changed files with 9 additions and 2 deletions

View File

@ -38,7 +38,12 @@ body {
overflow: clip;
}
.GalleryItem > img,
.GalleryItem > .ImgLink {
margin: 0;
padding: 0;
}
.GalleryItem > .ImgLink > img,
.GalleryItem > video {
object-fit: contain;
max-height: 80vh;

View File

@ -116,7 +116,9 @@ function ImageItem({ thumbnail_url, url, isPlaceholder }: galleryItem) {
<a href={url} target="_blank">
{getFileName(url)}
</a>
<img src={thumbnail_url} loading="lazy" />
<a href={url} target="_blank" className="ImgLink">
<img src={thumbnail_url} loading="lazy" />
</a>
</div>
);
}