From e906065d470569260ad55ea844f58cd0690f0f6e Mon Sep 17 00:00:00 2001 From: reverend Date: Sat, 3 Apr 2021 22:25:35 +0200 Subject: [PATCH] Implementing a beta version of a lightbox --- .../03_Organisms/imageGrid/_imageGrid.scss | 62 +++++++++++++++++++ .../imageGrid/imageGrid.config.json | 33 ++++++++-- .../03_Organisms/imageGrid/imageGrid.hbs | 18 +++++- public/main.css | 52 ++++++++++++++++ 4 files changed, 158 insertions(+), 7 deletions(-) diff --git a/components/03_Organisms/imageGrid/_imageGrid.scss b/components/03_Organisms/imageGrid/_imageGrid.scss index e72324d..7316745 100644 --- a/components/03_Organisms/imageGrid/_imageGrid.scss +++ b/components/03_Organisms/imageGrid/_imageGrid.scss @@ -56,4 +56,66 @@ &__Item>.LP-Link:hover + &__DeleteItem, &__DeleteItem:hover { visibility: visible; } + + &__LightBox { + visibility: hidden; + display: none; + position: fixed; + pointer-events: none; + flex-direction: row; + justify-content: center; + align-items: center; + background-color: rgba($-grey, .9); + padding: 2rem; + padding-bottom: 0; + width: 100vw; + height: 100vh; + z-index: 30; + top: 0; + left: 0; + box-sizing: border-box; + + &:target { + visibility: visible; + display: grid; + grid-template-areas: 'picture picture' 'previous next'; + grid-template-rows: 1fr 4rem; + grid-template-columns: 1fr 1fr; + pointer-events: initial; + } + } + + &__FullSizeImage { + grid-area: picture; + } + + &__Previous{ + grid-area: previous; + align-self: center; + justify-self: end; + } + + &__Next { + grid-area: next; + align-self: center; + justify-self: start; + } + + &__Previous, &__Next { + padding: 25px; + color: $-beige; + text-decoration: none; + font-family: $-primary-sans-serif-font; + font-weight: bold; + font-size: 20px; + } + + &__Close{ + position: fixed; + right: 1rem; + top: 1rem; + left: unset; + visibility: visible; + opacity: 1; + } } \ No newline at end of file diff --git a/components/03_Organisms/imageGrid/imageGrid.config.json b/components/03_Organisms/imageGrid/imageGrid.config.json index 4264502..b9d7bd4 100644 --- a/components/03_Organisms/imageGrid/imageGrid.config.json +++ b/components/03_Organisms/imageGrid/imageGrid.config.json @@ -1,11 +1,34 @@ { "context": { "images": [ - "/images/Bildschirmfoto_von_2020-07-13_11-03-07.png", - "/images/photo_2020-05-02_18-11-21.jpg", - "/images/Bildschirmfoto_von_2020-07-13_20-15-00.png", - "/images/photo_2020-05-02_18-11-21.jpg", - "/images/Bildschirmfoto_von_2020-07-13_11-03-07.png" + { + "url": "/images/Bildschirmfoto_von_2020-07-13_11-03-07.png", + "current_id": "image0", + "next_id": "image1" + }, + { + "url": "/images/photo_2020-05-02_18-11-21.jpg", + "previous_id": "image0", + "current_id": "image1", + "next_id": "image2" + }, + { + "url": "/images/Bildschirmfoto_von_2020-07-13_20-15-00.png", + "previous_id": "image1", + "current_id": "image2", + "next_id": "image3" + }, + { + "url": "/images/photo_2020-05-02_18-11-21.jpg", + "previous_id": "image2", + "current_id": "image3", + "next_id": "image4" + }, + { + "url": "/images/Bildschirmfoto_von_2020-07-13_11-03-07.png", + "previous_id": "image3", + "current_id": "image4" + } ] } } \ No newline at end of file diff --git a/components/03_Organisms/imageGrid/imageGrid.hbs b/components/03_Organisms/imageGrid/imageGrid.hbs index 8b3301e..2400616 100644 --- a/components/03_Organisms/imageGrid/imageGrid.hbs +++ b/components/03_Organisms/imageGrid/imageGrid.hbs @@ -3,14 +3,28 @@