Skip to content

Commit 937eb43

Browse files
Fix scroll layout on mobile
1 parent e09ed66 commit 937eb43

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

components/Section.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ export default function Section({
1616
return (
1717
<section
1818
className={cns(
19-
`w-full min-h-screen flex flex-col justify-center md:justify-start lg:justify-center items-center px-[20px] md:px-[40px] snap-start container mx-auto`,
19+
`w-screen h-svh flex flex-col justify-center md:justify-start lg:justify-center items-center px-[20px] md:px-[40px] snap-start container mx-auto`,
2020
{
2121
"lg:flex-row-reverse": reverse,
2222
"lg:flex-row": !reverse,
2323
}
2424
)}
2525
>
26-
<div className="flex items-center justify-center w-[220px] md:w-[450px] md:h-[50vh] mt-[40px] min-h-[]" aria-hidden>
26+
<div className="flex items-center justify-center w-[220px] md:w-[450px] md:h-[40vh] mt-[40px] min-h-[]" aria-hidden>
2727
{illustration}
2828
</div>
2929
<div

package-lock.json

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/index.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,34 @@ import SvgUxOriented from "../components/SvgUxOriented";
1010

1111
export default function Home() {
1212
return (
13-
<div className="h-full w-full">
13+
<>
1414
<Head>
1515
<title>Nicholas Peretti</title>
16-
<meta name="description" content="Nicholas Peretti, frontend engineer" />
16+
<meta
17+
name="description"
18+
content="Nicholas Peretti, frontend engineer"
19+
/>
1720
<link rel="icon" href="/favicon.ico" />
1821
<link rel="apple-touch-icon" sizes="180x180" href="/favicon.ico" />
1922
<meta name="viewport" content="width=device-width, initial-scale=1" />
2023
</Head>
21-
<div className="snap-y snap-mandatory w-full h-screen overflow-y-scroll">
24+
<div className="snap-y snap-mandatory w-full h-full fixed overflow-y-scroll">
2225
<header className="flex flex-col w-full justify-between items-center h-screen overflow-x-hidden snap-start">
2326
<div className="flex flex-col mt-[150px]">
2427
<h1 className="text-[40px] w-fit font-bold bg-gradient-animation mb-[-15px] md:text-[60px] xl:text-[100px]">
2528
Nicholas Peretti
2629
</h1>
2730
<p className="text-[18px] md:text-[30px] xl:text-[50px] font-extralight">
28-
Frontend engineer<span className="animate-blink" aria-hidden>_</span>
31+
Frontend engineer
32+
<span className="animate-blink" aria-hidden>
33+
_
34+
</span>
2935
</p>
3036
</div>
31-
<SvgArrowDown className="mb-[150px] w-[50px] animate-bounce" aria-hidden />
37+
<SvgArrowDown
38+
className="mb-[150px] w-[50px] animate-bounce"
39+
aria-hidden
40+
/>
3241
</header>
3342
<main>
3443
<Section
@@ -136,6 +145,6 @@ export default function Home() {
136145
</Section>
137146
</main>
138147
</div>
139-
</div>
148+
</>
140149
);
141150
}

0 commit comments

Comments
 (0)