Commit 106dc714 by PLN (Algolia)

chore: Better responsiveness, still WIP

parent 4477a771
...@@ -49,30 +49,34 @@ export default function Home({ data, placeholders }) { ...@@ -49,30 +49,34 @@ export default function Home({ data, placeholders }) {
Philippe Bureau - Galerie Photo Philippe Bureau - Galerie Photo
</Text> </Text>
</Container> </Container>
<Wrap px="1rem" spacing={"10px"} mb={1} justify="center"> <Wrap px={"10rem"} spacing={"1rem"} mb={1} justify="center">
{photos.map((photo) => ( {photos.map((photo) => (
<WrapItem <WrapItem
key={"wrap-" + photo.id} key={"wrap-" + photo.id}
// m={3}
bg="white"
lineHeight="0"
>
<Link href={`/photos/${photo.id}`}>
<Box
boxShadow="lg" boxShadow="lg"
rounded="10px" rounded="10px"
overflow="hidden" overflow="hidden"
m={3} boxSize={["120px", "180px", "200px", "240px"]}
bg="white"
lineHeight="0"
_hover={{ boxShadow: "dark-lg", rounded: "20px" }} _hover={{ boxShadow: "dark-lg", rounded: "20px" }}
> >
<Link href={`/photos/${photo.id}`}>
<Image <Image
key={photo.path} key={photo.path}
src={photo.path} src={photo.path}
width={240} width={"240px"}
height={240} height="240px"
objectFit="cover" objectFit="cover"
quality={20} quality={20}
// placeholder="blur" // placeholder="blur"
priority priority
blurDataURL={`${placeholders[photo.id]}`} blurDataURL={`${placeholders[photo.id]}`}
/> />
</Box>
</Link> </Link>
</WrapItem> </WrapItem>
))} ))}
......
...@@ -74,6 +74,7 @@ export default function Photos({ photo, placeholder }) { ...@@ -74,6 +74,7 @@ export default function Photos({ photo, placeholder }) {
<Center> <Center>
<Link href={photo.path}> <Link href={photo.path}>
<Box boxSize={["xs", "sm", "md", "lg"]}>
<Image <Image
src={photo.path} src={photo.path}
width={photo.dimensions.width || 480} width={photo.dimensions.width || 480}
...@@ -85,6 +86,7 @@ export default function Photos({ photo, placeholder }) { ...@@ -85,6 +86,7 @@ export default function Photos({ photo, placeholder }) {
blurDataURL={placeholder} blurDataURL={placeholder}
loading="eager" loading="eager"
/> />
</Box>
</Link> </Link>
</Center> </Center>
<NavLinks prev={photo.prev} next={photo.next} /> <NavLinks prev={photo.prev} next={photo.next} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment