File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /* GPU-accelerated gradient animation */
1+ .animate-gradient-x {
2+ background : linear-gradient (
3+ 90deg ,
4+ rgba (42 , 123 , 155 , 1 ),
5+ rgba (87 , 199 , 133 , 1 ),
6+ rgba (237 , 221 , 83 , 1 )
7+ );
8+ background-size : 300% 300% ;
9+ animation : gradient-x 10s ease infinite;
10+ }
11+
212@keyframes gradient-x {
313 0% {
414 background-position : 0% 50% ;
1020 background-position : 0% 50% ;
1121 }
1222}
13-
14- .animate-gradient-x {
15- background-size : 200% 200% ;
16- animation : gradient-x 15s ease infinite;
17- }
Original file line number Diff line number Diff line change 33import { useEffect , useRef , useState } from "react" ;
44import { motion } from "framer-motion" ;
55import { Poppins , Lato , Great_Vibes } from "next/font/google" ;
6+ import "./Hero.css" ;
67
78const nameArr = [
89 "Avinash" ,
@@ -65,7 +66,7 @@ export default function Hero() {
6566 < section className = "relative h-screen w-screen m-0 p-0" >
6667 { /* GPU-friendly animated gradient background */ }
6768 < motion . div
68- className = "absolute top-0 left-0 w-full h-full bg-gradient-to-r from-(--primary) via-(--background) to-(--secondary) animate-gradient-x"
69+ className = "absolute top-0 left-0 w-full h-full animate-gradient-x"
6970 style = { {
7071 opacity,
7172 transform : `translateY(${ translateY } px)` ,
@@ -91,7 +92,10 @@ export default function Hero() {
9192 variants = { headingVariants }
9293 initial = "hidden"
9394 animate = "visible"
94- className = "inline-block mr-2" >
95+ className = "inline-block mr-2"
96+ style = { {
97+ WebkitTextStroke : "1px black" ,
98+ } } >
9599 { word }
96100 </ motion . span >
97101 ) ) }
You can’t perform that action at this time.
0 commit comments