From 802fe8193be01da922b825d6caac345cd2a1bbfa Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 17 Jul 2023 13:37:10 +0300 Subject: [PATCH] added basic theaming... Signed-off-by: Alex A. Naanou --- css/grid-n-view.css | 19 +++++++++++++++++++ grid-n-view.js | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/css/grid-n-view.css b/css/grid-n-view.css index aee9351..99b69ac 100644 --- a/css/grid-n-view.css +++ b/css/grid-n-view.css @@ -20,9 +20,21 @@ --gallery-secondary-color: silver; --gallery-background-color: white; + --lightbox-text-color: black; --lightbox-background-color: white; } +.gallery-dark { + --gallery-text-color: silver; + --gallery-secondary-color: gray; + --gallery-background-color: black; +} + +.lightbox-dark { + --lightbox-text-color: silver; + --lightbox-background-color: black; +} + /****************************************************** Scrolling ****/ @@ -40,6 +52,9 @@ } body { overflow-y: scroll; + + color: var(--gallery-text-color); + background: var(--gallery-background-color); } @@ -55,6 +70,9 @@ body { margin-left: var(--gallery-scrollbar-width); margin-right: 0; + + color: var(--gallery-text-color); + background: var(--gallery-background-color); } .gallery img { height: 300px; @@ -82,6 +100,7 @@ body { text-align: center; + color: var(--lightbox-text-color); background: var(--lightbox-background-color); } .gallery .lightbox.show-caption:after { diff --git a/grid-n-view.js b/grid-n-view.js index f2f8a1a..7e261fe 100644 --- a/grid-n-view.js +++ b/grid-n-view.js @@ -1,3 +1,20 @@ +//===================================================================== +// +// +// +// TODO: +// - selection +// - drag-n-drop +// - sort/move +// - crop selection +// - full screen +// - make the gallery into a web component +// +// +//===================================================================== + + + //--------------------------------------------------------------------- // XXX need to account for scrollbar -- add hysteresis???