Skip to content

Commit

Permalink
now animations starts after preloader screen disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nitinsooni committed Sep 30, 2024
1 parent 23bc601 commit f0cb402
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
Binary file modified assets/images/profile.webp
Binary file not shown.
10 changes: 8 additions & 2 deletions css/media.css
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@
background-repeat: no-repeat;
background-position: center;
background-size: 130% 110%;
animation: 1.2s ease forwards back-gradient;
}

.gradient-effect {
animation: 1.2s ease .25s forwards back-gradient;
}

@keyframes back-gradient {
Expand Down Expand Up @@ -451,7 +454,10 @@
@media only screen and (min-width: 1400px) {
#home {
background-size: 120% 110%;
animation: 2.2s ease forwards back-gradient;
}

.gradient-effect {
animation: 2.2s ease .25s forwards back-gradient;
}

@keyframes back-gradient {
Expand Down
8 changes: 7 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ button {
border-radius: 50%;
display: inline-block;
margin: 0 3px;
box-shadow: rgb(6, 6, 6) 1px 1px 5px -1px;
animation: jump 0.8s infinite ease-in-out;
}

Expand Down Expand Up @@ -311,6 +312,9 @@ nav .nav-r a {
stroke-linejoin: round;
stroke-dasharray: 632;
stroke-dashoffset: 632;
}

.stroke-draw {
animation: 1.5s ease .25s forwards draw;
}

Expand Down Expand Up @@ -749,8 +753,10 @@ nav .nav-r a {
}

#contact .table .table-r .container .card.one .content .block-top img {
width: 100px;
border: 2px solid #b18a52;
border-radius: 100%;
filter: grayscale(10%);
}

#contact .table .table-r .container .card.one .content .block-top .text {
Expand Down Expand Up @@ -827,7 +833,7 @@ nav .nav-r a {

#contact .table .table-r .container .card.two .content img {
height: 100%;
filter: grayscale(30%);
filter: grayscale(25%);
}

#contact .table .table-r .container .card.front {
Expand Down
5 changes: 4 additions & 1 deletion js/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Disable preloader screen when website fully loaded with fade-out animation
// Disable preloader screen when website fully loaded with fade-out animation and then start website animations
const loadingScreen = document.querySelector('.preloader');

window.addEventListener('load', function() {
Expand All @@ -7,6 +7,9 @@ window.addEventListener('load', function() {
setTimeout(function() {
loadingScreen.style.display = 'none';
}, 250);

document.querySelector('#home .title svg path').classList.add('stroke-draw');
document.getElementById('home').classList.add('gradient-effect');
});

// Navbar links gets in focus according to which section is in view
Expand Down

0 comments on commit f0cb402

Please sign in to comment.