saahildcom/src/components/main/index.tsx

36 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-06-12 02:37:31 +00:00
import './avatar.css'
2024-06-16 04:57:13 +00:00
import avatar from '../../assets/avatar.png'
2024-06-12 02:37:31 +00:00
import ScrollAnimation from 'react-animate-on-scroll'
import Tilt from 'react-parallax-tilt'
2024-06-16 04:57:13 +00:00
import Typewriter from './type'
import { useEffect, useRef } from 'react'
2024-06-12 02:37:31 +00:00
// import 'animate.css/animate.css'
export default function Main() {
2024-06-16 04:57:13 +00:00
const mainEl = useRef(null)
// useEffect(() => {
// if (document.activeElement !== mainEl.current) {
// // do something
// mainEl.current.className
// }
// })
2024-06-12 02:37:31 +00:00
return (
2024-06-16 04:57:13 +00:00
<div className={'hero min-h-screen'} ref={mainEl}>
<div style={{ animation: "fadeInDown", animationDuration: "1.5s", zIndex: 5 }} className={ 'animate__animated animate__fadeIn' } >
<div className='hero-content flex-col lg:flex-row max-w-xl' style={{ zIndex: 5 }}>
2024-06-12 02:37:31 +00:00
<div className='avatar'>
<Tilt glareEnable glareColor={'#f9e2af'}>
2024-06-16 04:57:13 +00:00
<img src={avatar} />
2024-06-12 02:37:31 +00:00
</Tilt>
</div>
<div style={{ zIndex: 9999 }}>
2024-06-16 04:57:13 +00:00
<h1 className='text-5xl font-bold'><span className={'wave'}>👋🏾 </span> Hi im <span className='text-highlight'>Saahil</span></h1>
<p>Welcome to my site.</p>
<Typewriter />
2024-06-12 02:37:31 +00:00
</div>
</div>
</div>
</div>
)
}