Skip to content

Commit

Permalink
Merge pull request #80 from Yaser-123/main
Browse files Browse the repository at this point in the history
Add Loader to Website
  • Loading branch information
MastanSayyad authored Jul 6, 2024
2 parents a6b3638 + c1bd32c commit 95d04f3
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Bubble.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<title>Bubble Sort</title>
<meta charset="UTF-8">
<head>
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -102,6 +103,7 @@
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<div id="Loader"></div>
<div class="header">
<a href="index.html">Home</a>
<a href="Bubble.html">Bubble Sort</a>
Expand All @@ -123,6 +125,12 @@ <h2 id="heading">BUBBLE SORT</h2>
<button class="btn-default btn-danger" onClick="window.location.reload();">Clear</button>
</div>
</div>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
<script>
var count = 9 + 1,
Expand Down Expand Up @@ -262,4 +270,5 @@ <h2 id="heading">BUBBLE SORT</h2>
d3.select("#rect" + unsortedArray[current]).attr("class", "unsorted");
}
</script>

</html>
8 changes: 8 additions & 0 deletions Compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Sorting Algorithms Comparison</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -103,6 +104,7 @@
</style>
</head>
<body>
<div id="Loader"></div>
<div class="header">
<h1>Sorting Algorithms Comparison</h1>
</div>
Expand Down Expand Up @@ -396,5 +398,11 @@ <h2 id="heading">SORTING VISUALIZATION</h2>
}

</script>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
</html>
10 changes: 9 additions & 1 deletion Insertion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<script src="https://d3js.org/d3.v3.js"></script>
<meta charset="UTF-8">
<head>
<link rel="stylesheet" href="style.css">
<style>
/* div {margin-left: 40px;margin-top: 20px} */
#buttons {margin-left: 40px;margin-top: 20px}
Expand All @@ -24,6 +25,7 @@
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
<body>
<div id="Loader"></div>
<div class="w3-bar w3-theme">
<a href="index.html" class="w3-bar-item w3-button w3-padding-16">Home</a>
<a href="Bubble.html" class="w3-bar-item w3-button w3-padding-16">Bubble Sort</a>
Expand All @@ -49,6 +51,12 @@
</div>
</div>
</div>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
<script>
var count = 9 + 1,
Expand Down Expand Up @@ -179,4 +187,4 @@
}

</script>
</html>
</html>
7 changes: 7 additions & 0 deletions chatbot.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.1/marked.min.js"></script>
</head>
<body class="bg-[#1B63AC] flex items-center justify-center min-h-screen">
<div id="Loader"></div>
<div
class="flex flex-col items-center justify-center w-full max-w-xl space-y-4"
>
Expand Down Expand Up @@ -357,5 +358,11 @@
}
}
</script>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
</html>
Binary file added img/pre-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@

<body data-spy="scroll" data-target=".site-navbar-target" data-offset="72">

<div id="Loader"></div>

<div class="site-wrap">

<div class="site-mobile-menu site-navbar-target">
Expand Down Expand Up @@ -1020,6 +1022,13 @@ <h5>Legal</h5>
});
</script>

<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>

<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
<script src="main.js"></script>
Expand Down
8 changes: 8 additions & 0 deletions mergesort.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Merge Sort Visualization</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -102,6 +103,7 @@
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<div id="Loader"></div>
<div class="header">
<a href="index.html">Home</a>
<a href="Bubble.html">Bubble Sort</a>
Expand Down Expand Up @@ -303,5 +305,11 @@ <h2 id="heading">MERGE SORT</h2>
.classed("comparing", false);
}
</script>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
</html>
8 changes: 8 additions & 0 deletions selectionsort.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Selection Sort Visualization</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -106,6 +107,7 @@
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<div id="Loader"></div>
<div class="header">
<a href="index.html">Home</a>
<a href="Bubble.html">Bubble Sort</a>
Expand Down Expand Up @@ -279,5 +281,11 @@ <h2 id="heading">SELECTION SORT</h2>
step();
}
</script>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
</html>
8 changes: 8 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,11 @@ pre code {
color: white !important;
background: rgb(34, 34, 139) !important;
}

#Loader{
background: white url(img/pre-loader.gif) no-repeat center center;
height: 100vh;
width: 100%;
position: fixed;
z-index: 100;
}
8 changes: 8 additions & 0 deletions visual.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Sorting Algorithms Visualization</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -100,6 +101,7 @@
</style>
</head>
<body>
<div id="Loader"></div>
<div class="header">
<h1>Sorting Algorithms Visualization</h1>
</div>
Expand Down Expand Up @@ -537,6 +539,12 @@ <h2 id="heading">SORTING VISUALIZATION</h2>
document.getElementById("space-complexity").textContent = `Space Complexity: ${complexity.space}`;
}
</script>
<script>
var loader = document.getElementById("Loader");
window.addEventListener("load", function(){
loader.style.display = "none";
})
</script>
</body>
</html>

0 comments on commit 95d04f3

Please sign in to comment.