From 5063047312ed37f0d44decd267dd5f9b5fc10102 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Sat, 16 Mar 2024 11:13:48 +0300 Subject: [PATCH 1/3] feat: update landing --- src/pages/index.tsx | 120 ++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 55 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index a1440d67cb7..439d9323958 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,16 +1,17 @@ import React from "react"; import Head from "next/head"; import Link from "next/link"; -import { Button, Flex, Group, Text } from "@mantine/core"; +import { Button, Flex, Group, Stack, Text } from "@mantine/core"; import styled from "styled-components"; import { MdChevronRight } from "react-icons/md"; import Layout from "src/layout/Layout"; const StyledHeroSection = styled.section` position: relative; - padding: 4em; + padding: 4em 4em 2em; &::before { + z-index: 0; position: absolute; content: ""; top: 0%; @@ -21,20 +22,24 @@ const StyledHeroSection = styled.section` -webkit-mask-image: radial-gradient(rgba(0, 0, 0, 0.45), transparent 70%); mask-image: radial-gradient(rgba(0, 0, 0, 0.45), transparent 70%); } + + @media only screen and (max-width: 768px) { + padding: 2em; + } `; const StyledHeroSectionBody = styled.div` min-height: 70vh; display: flex; - flex-direction: column; - justify-content: center; + justify-content: space-between; + align-items: center; margin: 0 auto; width: fit-content; - gap: 24px; + gap: 4vw; `; const StyledHeroTitle = styled.h1` - font-size: 60px; + font-size: clamp(24px, 4vw, 50px); color: white; @media only screen and (max-width: 768px) { @@ -43,9 +48,9 @@ const StyledHeroTitle = styled.h1` `; const StyledHeroText = styled.p` - font-size: 24px; + font-size: clamp(18px, 2vw, 22px); color: #bcbcbc; - max-width: 60%; + max-width: 600px; @media only screen and (max-width: 768px) { font-size: 20px; @@ -57,15 +62,16 @@ const StyledImageWrapper = styled.div` border: 8px solid #36393e; border-radius: 6px; border-top: none; - width: 80%; - height: auto; + width: 100%; + max-width: 40vw; + flex: auto; + height: fit-content; margin: 0 auto; + z-index: 1; img { display: block; width: 100%; - height: 100%; - object-fit: contain; } @media only screen and (max-width: 768px) { @@ -74,6 +80,8 @@ const StyledImageWrapper = styled.div` `; const StyledFeaturedSection = styled.section` + padding: 0 1em; + img { filter: brightness(70%) grayscale(100%); transition: filter 200ms ease; @@ -92,54 +100,59 @@ export const HomePage = () => { - More than a JSON editor. - - - Visualize, analyze, and manipulate data with ease, a versatile and powerful tool for - data representation and exploration. - - - + + More than a JSON editor. + + + Visualize, analyze, and manipulate data with ease, a versatile and powerful tool for + data representation and exploration. + + + + + + - - - - + + + + JSON Crack Preview + @@ -174,9 +187,6 @@ export const HomePage = () => { - - JSON Crack Preview - ); }; From 70c7f08b8a0f169145dbaac093c79e007f58f1e3 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Sat, 16 Mar 2024 18:17:47 +0300 Subject: [PATCH 2/3] fix: z-index --- src/pages/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 439d9323958..85fb0659d1d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -29,6 +29,8 @@ const StyledHeroSection = styled.section` `; const StyledHeroSectionBody = styled.div` + position: relative; + z-index: 1; min-height: 70vh; display: flex; justify-content: space-between; @@ -67,7 +69,6 @@ const StyledImageWrapper = styled.div` flex: auto; height: fit-content; margin: 0 auto; - z-index: 1; img { display: block; From ee768c20cec745c71877d6d499584999885bc698 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Sat, 16 Mar 2024 18:19:35 +0300 Subject: [PATCH 3/3] feat: optimize img --- src/pages/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 85fb0659d1d..9bcce574c1d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -152,7 +152,12 @@ export const HomePage = () => { - JSON Crack Preview + JSON Crack Preview