diff options
author | Volpeon <git@volpeon.ink> | 2022-06-18 00:06:42 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-06-18 00:06:42 +0200 |
commit | 233337b8a42d4d0893502343df69af251e0b75d1 (patch) | |
tree | 8af21f64b38c2d16b1b36fad0093700f24daa5bf | |
parent | Added page type for art pieces (diff) | |
download | volpeon.ink-233337b8a42d4d0893502343df69af251e0b75d1.tar.gz volpeon.ink-233337b8a42d4d0893502343df69af251e0b75d1.tar.bz2 volpeon.ink-233337b8a42d4d0893502343df69af251e0b75d1.zip |
Hide unnecessary UI elements in lightbox
-rw-r--r-- | content/lightbox.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content/lightbox.js b/content/lightbox.js index a415930..66facd6 100644 --- a/content/lightbox.js +++ b/content/lightbox.js | |||
@@ -94,6 +94,12 @@ | |||
94 | 94 | ||
95 | setIndex(0); | 95 | setIndex(0); |
96 | 96 | ||
97 | if (figureEls.length <= 1) { | ||
98 | lightboxPrevEl.remove(); | ||
99 | lightboxNextEl.remove(); | ||
100 | lightboxFooterEl.remove(); | ||
101 | } | ||
102 | |||
97 | if (closeable) { | 103 | if (closeable) { |
98 | document.addEventListener('mousedown', (e) => { | 104 | document.addEventListener('mousedown', (e) => { |
99 | if (visible) { | 105 | if (visible) { |