From e245b283ad72d8132f6c9b1b95f86d7c2f95b28f Mon Sep 17 00:00:00 2001 From: midblep Date: Fri, 25 Jun 2021 20:55:20 +0200 Subject: [PATCH] added native airtable images instead of urls and improved gallery layout --- pages/gallery.js | 1 + styles/Gallery.module.css | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pages/gallery.js b/pages/gallery.js index be39f35..8e45aa8 100644 --- a/pages/gallery.js +++ b/pages/gallery.js @@ -7,6 +7,7 @@ export default function Gallery({ response }) { let images = []; for(const key in response) { let item = response[key]; + if(item['fields']['image'] != null) item['fields']['link'] = item['fields']['image'][0]['url']; images.push(item['fields']); } diff --git a/styles/Gallery.module.css b/styles/Gallery.module.css index 8076e08..ae6ef79 100644 --- a/styles/Gallery.module.css +++ b/styles/Gallery.module.css @@ -13,6 +13,10 @@ position: relative; } +.gallery > div > img { + margin-bottom: -5px; +} + .overlay { position: absolute; display: flex;