-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
248 additions
and
102 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/app/pages/Designathons/Designathon24/components/Splash/Splash.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { memo, useEffect, useRef } from "react"; | ||
import { ReactComponent as SplashLogo } from "./logo.svg"; | ||
import cn from "./Splash.module.scss"; | ||
import anime from "animejs"; | ||
|
||
const Splash = memo(() => { | ||
const logoRef = useRef(null); | ||
useEffect(() => { | ||
console.log(logoRef.current.children[0]); | ||
console.dir(logoRef.current.children[0]); | ||
|
||
anime({ | ||
targets: "path.word", | ||
strokeDashoffset: [anime.setDashoffset, 0], | ||
easing: "easeInOutSine", | ||
duration: 2000, | ||
delay: function (el, i) { | ||
return i * 300; | ||
}, | ||
}); | ||
}, []); | ||
|
||
return ( | ||
<div className={cn.container}> | ||
<SplashLogo ref={logoRef} className={cn.logo} /> | ||
</div> | ||
); | ||
}); | ||
|
||
export { Splash }; |
40 changes: 40 additions & 0 deletions
40
src/app/pages/Designathons/Designathon24/components/Splash/Splash.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.container { | ||
background-color: #fff5e0; | ||
height: 100%; | ||
width: 100%; | ||
position: absolute; | ||
display: grid; | ||
place-content: center; | ||
|
||
.logo { | ||
max-width: 50vw; | ||
margin: 0 auto; | ||
|
||
path { | ||
stroke-width: 5; | ||
.word { | ||
stroke-dashoffset: 10px; | ||
stroke-width: 5; | ||
stroke-dasharray: 1500; | ||
opacity: 0; | ||
|
||
@for $i from 1 through 10 { | ||
&:nth-child(#{$i}n) { | ||
animation: fadeIn forwards 1s #{$i * 350}ms ease-in; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@keyframes fadeIn { | ||
from { | ||
opacity: 0; | ||
} | ||
|
||
to { | ||
opacity: 1; | ||
} | ||
|
||
} |
25 changes: 0 additions & 25 deletions
25
src/app/pages/Designathons/Designathon24/components/Splash/index.jsx
This file was deleted.
Oops, something went wrong.
206 changes: 148 additions & 58 deletions
206
src/app/pages/Designathons/Designathon24/components/Splash/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.