From 34161d9eb116fb773d38bbe8e8d0572eb552f56d Mon Sep 17 00:00:00 2001 From: PLN Date: Wed, 16 Jun 2021 12:13:42 +0200 Subject: [PATCH] feat: NavLinks, adapt quality on home --- .gitignore | 2 ++ components/NavLinks.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ pages/index.js | 2 +- pages/photos/[id].js | 37 +++---------------------------------- 4 files changed, 57 insertions(+), 35 deletions(-) create mode 100644 components/NavLinks.js diff --git a/.gitignore b/.gitignore index 7c762b1..35c704a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ node_modules/ # TODO: Video Content *.MOV *.mp4 + +.vercel diff --git a/components/NavLinks.js b/components/NavLinks.js new file mode 100644 index 0000000..8525b9d --- /dev/null +++ b/components/NavLinks.js @@ -0,0 +1,51 @@ +import Image from "next/image"; +import { + Box, + Divider, + Center, + Text, + Flex, + Spacer, + Button, +} from "@chakra-ui/react"; +import Head from "next/head"; +import Link from "next/link"; + +function NavLinks({ prev, next }) { + let prevText = next == 2 ? "Dernière" : "Précédente"; + let nextText = next != 1 ? "Suivante" : "Retour au début"; + return ( +
+ + + + + + +
+ ); +} + +export default NavLinks; diff --git a/pages/index.js b/pages/index.js index 5151c56..6a3427a 100644 --- a/pages/index.js +++ b/pages/index.js @@ -65,7 +65,7 @@ export default function Home({ data }) { objectFit="cover" placeholder="img/Diaporama/f5b1d804-3860-4073-b280-69e54985c66f.jpg" color="gray.700" - quality={100} + quality={50} /> diff --git a/pages/photos/[id].js b/pages/photos/[id].js index 4b84660..5e8ed7d 100644 --- a/pages/photos/[id].js +++ b/pages/photos/[id].js @@ -12,6 +12,7 @@ import Image from "next/image"; import Head from "next/head"; import Link from "next/link"; import BackHome from "../../components/BackHome"; +import NavLinks from "../../components/NavLinks"; import { InfoIcon, AtSignIcon } from "@chakra-ui/icons"; import { Img } from "@chakra-ui/react"; @@ -60,7 +61,7 @@ export default function Photos({ pic }) { - +
@@ -75,39 +76,7 @@ export default function Photos({ pic }) { />
- - -
- - - - - - - - -
+ ); } -- libgit2 0.27.0