Skip to content

Commit 6d16041

Browse files
committed
Adicioado logo em animação em js
1 parent 102fc33 commit 6d16041

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

_src/js/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
pageSize = (doc.clientHeight - window.innerHeight),
1010
percentageScrolled = Math.floor((scrollPosition / pageSize) * 100);
1111

12-
if (percentageScrolled > 65){
12+
if (percentageScrolled > 50){
1313
document.querySelector('.transparent').className = 'blue';
14+
document.querySelector('.new-logo').style.display = '';
1415
}
1516

1617
else{
1718
document.querySelector('.blue').className = 'transparent';
19+
document.querySelector('.new-logo').style.display = 'none';
1820
}
1921

2022
};

_src/sass/_header.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,24 @@
33
position: absolute;
44
}
55

6+
.new-logo{
7+
position:relative;
8+
top: -3.5rem;
9+
> img{
10+
width:250px;
11+
}
12+
transition: all 0.45s linear;
13+
}
14+
615
.blue{
7-
transition: all 0.65s linear;
16+
transition: all 0.45s linear;
817
}
918

1019
.transparent {
1120
-webkit-box-shadow: none;
1221
box-shadow: none;
1322
background: none;
14-
transition: all 0.65s linear;
23+
transition: all 0.45s linear;
1524
}
1625

1726
.parallax-container {

assets/css/main.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
top: 0;
33
position: absolute; }
44

5+
.new-logo {
6+
position: relative;
7+
top: -3.5rem;
8+
transition: all 0.45s linear; }
9+
.new-logo > img {
10+
width: 250px; }
11+
512
.blue {
6-
transition: all 0.65s linear; }
13+
transition: all 0.45s linear; }
714

815
.transparent {
916
-webkit-box-shadow: none;
1017
box-shadow: none;
1118
background: none;
12-
transition: all 0.65s linear; }
19+
transition: all 0.45s linear; }
1320

1421
.parallax-container {
1522
min-height: 100vh;

assets/js/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)