Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨[Feature Request]: Addition of Preloader and Custom Cursor. #403

Merged
merged 3 commits into from
Jun 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,78 @@
right: 0;
}
}
/*Preloader CSS*/
.pre{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
transition: opacity 2s ease-out, visibility 2s ease-out;
opacity: 1;
visibility: visible;
z-index: 9999;
}

.pre--hidden {
opacity: 0;
visibility: hidden;
}

.loader {
display: block;
position: relative;
width: 150px;
height: 150px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #55a5ea;
animation: spin 3s linear infinite;
}

.loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #3fbcc0c6;
animation: spin 3s linear infinite;
}

.loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
animation: spin 1.5s linear infinite;
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}


.loader--hidden{
opacity: 0;
visibility: hidden;
}
</style>
<link rel="stylesheet" href="chatbox.css">
<!-- Google Fonts Link For Icons chatboxx -->
Expand All @@ -125,6 +196,9 @@
</head>

<body>
<div class="pre">
<div class="loader"></div>
</div>
<!-- ############# Header ############# -->

<header class="header_container">
Expand Down Expand Up @@ -995,6 +1069,28 @@ <h4>RAPIDOC Newsletter</h4>
ScrollReveal().reveal('.col-lg-3', { delay: 500 , origin:'left' });
ScrollReveal().reveal('.feedback', { delay: 400 , origin:'left' });
ScrollReveal().reveal('.footer', { delay: 400 , origin:'bottom' });
</script>
<script>

window.addEventListener("load", () => {
const loader = document.querySelector(".pre");

loader.classList.add("pre--hidden");

loader.addEventListener("transitionend", () => {
document.body.removeChild(loader);
});
});

window.addEventListener("load", () => {
const loader = document.querySelector(".loader");

loader.classList.add("loader--hidden");

loader.addEventListener("transitionend", () => {
document.body.removeChild(loader);
});
});
</script>
</body>

Expand Down