Skip to content

Commit

Permalink
added animation to logo
Browse files Browse the repository at this point in the history
  • Loading branch information
ryqndev committed Apr 1, 2024
1 parent 3af1b66 commit 7346452
Show file tree
Hide file tree
Showing 8 changed files with 248 additions and 102 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@testing-library/user-event": "^12.8.3",
"animejs": "^3.2.2",
"clsx": "^1.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
38 changes: 22 additions & 16 deletions src/app/pages/Designathons/Designathon23/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ const Designathon23 = () => (
<Splash />
</div>
<div className={cn.title}>
<Icon className={cn.icon} src="designathon-white.svg" w="96" h="96" />
<Icon
className={cn.icon}
src="designathon-white.svg"
w="96"
h="96"
/>
<Text size="XXXL" className="bold">
You Belong Here
</Text>
Expand All @@ -47,25 +52,26 @@ const Designathon23 = () => (
<Section>
<h1>About</h1>
<p>
Design-a-thon is a 3 day long hybrid event where you or a team design
a product focused on the theme: community and inclusivity. It takes
place on February 24, starting at 5:30 pm and ends February 26, 8:00
pm PST.
Design-a-thon is a 3 day long hybrid event where you or a
team design a product focused on the theme: community and
inclusivity. It takes place on February 24, starting at 5:30
pm and ends February 26, 8:00 pm PST.
</p>
<p>
Design at UCI is the premier student-run organization at UCI for
anything graphic design, UI/UX design, product design, and more.
Started in 2016, we foster a special community for all digital
designers to connect, learn, and innovate.
Design at UCI is the premier student-run organization at UCI
for anything graphic design, UI/UX design, product design,
and more. Started in 2016, we foster a special community for
all digital designers to connect, learn, and innovate.
</p>
<p>
Design at UCI’s designathon is the largest collegiate designathon in
Orange County. Each year, we bring together hundreds of student
designers nationwide to define, develop, and pitch a product built
from scratch. We hope that this experience can help you acquire and
grow both your soft and hard skills in empathizing with your users,
defining a set of goals and needs, developing your product, and
improving your confidence and creativity as a human-centric designer.
Design at UCI’s designathon is the largest collegiate
designathon in Orange County. Each year, we bring together
hundreds of student designers nationwide to define, develop,
and pitch a product built from scratch. We hope that this
experience can help you acquire and grow both your soft and
hard skills in empathizing with your users, defining a set
of goals and needs, developing your product, and improving
your confidence and creativity as a human-centric designer.
</p>
</Section>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/app/pages/Designathons/Designathon24/Designathon24.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ import {
Speakers,
} from "./components";
import Schedule from "./components/Schedule";
import { Splash } from "./components/Splash";
import { Splash } from "./components/Splash/Splash";

const Designathon24 = () => (
<main className={cn.container}>
<div className={cn.hero}>
{/* <div style={{ height: "100%", width: "100%" }}> */}
<Splash />
{/* </div> */}
<div className={cn.title}>
{/* <Icon className={cn.icon} src="designathon-white.svg" w="96" h="96" /> */}
{/* <Text
Expand Down
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 };
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;
}

}

This file was deleted.

206 changes: 148 additions & 58 deletions 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.

0 comments on commit 7346452

Please sign in to comment.