Skip to content

Commit

Permalink
Addded motion to Credits
Browse files Browse the repository at this point in the history
  • Loading branch information
Th3Wall committed Jun 7, 2021
1 parent e3b8c2e commit 8affb60
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 18 deletions.
22 changes: 14 additions & 8 deletions src/components/Credits/Credits.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import "./credits.scss"
import { motion } from "framer-motion";
import { creditsFadeInUpVariants } from "../../motionUtils";

const Credits = () => {
return (
<footer className='Credits'>
<motion.footer
variants={creditsFadeInUpVariants}
initial='initial'
animate='animate'
exit='exit'
className='Credits'
>
<span>Developed by</span>
<div className='Credits__wrp'>
<a className='Credits__link' href='https://github.com/Th3Wall' target='_blank' rel='noreferrer' > Th3Wall</a>
<a className='Credits__link' href='https://github.com/Th3Wall' target='_blank' rel='noreferrer' >
<img className='Credits__avatar' src='https://avatars.githubusercontent.com/u/25078541?v=4' alt='Credits Avatar' />
</a>
</div>
</footer>
<a className='Credits__linkwrp' href='https://github.com/Th3Wall' target='_blank' rel='noreferrer'>
<span> Th3Wall</span>
<img className='Credits__avatar' src='https://avatars.githubusercontent.com/u/25078541?v=4' alt='Credits Avatar' />
</a>
</motion.footer>
)
}

Expand Down
19 changes: 12 additions & 7 deletions src/components/Credits/credits.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@
align-items: center;
justify-content: center;
text-align: center;
margin: 3vh 0;
margin: 2.5vh 0;
color: #969696;
font-size: 15px;

&__wrp {
display: flex;
align-items: center;
}

&__link {
&__linkwrp {
display: flex;
align-items: center;
color: inherit;
font-weight: bold;
margin-left: 5px;
text-decoration: none;
transition: color 0.4s cubic-bezier(0.6, -0.05, 0.01, 0.99);

&:hover {
color: $white;
}
}

&__avatar {
display: inline-block;
max-width: 40px;
width: 100%;
margin-left: 5px;
}
}
6 changes: 6 additions & 0 deletions src/motionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ export const authPageFadeInVariants = {
exit: { opacity: 0, transition: { duration: .6, ease: defaultEasing }}
};

export const creditsFadeInUpVariants = {
initial: { y: 60, opacity: 0, transition: { duration: .8, ease: defaultEasing } },
animate: { y: 0, opacity: 1, transition: { delay: .8, duration: .8, ease: defaultEasing } },
exit: { y: 60, opacity: 0, transition: { duration: .8, ease: defaultEasing } }
};

export const defaultPageFadeInVariants = {
initial: { opacity: 0, transition: { duration: .6, ease: defaultEasing }, willChange: "opacity, transform" },
animate: { opacity: 1, transition: { duration: .6, ease: defaultEasing }, willChange: "opacity, transform" },
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyList/myList.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "../../scss/mixin";

.MyList {
padding: 2em 4vw;
padding: 2em 4vw 0 4vw;
margin-top: 4em;

&__wrp {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Search/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Search = searchResults => {
<h2 className="Search__title">Search results for: {selectInputValue}</h2>
)}
<motion.div
className="MyList__wrp"
className="Search__wrp"
variants={staggerHalf}
initial="initial"
animate="animate"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Search/search.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "../../scss/mixin";

.Search {
padding: 2em 4vw;
padding: 2em 4vw 0 4vw;
margin-top: 4em;

&__wrp {
Expand Down

0 comments on commit 8affb60

Please sign in to comment.