-
-
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.
feat: replace CSS for GSAP animation
- Loading branch information
Showing
21 changed files
with
273 additions
and
94 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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,3 @@ | ||
--- | ||
--- |
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,56 @@ | ||
@layer welcome { | ||
.welcome { | ||
display: grid; | ||
grid-template-areas: 'LeftGreeting WelcomeImage RightGreeting'; | ||
grid-template-columns: 1fr 1fr 1fr; | ||
} | ||
.welcome__image{ | ||
grid-area: WelcomeImage; | ||
align-self: center; | ||
justify-self: center; | ||
width: 100%; | ||
max-width: 400px; | ||
height: auto; | ||
} | ||
|
||
.welcome__text__body { | ||
align-self: center; | ||
text-align: center; | ||
color: var(--neutral-main); | ||
|
||
&.--right { | ||
grid-area: RightGreeting; | ||
justify-self: start; | ||
margin-left: -3rem; | ||
z-index: 10; | ||
} | ||
&.--left { | ||
grid-area: LeftGreeting; | ||
justify-self: end; | ||
margin-right: -1.5rem; | ||
z-index: 10; | ||
translate: 0 -100px; | ||
} | ||
@supports (animation-timeline: scroll(root block)) { | ||
&.--right { | ||
animation: float-up-far 200ms linear; | ||
animation-timeline: scroll(root block); | ||
} | ||
&.--left { | ||
animation: float-up-close linear; | ||
animation-timeline: scroll(root block); | ||
} | ||
} | ||
} | ||
.welcome__text__description{ | ||
grid-area: RightGreeting; | ||
padding-inline-start: 1rem; | ||
align-self: center; | ||
margin-top: 8rem; | ||
|
||
@supports (animation-timeline: scroll(root block)) { | ||
animation: float-up-close linear; | ||
animation-timeline: scroll(root block); | ||
} | ||
} | ||
} |
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,10 @@ | ||
--- | ||
import { Picture } from "astro-imagetools/components"; | ||
import './welcome.css'; | ||
--- | ||
<section class="welcome flex row-wrap"> | ||
<h2 class="welcome__text__body --left">Hi! I'm</h2> | ||
<Picture class="welcome__image" src="/src/ui/assets/images/jpg/bianca-fiore.jpg" alt="Bianca Fiore" /> | ||
<h2 class="welcome__text__body --right">Bianca</h2> | ||
<p class="welcome__text__description --right">Lorem ipsum dolor sit amet ipsum dolor sit amet ipsum dolor sit amet ipsum dolor sit amet</p> | ||
</section> |
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,56 @@ | ||
@layer welcome { | ||
.welcome { | ||
display: grid; | ||
grid-template-areas: 'LeftGreeting WelcomeImage RightGreeting'; | ||
grid-template-columns: 1fr 1fr 1fr; | ||
} | ||
.welcome__image{ | ||
grid-area: WelcomeImage; | ||
align-self: center; | ||
justify-self: center; | ||
width: 100%; | ||
max-width: 400px; | ||
height: auto; | ||
} | ||
|
||
.welcome__text__body { | ||
align-self: center; | ||
text-align: center; | ||
color: var(--neutral-main); | ||
|
||
&.--right { | ||
grid-area: RightGreeting; | ||
justify-self: start; | ||
margin-left: -3rem; | ||
z-index: 10; | ||
} | ||
&.--left { | ||
grid-area: LeftGreeting; | ||
justify-self: end; | ||
margin-right: -1.5rem; | ||
z-index: 10; | ||
translate: 0 -100px; | ||
} | ||
@supports (animation-timeline: scroll(root block)) { | ||
&.--right { | ||
animation: float-up-far 200ms linear; | ||
animation-timeline: scroll(root block); | ||
} | ||
&.--left { | ||
animation: float-up-close linear; | ||
animation-timeline: scroll(root block); | ||
} | ||
} | ||
} | ||
.welcome__text__description{ | ||
grid-area: RightGreeting; | ||
padding-inline-start: 1rem; | ||
align-self: center; | ||
margin-top: 8rem; | ||
|
||
@supports (animation-timeline: scroll(root block)) { | ||
animation: float-up-close linear; | ||
animation-timeline: scroll(root block); | ||
} | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/ui/components/organisms/header/components/menuButton/MenuButton.astro
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
1 change: 1 addition & 0 deletions
1
src/ui/components/organisms/header/components/menuOverlay/menuOverlay.css
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
Oops, something went wrong.