@@ -4,28 +4,66 @@ import SocialIcons from './SocialIcons.astro'
4
4
5
5
import { HomeFr } from ' @/data/HomeFr'
6
6
7
+ import {AnimatedTextComponent } from ' @/components/animation/AnimatedTextComponent'
8
+
7
9
const { fullName, title, institute, profilePicture } = Astro .props
8
10
9
11
---
10
12
11
13
<div class =" flex-1" >
12
- <h1 class =" text-5xl font-bold mb-6" >
13
- <span class =" text-primary" >{ fullName } </span >
14
+ <h1 class =" text-5xl font-bold mb-6 opacity-0 animate-fade-in-up" >
15
+ <span class =" text-primary" >
16
+ <AnimatedTextComponent text = { fullName } timer =1000 client:visible ></AnimatedTextComponent >
17
+ </span >
14
18
</h1 >
15
- <p class =" text-2xl text-gray-500 mb-4" >
16
- { title } { institute ? ` , ${ institute } ` : ' ' }
19
+ <p class =" text-2xl text-gray-500 mb-4 opacity-0 animate-fade-in-up delay-200 " >
20
+ < AnimatedTextComponent text = { title } timer = 2000 client:visible ></ AnimatedTextComponent >
17
21
</p >
18
22
<p class =" text-lg text-gray-700 mb-6" >
19
- { HomeFr .presentation }
23
+ < AnimatedTextComponent timer = 100 text = { HomeFr .presentation } client:visible ></ AnimatedTextComponent >
20
24
</p >
21
- <div class =" flex gap-4" >
25
+
26
+ <div class =" flex gap-4 opacity-0 animate-fade-in-up delay-500" >
22
27
<SocialIcons />
23
28
</div >
24
29
</div >
25
30
<div class =" size-72 hidden lg:block" >
26
31
<Image
27
32
src ={ profilePicture }
28
33
alt ={ fullName }
29
- class =" w-full h-full rounded-full border-4 border-primary shadow-lg"
34
+ class =" w-full h-full rounded-full border-4 border-primary shadow-lg animate-bounce-in "
30
35
/>
31
36
</div >
37
+
38
+ <style >
39
+ @keyframes fade-in-up {
40
+ from {
41
+ opacity: 0;
42
+ transform: translateY(20px);
43
+ }
44
+ to {
45
+ opacity: 1;
46
+ transform: translateY(0);
47
+ }
48
+ }
49
+ @keyframes bounce-in {
50
+ 0% {
51
+ opacity: 0;
52
+ transform: scale(0.8);
53
+ }
54
+ 60% {
55
+ opacity: 1;
56
+ transform: scale(1.1);
57
+ }
58
+ 100% {
59
+ transform: scale(1);
60
+ }
61
+ }
62
+
63
+ .animate-fade-in-up {
64
+ animation: fade-in-up 0.8s ease-out forwards;
65
+ }
66
+ .animate-bounce-in {
67
+ animation: bounce-in 1s ease-out forwards;
68
+ }
69
+ </style >
0 commit comments