-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
50 lines (45 loc) · 1.85 KB
/
index.html
File metadata and controls
50 lines (45 loc) · 1.85 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Data Visualisation Lab">
<meta name="keywords" content="HTML, CSS, SVG, JS">
<meta name="author" content="Veron">
<title>Home</title>
<link rel="stylesheet" href="css/style.css">
<link rel="icon" href="images/favicon.png" type="image/x-icon">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
</head>
<body>
<div id="nav"></div>
<div class="container"><div id="content"></div></div>
<footer>COS30045 Data Visualisation</footer>
<script src="js/validate_route.js"></script>
<script src="js/script.js"></script>
<script>
const searchParams = new URLSearchParams(window.location.search);
if (searchParams.has('lab')) {
let labParam = searchParams.get('lab');
const url = new URL(window.location);
url.searchParams.delete('lab');
window.history.replaceState({}, document.title, url.pathname);
let lab = labParam.split(".");
let path = "lab" + lab[0] + "/" + lab[1] + ".html";
let title = "Lab " + lab[0] + "." + lab[1];
loadPage(path, title);
}
else{
let title = sessionStorage.getItem("title");
let path = sessionStorage.getItem("path");
if(title && path){
loadPage(path, title);
}
else{
loadPage("main_page.html", "Home")
}
}
</script>
</body>
</html>