forked from SH20RAJ/DynamicLoaderJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
70 lines (60 loc) · 2.04 KB
/
main.html
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
<!DOCTYPE html>
<html>
<head>
<title>Dynamic Content Loader Example</title>
<style>
/* CSS styles for loading indicator */
.loader {
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 1s linear infinite;
margin: 20px auto;
}
/* CSS styles for fade-in animation */
.fade-in {
animation: fade-in 0.5s ease-in-out forwards;
}
/* CSS styles for error message */
.error-message {
color: red;
font-weight: bold;
}
</style>
<link rel="icon" href="logo.svg"/>
<base target="_parent"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"><style></style><style>INPUT:-webkit-autofill,SELECT:-webkit-autofill,TEXTAREA:-webkit-autofill{animation-name:onautofillstart}INPUT:not(:-webkit-autofill),SELECT:not(:-webkit-autofill),TEXTAREA:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{}@keyframes onautofillcancel{}
.line-loader {
position: fixed;
top: 0;
left: 0;
height: 2px;
width: 100%;
background-color: #3498db;
z-index: 9999;
display: none;
}
</style>
</head>
<body>
<header id="header"></header>
<nav>
<ul>
<li data-load="components/page1.html" data-target="#content" data-loader="true">Load Page 1</li>
<li data-load="components/page2.html" data-target="#content">
Load Page 2
</li>
</ul>
</nav>
<main id="content" style="background: red;">Content Here</main>
<span id="op">Span</span>
<footer id="footer" data-load="components/footer.html"></footer>
<script src="DynamicLoader.js"></script>
<script>
DynamicLoader.autoLoad();
DynamicLoader.load('#op','page3.html')
DynamicLoader.loadFile('https://mdbootstrap.com/api/snippets/static/download/MDB5-Free_6.4.0/css/mdb.min.css', 'css');
</script>
</body>
</html>