Skip to content

Commit 36f5a99

Browse files
committed
remove object when they go up
1 parent 8f289d8 commit 36f5a99

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

css/presentation-section.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
.presentation-main-skill {
1616
font-size: 1.8rem;
17-
opacity: 0;
1817
animation-name: show-presentation-main-skill;
1918
animation-timing-function: ease;
2019
animation-duration: 1s;
@@ -24,8 +23,7 @@
2423
margin-bottom: 0.7rem;
2524
}
2625

27-
#presentation-description {
28-
opacity: 0;
26+
.presentation-description {
2927
animation-name: show-presentation-main-skill;
3028
animation-timing-function: ease;
3129
animation-duration: 1s;

css/styles.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ hr {
7272
/* || UTILITIES */
7373

7474
.reveal {
75-
opacity: 0;
75+
opacity: 0 !important;
7676
transition: all 1s ease-in;
7777
transform: translate(0vh, 3vh);
7878
}
7979

8080
.reveal.active {
81-
opacity: 1;
81+
opacity: 1 !important;
82+
transition: all 1s ease-in;
8283
transform: translate(0vh, 0vh);
8384
}
8485

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h1 class="presentation-title">
141141
<h2 class="presentation-main-skill">
142142
Welcome to my personal portfolio!
143143
</h2>
144-
<p id="presentation-description">
144+
<p class="presentation-description">
145145
I'm a cuban computer science from Havana University. Currently, I'm
146146
working as full-stack engineer focused in building .net application
147147
and their performance. Also, I work in frontend websites using

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ function reveal() {
33
[...revealElements].forEach((element) => {
44
var windowHeight = window.innerHeight;
55
const elementTop = element.getBoundingClientRect().top;
6+
const elementBottom = element.getBoundingClientRect().bottom;
67
if (
78
elementTop <
8-
windowHeight - element.getBoundingClientRect().height + 150
9+
windowHeight - element.getBoundingClientRect().height + 150 &&
10+
elementBottom >= 150
911
) {
12+
console.log(element);
1013
element.classList.add("active");
1114
} else {
1215
element.classList.remove("active");

0 commit comments

Comments
 (0)