From fcf1cb4d2d92b6e840ce1644df14fbdeb2136491 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 13 Aug 2023 13:03:16 +0300 Subject: [PATCH] tweaking and cleanup... Signed-off-by: Alex A. Naanou --- css/grid-n-view.css | 5 +++-- grid-n-view.html | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/css/grid-n-view.css b/css/grid-n-view.css index 8b68674..aa7f900 100644 --- a/css/grid-n-view.css +++ b/css/grid-n-view.css @@ -9,6 +9,7 @@ :root { /* dimensions */ + --gallery-image-base-height: 18rem; --gallery-image-margin: 0; --gallery-current-image-border: 0.7rem; --gallery-padding: 3rem; @@ -19,8 +20,8 @@ --gallery-padding-left: var(--gallery-padding-horizontal); --gallery-padding-right: var(--gallery-padding-horizontal); --gallery-image-scroll-margin: calc(2 * var(--gallery-current-image-border)); + --gallery-empty-height: var(--gallery-image-base-height); --gallery-scrollbar-width: 0.5rem; - --gallery-empty-height: 20rem; --lightbox-frame: 5vmin; --lightbox-image-margin-top: 0.75; @@ -124,7 +125,7 @@ body { /* image... */ .gallery .images img { - height: 300px; + height: var(--gallery-image-base-height); width: auto; border: solid var(--gallery-image-margin) transparent; diff --git a/grid-n-view.html b/grid-n-view.html index 8122fd9..9805dbb 100644 --- a/grid-n-view.html +++ b/grid-n-view.html @@ -111,8 +111,12 @@ var restoreScroll = function(){ - ... + +
+ +

Keyboard controls

+
-Keyboard controls:
     Left / Reight   - Previos / next image
     Up / Down       - Image above / below
     Space           - Mark image (also shift-click)