From ef5e2bc832908fa1087ee53b939139bac4957926 Mon Sep 17 00:00:00 2001 From: Paul-Louis NECH Date: Thu, 1 Jul 2021 14:35:57 +0200 Subject: [PATCH] fix: dimension math, credits link, [id] overflow --- pages/_app.js | 8 ++------ pages/credits.js | 6 ++++-- pages/photos/[id].js | 28 +++++++++++++--------------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/pages/_app.js b/pages/_app.js index fcf1443..5d5d170 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -32,12 +32,8 @@ function MyApp({ Component, pageProps }) { > Paul-Louis {" "} - grace aux contenus partagés par les proches de Philippe. - - - - Crédits - + grace aux contenus partagés par les proches de Philippe - {" "} + Crédits diff --git a/pages/credits.js b/pages/credits.js index ecf3d4a..2cae76d 100644 --- a/pages/credits.js +++ b/pages/credits.js @@ -21,12 +21,12 @@ export async function getStaticProps() { { title: "Vercel", text: "Pour l'hébergement de ces pages", - link: "vercel.com", + link: "https://vercel.com", }, { title: "Next.JS", text: "Utilisé pour construire le site", - link: "nextjs.org", + link: "https://nextjs.org", }, ]; return { @@ -67,6 +67,7 @@ export default function Credits({ credits }) { borderWidth="1px" borderRadius={"10px"} > + {credit.title} +
{credit.text} diff --git a/pages/photos/[id].js b/pages/photos/[id].js index c6d51f5..de900e9 100644 --- a/pages/photos/[id].js +++ b/pages/photos/[id].js @@ -42,9 +42,9 @@ export async function getStaticProps({ params }) { // 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) { + if (photo.dimensions.width > 1000 || photo.dimensions.heigth > 1000) { photo.dimensions.width /= 2; - photo.dimensions.height = 2; + photo.dimensions.height /= 2; console.log("Resized: ", photo.dimensions.width, photo.dimensions.height); } if (photo.dimensions.width > 1000 || photo.dimensions.heigth > 1000) { @@ -74,19 +74,17 @@ export default function Photos({ photo, placeholder }) {
- - - +
-- libgit2 0.27.0