Skip to content

Commit d9e2200

Browse files
committed
home page more optimized
1 parent c6f7055 commit d9e2200

File tree

3 files changed

+54
-52
lines changed

3 files changed

+54
-52
lines changed

app/page.tsx

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
import { memo } from 'react';
2-
import Image from 'next/image';
3-
import Hero from '@/components/home/Hero';
1+
import { TypewriterEffect } from '@/components/ui/typewriter-effect';
42
import About from '@/components/home/About';
3+
import Name from '@/components/home/Name';
4+
import Image from 'next/image';
5+
import { memo } from 'react';
56

67
const page = () => {
8+
const words = [
9+
{ text: "I" },
10+
{ text: "Build" },
11+
{ text: "Innovative", },
12+
{ text: "Digital", },
13+
{ text: "Solutions", },
14+
{ text: "With", },
15+
{ text: "Precision" },
16+
{ text: "And" },
17+
{ text: "Passion" },
18+
{ text: "!" },
19+
];
720
return (
821
<main className='flex flex-col pt-12'>
22+
{/* Profile image for Seo */}
923
<div className='relative'>
1024
<Image
1125
src="/assets/profile-image.jpg"
@@ -15,7 +29,24 @@ const page = () => {
1529
loading='lazy'
1630
/>
1731
</div>
18-
<Hero />
32+
33+
{/* <Hero /> */}
34+
<section className="w-full mx-auto sm:px-16 px-6 pb-10">
35+
<div className={`pb-7 mx-auto flex flex-row items-start gap-5`}>
36+
<div className="flex flex-col justify-center items-center mt-5 ml-5">
37+
</div>
38+
<div>
39+
<header>
40+
<Name />
41+
</header>
42+
<article>
43+
<TypewriterEffect words={words} />
44+
</article>
45+
</div>
46+
</div>
47+
</section>
48+
49+
{/* About section */}
1950
<About />
2051
</main>
2152
);

components/home/Hero.tsx

Lines changed: 0 additions & 48 deletions
This file was deleted.

components/home/Name.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use client';
2+
import { profile } from '@/constants';
3+
import { containerVariants } from '@/style';
4+
import { motion } from 'framer-motion';
5+
6+
const Name = () => {
7+
return (
8+
<motion.h1
9+
initial="hidden"
10+
animate="visible"
11+
variants={containerVariants}
12+
className={`font-black lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px]`}
13+
>
14+
I&apos;m <span className="text-violet-600">{profile.name}</span>
15+
</motion.h1>
16+
);
17+
};
18+
19+
export default Name;

0 commit comments

Comments
 (0)