-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.html
94 lines (86 loc) · 3.48 KB
/
doc.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" href="https://raw.githubusercontent.com/Appiko/website/master/images/icon/favicon.ico">
<title>Appiko | Documentation</title>
<link rel="stylesheet" href="doc.css">
<link rel="stylesheet" href="nav.css">
</head>
<body>
<!-- <nav>
<ul>
<li>
<a href="https://appiko.org"><img src="https://appiko.org/images/logo/logo_text.png" width="100px"
height="30px" alt="Appiko Logo"> </a>
</li>
<li>
<a id="setup" onclick="changeFrame('setup')">Setup</a>
</li>
<li>
<a class="active" id="firmware" onclick="changeFrame('firmware')">Firmware</a>
</li>
<li>
<a id="hardware" onclick="changeFrame('hardware')">Hardware</a>
</li>
</ul>
</nav>
-->
<div class="nav">
<input type="checkbox" id="nav-check">
<div class="nav-header">
<div class="nav-title">
<a href="https://appiko.org"><img src="https://appiko.org/images/logo/logo_text.png" width="100px"
height="30px" alt="Appiko Logo"> </a>
</div>
</div>
<div class="nav-btn">
<label for="nav-check">
<span></span>
<span></span>
<span></span>
</label>
</div>
<div class="nav-links">
<a class="active" id="firmware" onclick="changeFrame('firmware')">Firmware</a>
<a id="hardware" onclick="changeFrame('hardware')">Hardware</a>
<a id="setup" onclick="changeFrame('setup')">Setup</a>
</div>
</div>
<iframe src=""></iframe>
</body>
<script>
window.onload = function () {
console.log("a");
paramVal = document.URL.replace(/.*view=([^&]*).*|(.*)/, '$1');
console.log(paramVal);
changeFrame(paramVal);
};
function changeFrame(frameName) {
switch (frameName) {
case "firmware":
document.getElementsByClassName("active")[0].setAttribute("class", "");
document.getElementById(frameName).setAttribute("class", "active");
document.getElementsByTagName("iframe")[0].setAttribute("src", "./nrf5x-firmware-doc/");
break;
case "setup":
document.getElementsByClassName("active")[0].setAttribute("class", "");
document.getElementById(frameName).setAttribute("class", "active");
document.getElementsByTagName("iframe")[0].setAttribute("src", "./api/");
break;
case "hardware":
document.getElementsByClassName("active")[0].setAttribute("class", "");
document.getElementById(frameName).setAttribute("class", "active");
document.getElementsByTagName("iframe")[0].setAttribute("src", "./hardware-docs.html");
break;
default:
document.getElementsByClassName("active")[0].setAttribute("class", "");
document.getElementById("hardware").setAttribute("class", "active");
document.getElementsByTagName("iframe")[0].setAttribute("src", "./hardware-docs.html");
break;
}
}
</script>
</html>