From 0d3d6f4989a2134e8df52cd92136a68e00def1c2 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Tue, 29 Oct 2024 19:49:21 +0100 Subject: [PATCH] Update mobile view --- public/style.css | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/public/style.css b/public/style.css index 21a1840..c9d5046 100644 --- a/public/style.css +++ b/public/style.css @@ -2,11 +2,6 @@ html { background: #191919; } -#lightgallery img { - height: 300px; - margin: 4px; -} - #lightgallery a { position: relative; display: inline-block; @@ -16,6 +11,25 @@ html { cursor: pointer; } +#lightgallery img { + max-height: 250px; + margin: 4px; +} + +@media (max-width:800px) { + #lightgallery a { + width: calc(100vw / 3 - 10px); + height: calc(100vw / 3 - 10px); + overflow: hidden; + } + #lightgallery img { + width: 100%; + height: auto; + object-fit: cover; + object-position: center; + } +} + .play-icon { position: absolute; top: 50%;