Skip to content

Added preloader #495

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

Closed
Closed
Show file tree
Hide file tree
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
60 changes: 60 additions & 0 deletions home.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,66 @@ body {
padding: 0;
background-color: #f5f5f5f5;
}
#preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}

#preloader .logo {
width: 300px; /* Adjust the width of the logo */
height: auto;
animation: fadeIn 1s ease-out;
}

#preloader h1 {
margin-top: 10px;
font-size: 24px; /* Adjust the font size of the company name */
color: #333333;
opacity: 0;
animation: slideIn 1s ease-out;
animation-delay: 0.5s; /* Delay the animation for better effect */
}

@keyframes fadeIn {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}

@keyframes slideIn {
0% {
transform: translateY(-20px);
opacity: 0;
}

100% {
transform: translateY(0);
opacity: 1;
}
}

@keyframes rotate {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
}


body.dark-mode {
background-color: black;
Expand Down
55 changes: 55 additions & 0 deletions home.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VC9ZHQ7GVC"></script>
<script>
// window.addEventListener('load', function () {
// const preloader = document.getElementById('preloader');
// preloader.style.display = 'none';
// });

setTimeout(function () {
const preloader = document.getElementById('preloader');
preloader.style.display = 'none';
}, 1000);


window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
Expand All @@ -51,6 +62,10 @@
</head>

<body>
<div id="preloader">
<img src="csedge.courses/Images/CSEDGELOGO.png" alt="Company Logo" class="logo">
<h1>CSEDGE OFFICIAL</h1>
</div>
<button id="goTopBtn" title="Go to top"><i class="uil uil-arrow-up"></i></button>
<!--Navigation Bar-->
<nav class="fixed-top">
Expand Down Expand Up @@ -549,6 +564,46 @@ <h3>Contact</h3>
}
});









































// Close navigation menu when a link is clicked
navLinks.addEventListener('click', function () {
navLinks.classList.remove('show');
Expand Down
Loading