diff --git a/src/pages/index.js b/src/pages/index.js index 1646a2d..7b487b5 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -104,7 +104,8 @@ const IndexPage = ({ const vibrant = getVibrant(image); const ar = getAspectRatio(image); - console.log("bg", image.base); + + const isLandscape = isClient ? ar > 1 : false; return ( <> @@ -118,16 +119,57 @@ const IndexPage = ({
1 || !isClient + isLandscape ? "landscape:grid portrait:flex portrait:flex-col" - : "portrait:grid landscape:flex landscape:flex-row-reverse" + : "portrait:grid landscape:flex landscape:flex-row" )} > +
+
{isClient ? ( 1 || !isClient + isLandscape ? "landscape:h-screen portrait:h-two-thirds-vw" : "h-screen portrait:w-full landscape:w-1/2" )} @@ -143,48 +185,15 @@ const IndexPage = ({ style={{ gridArea: "1/1" }} > )} -
1 || !isClient - ? "portrait:items-center" - : "landscape:justify-center" - )} - style={{ gridArea: "1/1" }} - > -
+ )}
);