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}
boxShadow="lg" // m={3}
rounded="10px"
overflow="hidden"
m={3}
bg="white" bg="white"
lineHeight="0" lineHeight="0"
_hover={{ boxShadow: "dark-lg", rounded: "20px" }}
> >
<Link href={`/photos/${photo.id}`}> <Link href={`/photos/${photo.id}`}>
<Image <Box
key={photo.path} boxShadow="lg"
src={photo.path} rounded="10px"
width={240} overflow="hidden"
height={240} boxSize={["120px", "180px", "200px", "240px"]}
objectFit="cover" _hover={{ boxShadow: "dark-lg", rounded: "20px" }}
quality={20} >
// placeholder="blur" <Image
priority key={photo.path}
blurDataURL={`${placeholders[photo.id]}`} src={photo.path}
/> width={"240px"}
height="240px"
objectFit="cover"
quality={20}
// placeholder="blur"
priority
blurDataURL={`${placeholders[photo.id]}`}
/>
</Box>
</Link> </Link>
</WrapItem> </WrapItem>
))} ))}
......
...@@ -74,17 +74,19 @@ export default function Photos({ photo, placeholder }) { ...@@ -74,17 +74,19 @@ export default function Photos({ photo, placeholder }) {
<Center> <Center>
<Link href={photo.path}> <Link href={photo.path}>
<Image <Box boxSize={["xs", "sm", "md", "lg"]}>
src={photo.path} <Image
width={photo.dimensions.width || 480} src={photo.path}
height={photo.dimensions.height || 480} width={photo.dimensions.width || 480}
// objectFit="cover" height={photo.dimensions.height || 480}
quality={80} // objectFit="cover"
priority quality={80}
placeholder="blur" priority
blurDataURL={placeholder} placeholder="blur"
loading="eager" blurDataURL={placeholder}
/> 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