-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ScrollDown component and styles; update Hero component structure
- Loading branch information
Showing
7 changed files
with
154 additions
and
80 deletions.
There are no files selected for viewing
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,11 @@ | ||
import styles from './styles.module.scss'; | ||
|
||
export default function ScrollDown() { | ||
return ( | ||
<div className={styles.scroll_msg_container}> | ||
<div className={styles.scroll_msg_inner}> | ||
<div className={styles.scroll_msg_wheel}></div> | ||
</div> | ||
</div> | ||
); | ||
} |
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,76 @@ | ||
// Customizable variables | ||
$mouse_color: #ffffff; | ||
$mouse_width: 32px; | ||
$mouse_height: 60px; | ||
$border_width: 2px; | ||
|
||
@mixin keyframes($animationName) { | ||
@-webkit-keyframes #{$animationName} { | ||
@content; | ||
} | ||
@-moz-keyframes #{$animationName} { | ||
@content; | ||
} | ||
@-o-keyframes #{$animationName} { | ||
@content; | ||
} | ||
@keyframes #{$animationName} { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin animation($animations) { | ||
-webkit-animation: $animations; | ||
-moz-animation: $animations; | ||
-o-animation: $animations; | ||
animation: $animations; | ||
} | ||
|
||
$wheel_size: $border_width * 2; | ||
|
||
@include keyframes(mouse-scroll) { | ||
0% { | ||
top: 10%; | ||
opacity: 1; | ||
} | ||
80% { | ||
opacity: 1; | ||
} | ||
100% { | ||
top: 30%; | ||
opacity: 0; | ||
} | ||
} | ||
|
||
.scroll_msg_container { | ||
position: absolute; | ||
bottom: 40px; | ||
left: 50%; | ||
|
||
width: $mouse_width + $border_width; | ||
height: $mouse_height + $border_width; | ||
margin-top: -($mouse_height + $border_width * 2) * 0.5; | ||
margin-left: -($mouse_width + $border_width * 2) * 0.5; | ||
|
||
-webkit-mask-image: linear-gradient(black, transparent); | ||
mask-image: linear-gradient(black, transparent); | ||
} | ||
.scroll_msg_inner { | ||
width: $mouse_width; | ||
height: $mouse_height * 0.84; | ||
position: relative; | ||
border-radius: $mouse_width/2 + $border_width * 2; | ||
border: $border_width solid $mouse_color; | ||
} | ||
.scroll_msg_wheel { | ||
position: absolute; | ||
top: 10%; | ||
left: 50%; | ||
width: $wheel_size; | ||
height: $wheel_size * 2; | ||
margin-left: -$wheel_size/2; | ||
border-radius: 2.4rem; | ||
background-color: $mouse_color; | ||
|
||
@include animation(mouse-scroll 1.6s infinite); | ||
} |
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
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