-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.html
More file actions
72 lines (71 loc) · 1.74 KB
/
Copy pathbasic.html
File metadata and controls
72 lines (71 loc) · 1.74 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 lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Basic NprogressE</title>
<style>
html {
font-size: 16px;
}
.example-nav {
position: fixed;
top: 12px;
left: 12px;
z-index: 100000;
display: flex;
gap: 8px;
font-size: 14px;
}
.example-nav a {
color: #333;
text-decoration: none;
padding: 4px 10px;
border: 1px solid #ccc;
border-radius: 4px;
background: #fff;
}
.example-nav a:hover {
border-color: #888;
}
.example-nav a.active {
font-weight: bold;
border-color: #333;
}
</style>
<link rel="stylesheet" href="../dist/style.css" />
<script src="../dist/index.js"></script>
</head>
<body>
<nav class="example-nav">
<a href="./basic.html" class="active">Basic</a>
<a href="./simple.html">Simple</a>
</nav>
<div style="position: fixed; top: 30px; right: 40px">
spinner is here <span>↗</span>
</div>
<div style="text-align: center">
progress bar is running<span>↑↑↑</span>
</div>
<script>
{
window.NProgressE.configure({
showSpinner: true,
});
function once() {
window.NProgressE.start();
setTimeout(() => {
if (Math.random() > 0.6) {
window.NProgressE.done();
} else {
window.NProgressE.error();
}
}, 3000);
}
setInterval(once, 5000);
once();
}
</script>
</body>
</html>