@@ -93,7 +93,7 @@ const BlogBox = () => {
93
93
className = "w-4/5 mt-[5rem] mb-[15rem] bg-[#a9a9a9] relative flex flex-wrap justify-center"
94
94
>
95
95
< div
96
- className = 'absolute top-[-4.5rem] md:top-[-6rem] left-2 text-[70px] md:text-[100px] font-bold z-50 '
96
+ className = 'absolute top-[-4.5rem] md:top-[-6rem] left-2 text-[70px] md:text-[100px] font-bold z-30 '
97
97
style = { {
98
98
fontFamily :'KGPerfectPenmanship'
99
99
} }
@@ -150,7 +150,7 @@ const ProjectBox = () => {
150
150
className = "w-4/5 my-[3rem] bg-[#a9a9a9] relative flex flex-wrap mb-[15rem]"
151
151
>
152
152
< div
153
- className = 'absolute top-[-5rem] left-2 text-[80px] font-bold md:text-[100px] md:top-[-6rem] z-50 '
153
+ className = 'absolute top-[-5rem] left-2 text-[80px] font-bold md:text-[100px] md:top-[-6rem] z-30 '
154
154
style = { {
155
155
fontFamily :'KGPerfectPenmanship'
156
156
} }
@@ -172,7 +172,7 @@ const ProjectBox = () => {
172
172
< div className = 'animate-tasklist' > T</ div >
173
173
</ div >
174
174
< div className = 'w-3/5 text-[#000] tracking-[-0.3px] transition-all group-hover:mt-2 text-center mb-[40px]' >
175
- Can I complete all ddl's while suffering from amnesia.A TODO site.
175
+ Can I complete all deadline while suffering from amnesia.A TODO site.
176
176
</ div >
177
177
< div className = 'absolute bg-black w-[80px] md:w-[120px] h-[40px] md:h-[60px] right-[10px] md:right-[40px] top-[-60px] transition-all ease-in-out duration-200 text-[#fff] flex justify-center items-center group-hover:top-0' >
178
178
< div className = 'mb-[20px] opacity-0 transition-all duration-200 ease-in group-hover:opacity-100 group-hover:mb-0 text-[12px] tracking-[-0.3px]' > view project</ div >
@@ -223,9 +223,89 @@ const BottomWave = () => {
223
223
) ;
224
224
} ;
225
225
226
+ const GithubIcon = ( { onClick, value } : { onClick : ( ) => void , value : boolean } ) => {
227
+ const [ firstTime , setFirstTime ] = useState ( false )
228
+ useEffect ( ( ) => {
229
+ if ( value ) setFirstTime ( true )
230
+ } , [ value ] )
231
+ return (
232
+ < div
233
+ className = 'absolute top-[1vw] right-[2vw] cursor-pointer z-50 flex justify-center items-center'
234
+ onClick = { onClick }
235
+ style = { { position :value ?'fixed' :'absolute' } }
236
+ >
237
+ < div
238
+ className = { `${ ! firstTime ?'animate-changeIcon1' :( value ?'animate-changeIcon2' :'animate-changeIcon3' ) } w-[64px] h-[64px] transition-all` }
239
+ key = { value ?'ani1' :'ani2' }
240
+ > </ div >
241
+ </ div >
242
+ )
243
+ }
244
+
245
+ const HoverLever = ( { value, styleArr } : { value : Boolean , styleArr : Array } ) => {
246
+ return (
247
+ < div
248
+ className = { `fixed bg-[#1f4954] z-40 animate-sayhi ${
249
+ value ? 'animate-sayhi' : 'animate-saybye'
250
+ } `}
251
+ style = { {
252
+ top : `${ styleArr [ 1 ] - styleArr [ 2 ] / 80 } px` ,
253
+ left : `${ styleArr [ 0 ] - styleArr [ 2 ] / 80 } px` ,
254
+ width : `${ styleArr [ 2 ] / 40 } px` ,
255
+ height : `${ styleArr [ 2 ] / 40 } px` ,
256
+ } }
257
+ key = { value ? 'sayhi' : 'saybye' }
258
+ > </ div >
259
+ )
260
+ }
261
+
262
+ const HoverText = ( { value} :{ value :Boolean } ) => {
263
+ const [ firstTime , setFirstTime ] = useState ( false )
264
+ useEffect ( ( ) => {
265
+ if ( value ) setFirstTime ( true )
266
+ } , [ value ] )
267
+ return (
268
+ < div
269
+ className = 'absolute w-screen h-screen top-0 left-0 z-50 flex justify-center items-center'
270
+ >
271
+ < div
272
+ className = { `${ ! firstTime ?'notext' :value ?'animate-havetext' :'animate-notext' } ` }
273
+ key = { value ?'text' :'no' }
274
+ >
275
+ < div className = 'flex justify-center items-center relative w-[200px] h-[80px] rounded-[1000px] bg-[#285d6d]' >
276
+ < a href = "https://github.com/TaskManagerOL" target = '_blank' >
277
+ < div className = 'animate-changeIcon1 w-[64px] h-[64px] transition-all' > </ div >
278
+ </ a >
279
+ < a href = "https://t.me/TaskManagerOL" target = '_blank' >
280
+ < div className = 'telegram' > </ div >
281
+ </ a >
282
+ </ div >
283
+ </ div >
284
+ </ div >
285
+ )
286
+ }
287
+
226
288
export default function Home ( ) {
289
+ const [ hoverValue , setHoverValue ] = useState ( false ) ;
290
+ const [ mouseclick , setMouseclick ] = useState ( [ '0' , '0' , '0' ] )
291
+ const handleIconClick = ( e : MouseEvent ) => {
292
+ setHoverValue ( ! hoverValue ) ;
293
+ const mouseX = e . clientX ;
294
+ const mouseY = e . clientY ;
295
+ const length = Math . max ( window . innerWidth , window . innerHeight )
296
+ setMouseclick ( [
297
+ mouseX ,
298
+ mouseY ,
299
+ length ,
300
+ ] )
301
+ } ;
227
302
return (
228
- < div className = "w-full h-auto flex justify-center items-center bg-[#fefbf5] flex-col overflow-hidden relative" >
303
+ < div
304
+ className = "w-full h-auto flex justify-center items-center bg-[#fefbf5] flex-col overflow-hidden relative"
305
+ >
306
+ < HoverLever value = { hoverValue } styleArr = { mouseclick } />
307
+ < HoverText value = { hoverValue } />
308
+ < GithubIcon onClick = { handleIconClick } value = { hoverValue } />
229
309
< IndexBox />
230
310
< BlogBox />
231
311
< ProjectBox />
0 commit comments