From ef5c3390e12fdbb18b9d761e3e1b78ae5cc6b16a Mon Sep 17 00:00:00 2001 From: Paul-Louis NECH Date: Wed, 23 Jun 2021 11:36:02 +0200 Subject: [PATCH] pages: Sync changes --- pages/index.js | 33 +++++---------------------------- pages/photos/[id].js | 30 +++++++----------------------- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/pages/index.js b/pages/index.js index 3e65ee2..eaffc8e 100644 --- a/pages/index.js +++ b/pages/index.js @@ -37,13 +37,8 @@ export default function Home({ data, placeholders }) { - me - + {photos.map((photo) => ( - {/**/} - - {/**/} ))} diff --git a/pages/photos/[id].js b/pages/photos/[id].js index 60b8959..642edad 100644 --- a/pages/photos/[id].js +++ b/pages/photos/[id].js @@ -49,25 +49,9 @@ export async function getStaticProps({ params }) { if (photo.dimensions.width > 1000 || photo.dimensions.heigth > 1000) { photo.dimensions.width /= 2; photo.dimensions.height /= 2; - console.log("Resized: ", photo.dimensions.width, photo.dimensions.height); - - // Fix dimensions if really big picture - console.log("Pic dims: ", photo.dimensions.width, photo.dimensions.height); - if (photo.dimensions.widths > 1000 || photo.dimensions.heigth > 1000) { - photo.dimensions.width /= 2; - photo.dimensions.height = 2; - console.log("Resized:", photo.dimensions.width, photo.dimensions.height); - } - if (photo.dimensions.width > 1000 || photo.dimensions.heigth > 1000) { - photo.dimensions.width /= 2; - photo.dimensions.height /= 2; - console.log( - "Resized 2:", - photo.dimensions.width, - photo.dimensions.height - ); - } + console.log("Resized 2:", photo.dimensions.width, photo.dimensions.height); } + // console.log("P/N:", photo.prev, photo.next); return { props: { photo, @@ -111,21 +95,21 @@ export default function Photos({ photo, placeholder }) { as="a" borderRadius="full" colorScheme="gray" - fontSize="xl" - size="lg" + fontSize={["sm", "md", "lg", "lg"]} + size={["sm", "md", "lg", "lg"]} cursor="pointer" m="15px" > ⟸ Précédente - +