@@ -7,7 +7,8 @@ import { useNavigate, useLocation } from "react-router-dom";
7
7
import Stack from "@mui/material/Stack" ;
8
8
import { Button } from "@mui/material" ;
9
9
import propTypes from "prop-types" ;
10
- import useScrollFadeIn from "../../hooks/useScrollFadeIn" ;
10
+ import useZoomIn from "../../hooks/useZoomIn" ;
11
+ // import useScrollFadeIn from "../../hooks/useScrollFadeIn";
11
12
import MAIN from "../../assets/images/mainImg.svg" ;
12
13
13
14
const CLIENT_ID = process . env . REACT_APP_CLIENT_ID ;
@@ -17,6 +18,7 @@ const handleLogin = () => {
17
18
window . location . href = githubURL ;
18
19
} ;
19
20
export const Welcome = ( ) => {
21
+ const zoominItem = useZoomIn ( 1.2 , 0 ) ;
20
22
const location = useLocation ( ) ;
21
23
22
24
const preventGoBack = ( event ) => {
@@ -33,7 +35,6 @@ export const Welcome = () => {
33
35
window . removeEventListener ( "popstate" , preventGoBack ) ;
34
36
} ;
35
37
} , [ ] ) ;
36
- const animatedItem = useScrollFadeIn ( ) ;
37
38
const Logined = useRecoilValue ( isLogin ) ;
38
39
const navigate = new useNavigate ( ) ;
39
40
return (
@@ -72,8 +73,8 @@ export const Welcome = () => {
72
73
</ LearnmoreBtn >
73
74
</ Stack >
74
75
</ InfoDiv >
75
- < ImgDiv >
76
- < MainImg { ... useScrollFadeIn ( "left" , 1.7 , 0 ) } src = { MAIN } />
76
+ < ImgDiv { ... zoominItem } >
77
+ < MainImg src = { MAIN } />
77
78
</ ImgDiv >
78
79
</ StWelcome >
79
80
) ;
@@ -91,45 +92,57 @@ const StWelcome = styled.div`
91
92
flex-direction: row;
92
93
width: 100%;
93
94
height: 80vh;
94
- background: ${ COLOR . MAIN_WHITE } ;
95
+ background: linear-gradient(
96
+ to bottom,
97
+ ${ COLOR . MAIN_HOVER } ,
98
+ ${ COLOR . MAIN_BACKGROUND }
99
+ );
95
100
text-align: center;
96
- border-bottom: 0.5px solid ${ COLOR . MAIN_HOVER } ;
97
101
` ;
98
102
99
103
const fadeIn = keyframes `
100
104
0% {
101
105
opacity: 0;
102
- transform: translate3d(0, 10 %, 0);
106
+ transform: translate3d(0, 15 %, 0);
103
107
} to {
104
108
opacity: 1;
105
109
transform: translateZ(0);
106
110
}
107
111
` ;
112
+
113
+ const updown = keyframes `
114
+ 0% {
115
+ transform: translateY(1rem);
116
+ }
117
+ 100% {
118
+ transform: translateY(-1rem);
119
+ }
120
+ ` ;
108
121
const InfoDiv = styled . div `
109
122
display: flex;
110
123
justify-content: center;
111
124
align-items: start;
112
125
flex-direction: column;
113
126
width: 50%;
114
127
height: 80vh;
115
- padding-left: 30rem ;
128
+ padding-left: 20rem ;
116
129
text-align: center;
117
- animation: ${ fadeIn } 1.7s;
118
- /* border: 1px solid pink; */
130
+ animation: ${ fadeIn } 1.5s;
119
131
` ;
120
132
121
133
const ImgDiv = styled . div `
122
134
display: flex;
123
135
justify-content: center;
124
136
align-items: center;
125
- width: 50 %;
126
- height: 100 %;
137
+ width: 40 %;
138
+ height: 90 %;
127
139
` ;
128
140
129
141
const MainImg = styled . img `
130
- width: 80%;
131
- height: 80%;
132
- margin-right: 15rem;
142
+ width: 90%;
143
+ height: 90%;
144
+ margin-right: 23rem;
145
+ animation: ${ updown } 2s ease-in-out infinite alternate-reverse;
133
146
/* border: 1px solid green; */
134
147
` ;
135
148
export const Title = styled . h1 `
0 commit comments