-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload.html
More file actions
72 lines (64 loc) · 1.49 KB
/
load.html
File metadata and controls
72 lines (64 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<style>
body{
margin:0;padding:0;
}
div.container{
background:#fffffff;
width:100%;
height:100vh;
}
div.container img{
width:150px;
display:flex;
position:absolute;
top:35%;
right:30%;
}
div.container h1{
font-size:18px;
right:36%;
font-weight: 500;
animation: ease;
font-family: serif;
top:50%;
color:#00CF53;
position:absolute;
}
</style>
</head>
<body>
<div class="container">
<img src="images/gif.gif" alt="loading">
<h1>Loading...</h1>
</div>
<script>
<script>
function loadIndex() {
// Replace this with the actual path to your index.html file
const indexFile = "index.html";
const loadingContainer = document.querySelector(".container");
loadingContainer.style.display = "none"; // Hide loading screen
const indexContent = document.createElement("div");
indexContent.id = "index-content";
document.body.appendChild(indexContent);
fetch(indexFile)
.then(response => response.text())
.then(htmlContent => {
indexContent.innerHTML = htmlContent;
})
.catch(error => {
console.error("Error loading index.html:", error);
// Handle errors gracefully, e.g., display an error message
});
}
window.onload = loadIndex; // Start loading immediately
</script>
</script>
</body>
</html>