@@ -3,12 +3,15 @@ import { ProjectCard } from "@/components/ProjectCard";
33import projectData from "@/data/projects/data.json" ;
44import labData from "@/data/labs/data.json" ;
55import { IconBrandX , IconBrandGithub , IconMail } from "@tabler/icons-react" ;
6+ import { Gradient } from "@/lib/Gradient.js" ;
7+ import { useEffect } from "react" ;
68
79const Layout : React . FC = ( ) => {
810 return (
911 < >
1012 < main className = "flex flex-col gap-8 py-10 px-5 w-full max-w-screen-md mx-auto" >
11- < Bg />
13+ { /* <Bg /> */ }
14+ < GradientBg />
1215 < MineInfos />
1316 < Projects />
1417 < Lab />
@@ -17,6 +20,25 @@ const Layout: React.FC = () => {
1720 )
1821} ;
1922
23+ const GradientBg = ( ) => {
24+ useEffect ( ( ) => {
25+ const gradient = new Gradient ( ) ;
26+ gradient . initGradient ( '#gradient-canvas' ) ;
27+ } , [ ] ) ;
28+ const style : any = {
29+ "--gradient-color-1" : "#043D5D" ,
30+ "--gradient-color-2" : "#032E46" ,
31+ "--gradient-color-3" : "#23B684" ,
32+ "--gradient-color-4" : "#0F595E" ,
33+ } ;
34+ return (
35+ < div className = "fixed w-full h-2/3 top-0 left-0 opacity-40 pointer-events-none" >
36+ < span className = "absolute w-full h-full top-0 left-0 bg-gradient-to-b from-transparent to-[#09090b]" > </ span >
37+ < canvas style = { style } className = "w-full h-full" id = "gradient-canvas" > </ canvas >
38+ </ div >
39+ )
40+ }
41+
2042const Bg = ( ) => {
2143 return (
2244 < div className = "fixed w-[60vw] h-[60vw] left-1/4 -top-10 blur-2xl overflow-hidden" >
@@ -28,7 +50,7 @@ const Bg = () => {
2850
2951const MineInfos = ( ) => {
3052 return (
31- < div className = "relative flex flex-col gap-8" >
53+ < div className = "animation-fadeIn !animation-delay-100 relative flex flex-col gap-8" >
3254 < a target = "_blank" href = "https://github.com/oopserian" className = "border border-zinc-50 block w-12 h-12 rounded-full overflow-hidden bg-gradient-to-t from-zinc-50 to-green-50" >
3355 < img className = "w-full h-full object-cover" src = "/logo.webp" />
3456 </ a >
@@ -54,7 +76,7 @@ const MineInfos = () => {
5476const Projects = ( ) => {
5577 const projectDataList = Object . values ( projectData ) ;
5678 return (
57- < div className = "flex flex-col gap-2.5" >
79+ < div className = "animation-fadeIn !animation-delay-200 flex flex-col gap-2.5" >
5880 < h2 className = "text-xl font-bold" > Projects</ h2 >
5981 < div className = "grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-2.5" >
6082 {
@@ -70,7 +92,7 @@ const Projects = () => {
7092const Lab = ( ) => {
7193 const labDataList = Object . values ( labData ) ;
7294 return (
73- < div className = "flex flex-col gap-2.5" >
95+ < div className = "animation-fadeIn !animation-delay-300 flex flex-col gap-2.5" >
7496 < h2 className = "text-xl font-bold" > Lab</ h2 >
7597 < div className = "grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-2.5" >
7698 {
0 commit comments