Skip to content

Commit

Permalink
Merge pull request #2 from Vika-0607/module1-task2
Browse files Browse the repository at this point in the history
  • Loading branch information
keksobot authored Jun 5, 2024
2 parents 4eb5de1 + a259974 commit 71f7a0b
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
4 changes: 4 additions & 0 deletions source/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ social();

const fullPageScroll = new FullPageScroll();
fullPageScroll.init();

window.addEventListener('load', function () {
document.body.classList.add('page-loaded');
});
1 change: 1 addition & 0 deletions source/scss/blocks/intro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
opacity: 1;
transform: translateY(0);
transition: opacity 0.7s, transform 0.7s;
transition-delay: 1s;
}
}
}
36 changes: 30 additions & 6 deletions source/scss/blocks/page-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
padding: 1rem 0;
width: 10rem;
color: $c-light;
opacity: 0;
transform: translateX(-1rem);

@media (min-width: $stop-scaling) {
top: -5px;
Expand Down Expand Up @@ -130,6 +132,7 @@
.page-header__nav {
display: flex;
align-items: center;
opacity: 0;

@media (max-width: $tablet) and (orientation: portrait) {
position: fixed;
Expand Down Expand Up @@ -267,12 +270,6 @@
}
}

&.active {
&::after {
transform: scaleX(100%);
}
}

&:hover,
&:focus {
color: $c-purple;
Expand Down Expand Up @@ -305,3 +302,30 @@
width: 100%;
}
}

.page-loaded {
.page-header__logo {
opacity: 1;
transform: translateX(0);
transition: opacity 0.5s cubic-bezier(0, 0, 0.04, 1), transform 0.5s cubic-bezier(0, 0, 0.04, 1);
}

.page-header__nav {
opacity: 1;
transition: opacity 0.5s cubic-bezier(0, 0, 0.04, 1);
transition-delay: 0.3s;
}

.page-header__menu {
a {
&.active {
&::after {
transform: scaleX(100%);
transition: transform 0.5s cubic-bezier(0, 0, 0.04, 1);
transition-delay: 0.3s;
transform-origin: left;
}
}
}
}
}
11 changes: 11 additions & 0 deletions source/scss/blocks/screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
background-color: $c-light;
z-index: 1;

@media (min-width: $tablet) {
transform: translateY(2.8rem);
}

@media (max-width: $tablet) and (orientation: portrait) {
width: 3.5rem;
height: 3.5rem;
Expand All @@ -70,6 +74,13 @@
}
}

.page-loaded {
.screen__footer {
transform: translateY(0);
transition: transform 0.3s cubic-bezier(0, 0, 0.04, 1);
}
}

.screen__footer-wrapper {
@include container;

Expand Down
9 changes: 9 additions & 0 deletions source/scss/blocks/social-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
height: 4rem;
color: $c-dark;
border-radius: 50%;
transform: scale(0);

@media (max-width: $tablet) and (orientation: portrait) {
display: none;
Expand Down Expand Up @@ -101,6 +102,14 @@
}
}

.page-loaded {
.social-block__toggler {
transform: scale(1);
transition: transform 0.5s cubic-bezier(0, 0, 0.26, 1.65);
transition-delay: 0.5s;
}
}

.social-block__list {
@include list-reset;
position: absolute;
Expand Down

0 comments on commit 71f7a0b

Please sign in to comment.