Skip to content

Commit

Permalink
Merge pull request #660 from MastanSayyad/main
Browse files Browse the repository at this point in the history
Fixed Preloader Visibility Issue and Implemented Error Handling
  • Loading branch information
ayush-t02 authored Jul 31, 2024
2 parents e478856 + b79b3cf commit 3aa379b
Show file tree
Hide file tree
Showing 12 changed files with 153 additions and 9 deletions.
16 changes: 15 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
/>
<script src="./js/loader.js"></script>
<script src="./js/emoji.js"></script>
<title>Dots & Boxes Game</title>
<style>
Expand Down Expand Up @@ -884,4 +883,19 @@ <h3 class="instructions-heading" style="text-decoration: underline;">Instruction
</body>

<script src="https://cdn.jotfor.ms/s/umd/latest/for-form-embed-handler.js"></script>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</html>
5 changes: 0 additions & 5 deletions js/loader.js

This file was deleted.

15 changes: 15 additions & 0 deletions pages/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,20 @@
animateCircles();
});
</script>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
15 changes: 15 additions & 0 deletions pages/FAQs.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,5 +447,20 @@ <h1>
async
></script>
<script src="../js/FAQs.js"></script>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
15 changes: 15 additions & 0 deletions pages/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -779,5 +779,20 @@ <h2>How to Play🎮</h2>
></a>
</div>
</div>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
14 changes: 14 additions & 0 deletions pages/contributors.html
Original file line number Diff line number Diff line change
Expand Up @@ -707,5 +707,19 @@ <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-2">${contribu
></a>
</div>
</div>
<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
14 changes: 14 additions & 0 deletions pages/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -1186,5 +1186,19 @@ <h3>Step 7</h3>
showStep(currentStep);
});
</script>
<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
15 changes: 15 additions & 0 deletions pages/howtoplay.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,5 +378,20 @@ <h1 class="heading" style="text-decoration: underline">
></script>
</div>
</div>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
16 changes: 15 additions & 1 deletion pages/licensing.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<link rel="stylesheet" href="../styles/mainstyle.css" />
<link rel="stylesheet" href="../styles/licensing.css" />
<link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon" />
<script src="/js/loader.js"></script>

<style>
.circle {
Expand Down Expand Up @@ -353,5 +352,20 @@ <h2 class="section-title">MIT License</h2>
</center>
</div>
</div>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
15 changes: 15 additions & 0 deletions pages/privacypolicy.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,5 +353,20 @@ <h2 class="section-title">Contact Us</h2>
</center>
</div>
</div>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
15 changes: 15 additions & 0 deletions pages/termsofservice.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,20 @@ <h2 class="section-title">Contact Information</h2>
</center>
</div>
</div>

<!-- Loader.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);
});

</script>
</body>
</html>
7 changes: 5 additions & 2 deletions styles/mainstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ a {
.board {
width: 80vw;
}
.navbarr .nav-links {
display: none;
}
}

.box {
Expand Down Expand Up @@ -920,9 +923,9 @@ button a {
margin-right: 10px;
}

.navbarr .nav-links {
/* .navbarr .nav-links {
display: none;
}
} */

.navbar-toggler {
display: inline !important;
Expand Down

0 comments on commit 3aa379b

Please sign in to comment.