diff --git a/css/grid-n-view.css b/css/grid-n-view.css index cca33d2..f07d72c 100644 --- a/css/grid-n-view.css +++ b/css/grid-n-view.css @@ -10,6 +10,7 @@ :root { /* dimensions */ --gallery-scrollbar-width: 0.5em; + --gallery-image-scroll-margin: 1em; --lightbox-frame-size: 5vmin; --lightbox-image-margin-top: 0.75; @@ -79,6 +80,7 @@ body { .gallery .images img { height: 300px; width: auto; + scroll-margin: var(--gallery-image-scroll-margin); image-rendering: crisp-edges; cursor: pointer; @@ -87,7 +89,9 @@ body { /* selection marker... */ .gallery .images img.current { z-index: 1; - box-shadow: 0px 0px 0px 5px rgba(255,0,0,0.8); + box-shadow: + 0px 0px 0px 0.5em rgba(255,255,255,1), + 0.3em 0.3em 3em 0em rgba(0,0,0,0.8); } @@ -97,9 +101,14 @@ body { z-index: 1; position: relative; } +.gallery.lightboxed .images img+.mark { + z-index: 2; + position: fixed; + bottom: 0; + right: 0; +} /* marker: selected */ -.gallery .lightbox.selected:after, .gallery .images img+.mark.selected:after { content: ""; position: absolute; @@ -111,7 +120,10 @@ body { border-radius: 50%; background: blue; - border: solid 1px white; + + box-shadow: 0em 0em 0em 0.05em rgba(255,255,255,1); + + cursor: pointer; } @@ -132,6 +144,9 @@ body { color: var(--lightbox-text-color); background: var(--lightbox-background-color); } +.gallery.lightboxed .lightbox { + display: block; +} .gallery .lightbox.show-caption:before { content: attr(caption); position: absolute; diff --git a/grid-n-view.js b/grid-n-view.js index 3799250..044ed57 100644 --- a/grid-n-view.js +++ b/grid-n-view.js @@ -93,6 +93,7 @@ function(elem) { //--------------------------------------------------------------------- +// XXX add shift+arrow to select... // XXX add home/end, pageup/pagedown... var keyboard = { ArrowLeft: function(){ @@ -142,9 +143,12 @@ var keyboard = { var Gallery = { + // options... + // allow_row_expansion: true, click_to_select: true, + code: `