-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmanual.html
executable file
·125 lines (125 loc) · 4.28 KB
/
manual.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simulator handbook</title>
<script src="assets/js/showdown.js"></script>
<script src="assets/js/jquery-3.5.1.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<style>
body {
overflow: hidden;
background-color: var(--viewer-bg-color);
}
#all {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: row;
padding: 0
}
#sidebar {
width: 25%;
height: 100%;
border-right: 1px solid #aaa;
margin-right: 2vw;
display: flex;
flex-direction: column;
}
.subitem {
padding: 0 0 5px 10px;
margin: 10px 0 0 0;
}
#viewer {
width: 75%;
margin-right: 50px;
height: 100%;
overflow: scroll;
background-color: var(--viewer-bg-color);
}
h1, h2, h3, h4, li, p {
font-family: 'Open Sans', sans-serif;
font-weight: 100;
color: var(--text-color);
}
code {
color: var(--text-color);
}
pre > code {
color: #fff;
}
.restricted {
color: #a44;
}
li {
margin-bottom: 3px;
}
p {
font-size: 20px;
}
a {
text-decoration: none;
color: var(--link-color);
}
pre {
background: #1d262f;
border: 2px solid #aaa;
border-radius: 10px;
padding: 20px;
margin-right: 1vw;
box-shadow: 5px 5px 15px 0 rgba(50,50,50,.75); /* shamelessly stolen from codegram */
}
:root {
--viewer-bg-color: #e9e9e9;
--text-color: #000;
--link-color: #0ea2f2;
}
[data-theme="dark"] {
--viewer-bg-color: #222;
--text-color: #ddd;
}
</style>
</head>
<body>
<div id="all" style="opacity: 0">
<div id="sidebar">
<p style="padding: 0 0 10px 10px; margin: 10px 0 20px 0; border-bottom: 1px solid #bbb;">Simulator Documentation</p>
<a href="#" onclick='displayPage ("md/intro.md")'><p class="subitem">Introduction</p></a>
<a href="#" onclick='displayPage ("md/firsttime.md")'><p class="subitem">Quick Start</p></a>
<a href="#" onclick='displayPage ("md/tipstricks.md")'><p class="subitem">Tips and Tricks</p></a>
<a href="#" onclick='displayPage ("md/workspaces.md")'><p class="subitem" style="font-size: 16px"> Workspaces</p></a>
<a href="#" onclick='displayPage ("md/featurelist.md")'><p class="subitem">Feature List</p></a>
<a href="#" onclick='displayPage ("md/changelog.md")'><p class="subitem">Changelog</p></a>
</div>
<div id="viewer"></div>
</div>
</body>
<script>
var conv = new showdown.Converter()
var text = $("#viewer")[0].innerHTML//.trim().replace (/ +/g, '')
function displayPage (link) {
fetch (link)
.then (response => response.text())
.then ((data) => {
$("#viewer").animate ({'opacity': 0}, 200, () => {
$("#viewer")[0].innerHTML = conv.makeHtml (data)
$("#viewer").animate ({'opacity': 1}, 200)
})
})
}
window.onload = () => {
if (localStorage.ice40DarkMode == "true")
document.documentElement.setAttribute ("data-theme", "dark")
else if (localStorage.ice40DarkMode == "false")
document.documentElement.setAttribute ("data-theme", "light")
$("#all").animate ({'opacity': 1}, 1000)
if (window.location.search.match (/\?md=([a-z0-9]+)/)) {
displayPage ("md/" + window.location.search.match (/\?md=([a-z0-9]+)/)[1] + ".md")
}
else {
displayPage ("md/intro.md")
}
}
</script>
</html>