-
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.
Updated hero animation and style (#56)
* Updated animation and styling for hero * Added priority loading for svg * Made animation faster * Updated desktop hero with animation * Fixing linting * Adjusting mobile view
- Loading branch information
Showing
10 changed files
with
15,669 additions
and
71 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,29 @@ | ||
'use client'; | ||
|
||
import { useState, useEffect } from 'react'; | ||
import Typewriter from '../typewriter'; | ||
import styles from './style.module.css'; | ||
|
||
const TypeAnimation: React.FC = () => { | ||
const words = ['build', 'break', 'innovate']; | ||
const [index, setIndex] = useState(0); | ||
|
||
const currentWord = words[index]; | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
setIndex(prevIndex => (prevIndex + 1) % words.length); | ||
}, 2400); | ||
return () => clearInterval(interval); | ||
}, []); | ||
|
||
return ( | ||
<div className={styles.word_container}> | ||
{currentWord === 'build' && <Typewriter text={currentWord} />} | ||
{currentWord === 'break' && <span className={styles.break}>{currentWord}</span>} | ||
{currentWord === 'innovate' && <span className={styles.innovate}>{currentWord}</span>} | ||
</div> | ||
); | ||
}; | ||
|
||
export default TypeAnimation; |
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,64 @@ | ||
.word_container { | ||
background-color: var(--docs-dark-bg); | ||
width: 60%; | ||
padding: 0.5rem; | ||
border-radius: 10px; | ||
font-size: 3em; | ||
font-weight: 200; | ||
} | ||
|
||
/* Breaking apart animation for "break" */ | ||
.break { | ||
animation: breakApart 2.5s ease-in-out forwards; | ||
} | ||
|
||
@keyframes breakApart { | ||
0% { | ||
letter-spacing: 0; | ||
transform: rotate(0deg); | ||
opacity: 1; | ||
} | ||
50% { | ||
letter-spacing: 0.2rem; | ||
transform: rotate(-5deg); | ||
opacity: 1; | ||
} | ||
100% { | ||
letter-spacing: 0.5rem; | ||
transform: rotate(-10deg) translateY(-50%); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
/* Light up animation for "innovate" */ | ||
.innovate { | ||
animation: fadeIn 1s ease-in-out forwards; | ||
} | ||
|
||
.innovate::after { | ||
content: '💡'; | ||
margin-right: 0.5rem; | ||
opacity: 0; | ||
animation: lightUp 1.25s ease-in-out infinite; | ||
} | ||
|
||
@keyframes fadeIn { | ||
0% { | ||
opacity: 0; | ||
} | ||
100% { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
@keyframes lightUp { | ||
0% { | ||
opacity: 0; | ||
} | ||
50% { | ||
opacity: 1; | ||
} | ||
100% { | ||
opacity: 0; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
.landing_caption { | ||
position: absolute; | ||
top: 40%; | ||
width: 100%; | ||
font-size: 2em; | ||
.landing_caption::after { | ||
content: '|'; | ||
animation: blink 0.75s step-start infinite; | ||
} | ||
|
||
@keyframes blink { | ||
50% { | ||
opacity: 0; | ||
} | ||
} |
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