Update website files and add form handler script

This commit is contained in:
2025-06-01 22:09:02 +05:30
parent 87a3b24eaa
commit f330499c83
23 changed files with 1861 additions and 730 deletions

View File

@@ -3,6 +3,9 @@
*/
document.addEventListener('DOMContentLoaded', function() {
// Immediate page stabilization
document.documentElement.classList.add('loaded');
// Initialize all interactive components
initScrollAnimations();
initParallaxEffects();
@@ -13,10 +16,28 @@ document.addEventListener('DOMContentLoaded', function() {
// Remove page loader when everything is ready
setTimeout(() => {
const body = document.querySelector('body');
const html = document.documentElement;
if (body) body.classList.add('loaded');
}, 300);
if (html) html.classList.add('loaded');
}, 100);
});
// Add immediate load detection
if (document.readyState === 'loading') {
// Document is still loading
document.addEventListener('DOMContentLoaded', handlePageLoad);
} else {
// Document has already loaded
handlePageLoad();
}
function handlePageLoad() {
const body = document.querySelector('body');
const html = document.documentElement;
if (body) body.classList.add('loaded');
if (html) html.classList.add('loaded');
}
// Initialize scroll effects for navbar
function initScrollEffects() {
const header = document.querySelector('.site-header');