From 76b50ec462e423e36368dee0b2c7c8707a74ca40 Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Mon, 11 Mar 2024 18:40:46 +0800 Subject: [PATCH] GalleryItem img now acts as a link to full file when clicked --- src/App.css | 7 ++++++- src/Gallery/index.tsx | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/App.css b/src/App.css index 2fa3738..607ebcc 100644 --- a/src/App.css +++ b/src/App.css @@ -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; diff --git a/src/Gallery/index.tsx b/src/Gallery/index.tsx index 6925bb8..6085709 100644 --- a/src/Gallery/index.tsx +++ b/src/Gallery/index.tsx @@ -116,7 +116,9 @@ function ImageItem({ thumbnail_url, url, isPlaceholder }: galleryItem) { {getFileName(url)} - + + + ); }