1- import { motion , useScroll , useTransform } from "framer-motion" ;
1+ import { motion } from "framer-motion" ;
22import { ArrowRight , Play } from "lucide-react" ;
33import { useRef } from "react" ;
44import { Link } from "react-router-dom" ;
55
6- const STATIC_STARS = Array . from ( { length : 80 } ) . map ( ( _ , i ) => {
7- const random = ( min : number , max : number ) => Math . random ( ) * ( max - min ) + min ;
8- return {
9- id : i ,
10- top : `${ random ( 0 , 100 ) } %` ,
11- left : `${ random ( 0 , 100 ) } %` ,
12- size : random ( 1 , 3 ) ,
13- delay : random ( 0 , 5 ) ,
14- duration : random ( 2 , 6 ) ,
15- } ;
16- } ) ;
17-
18- function StarsBackground ( ) {
19- return (
20- < div className = "absolute inset-0 overflow-hidden pointer-events-none" >
21- { STATIC_STARS . map ( ( star ) => (
22- < motion . div
23- key = { star . id }
24- className = "absolute rounded-full bg-blue-900/30 dark:bg-white"
25- style = { {
26- top : star . top ,
27- left : star . left ,
28- width : star . size ,
29- height : star . size ,
30- } }
31- animate = { {
32- opacity : [ 0.2 , 1 , 0.2 ] ,
33- scale : [ 1 , 1.2 , 1 ] ,
34- } }
35- transition = { {
36- duration : star . duration ,
37- repeat : Infinity ,
38- delay : star . delay ,
39- ease : "easeInOut" ,
40- } }
41- />
42- ) ) }
43- </ div >
44- ) ;
45- }
46-
476export function HeroSection ( ) {
487 const ref = useRef ( null ) ;
49- const { scrollYProgress } = useScroll ( {
50- target : ref ,
51- offset : [ "start start" , "end start" ] ,
52- } ) ;
53-
54- const backgroundY = useTransform ( scrollYProgress , [ 0 , 1 ] , [ "0%" , "50%" ] ) ;
55- const textY = useTransform ( scrollYProgress , [ 0 , 1 ] , [ "0%" , "80%" ] ) ;
568
579 return (
58- < section ref = { ref } className = "relative min-h-[90vh] flex flex-col items-center justify-start pt-16 md:pt-24 pb-0 overflow-hidden bg-transparent font-sans" >
10+ < section
11+ ref = { ref }
12+ className = "relative min-h-[90vh] flex flex-col items-center justify-start pt-16 md:pt-24 pb-0 overflow-hidden bg-transparent font-sans"
13+ >
5914 < motion . div
60- style = { { y : backgroundY } }
6115 className = "absolute inset-0 pointer-events-none w-full h-[150%]
6216 bg-[linear-gradient(to_right,rgba(0,0,0,0.03)_1px,transparent_1px),linear-gradient(to_bottom,rgba(0,0,0,0.03)_1px,transparent_1px)]
6317 dark:bg-[linear-gradient(to_right,rgba(255,255,255,0.02)_1px,transparent_1px),linear-gradient(to_bottom,rgba(255,255,255,0.02)_1px,transparent_1px)]
6418 bg-[size:60px_60px]"
65- >
66- < StarsBackground />
67- </ motion . div >
19+ > </ motion . div >
6820 < div className = "absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[600px] bg-gradient-to-br from-blue-500/10 via-purple-500/5 to-transparent blur-[120px] rounded-full pointer-events-none" />
6921
70- < motion . div style = { { y : textY } } className = "relative z-10 max-w-5xl mx-auto px-6 text-center" >
22+ < motion . div className = "relative z-10 max-w-5xl mx-auto px-6 text-center" >
7123 < motion . h1
7224 initial = { { opacity : 0 , y : 30 } }
7325 animate = { { opacity : 1 , y : 0 } }
@@ -88,8 +40,11 @@ export function HeroSection() {
8840 className = "text-lg md:text-xl text-gray-500 dark:text-gray-400 max-w-2xl mx-auto mb-10 leading-relaxed font-medium"
8941 >
9042 O < span className = "text-blue-500 font-light" > <</ span >
91- Cand< span className = "text-amber-500" > !</ span > Date< span className = "text-purple-500" > !</ span >
92- < span className = "text-blue-500 font-light" > ></ span > varre dezenas de plataformas automaticamente, transforma candidatos em profissionais preparados e entrega as melhores oportunidades filtradas para você.
43+ Cand< span className = "text-amber-500" > !</ span > Date
44+ < span className = "text-purple-500" > !</ span >
45+ < span className = "text-blue-500 font-light" > ></ span > varre dezenas
46+ de plataformas automaticamente, transforma candidatos em profissionais
47+ preparados e entrega as melhores oportunidades filtradas para você.
9348 </ motion . p >
9449
9550 < motion . div
@@ -115,9 +70,6 @@ export function HeroSection() {
11570 </ a >
11671 </ motion . div >
11772 </ motion . div >
118-
119-
120-
12173 </ section >
12274 ) ;
12375}
0 commit comments