-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
149 lines (135 loc) · 4.87 KB
/
index.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html><html>
<head>
<title>Frenzy Navigation App</title>
<style>
body * {
font-family: "Monaco", "Lucida Console", "Trebuchet MS", monospace;
}
#statsTable {
position:absolute;
top:0;
left:0;
height: 32vh;
width: 100%;
outline: 1px solid;
}
.label {
position:absolute;
width: 40%;
height: 12.5%;
text-align: left;
vertical-align: bottom;
font-size: 2.5vh;
outline: none;
}
.data {
position:absolute;
width: 40%;
height: 32%;
text-align: center;
vertical-align: middle;
font-size: 8vh;
outline: none;
}
#marksTable {
position:absolute;
top:32vh;
left:0;
border: 1px solid;
height: 68vh;
width: 100%;
}
#marksTable tr, #marksTable td {
height: 10vh;
}
#marksTable button {
text-align: center;
font-size: 3vh;
border-radius: 10px;
width: 100%;
height: 100%;
}
.enabled {
color: #006100;
background: #c6efce;
}
.disabled {
color: #9c0006;
background: #ffc7ce;
}
.target {
color: #000000;
background: #ffffff;
}
dialog {
width: 90vw;
height: 65vh;
}
dialog button {
font-size: 2vh;
}
dialog select {
font-size:large;
text-align:center;
}
</style>
</head>
<body onload = "startUp()">
<div id="statsTable" onclick="document.getElementById('setMarks').showModal()">
<div class="label" style="left:5%;top:0%">SOG (knots)</div>
<div class="label" style="left:55%;top:0%">COG (true)</div>
<div id="curSpeed" name="speed" class="data" style="left:5%;top:12.5%">-.--</div>
<div id="curCourse" name="course" class= "data" style="left:55%;top:12.5%">---</div>
<div class="label" style="left:5%;top:50%">NEXT DIST (nm)</div>
<div class="label" style="left:55%;top:50%">NEXT COG (true)</div>
<div id="nxtDistance" name="nxtDistance" class= "data" style="left:5%;top:62.5%">-.--</div>
<div id="nxtCourse" name="nxtCourse" class= "data" style="left:55%;top:62.5%">---</div>
</div>
<div>
<table id="marksTable">
<tr>
<td><button id="Top Mark" onclick="markButtonClicked('Top Mark')">TOP MARK</button></td>
<td><button id="Wing Mark Port" onclick="markButtonClicked('Wing Mark Port')">WING MARK PORT</button></td>
</tr>
<tr>
<td><button id="Bottom Mark" onclick="markButtonClicked('Bottom Mark')">BOTTOM MARK</button></td>
<td><button id="Wing Mark Stbd" onclick="markButtonClicked('Wing Mark Stbd')">WING MARK STBD</button></td>
</tr>
<tr>
<td><button id="Ramsgate" onclick="markButtonClicked('Ramsgate')">RAMSGATE</button></td>
<td><button id="Brighton" onclick="markButtonClicked('Brighton')">BRIGHTON</button></td>
</tr>
<tr>
<td><button id="Airport" onclick="markButtonClicked('Airport')">AIRPORT</button></td>
<td><button id="Kurnell" onclick="markButtonClicked('Kurnell')">KURNELL</button></td>
</tr>
<tr>
<td><button id="Quibray" onclick="markButtonClicked('Quibray')">QUIBRAY</button></td>
<td><button id="Outer Towra" onclick="markButtonClicked('Outer Towra')">OUTER TOWRA</button></td>
</tr>
<tr>
<td><button id="Taylor Bar" onclick="markButtonClicked('Taylor Bar')">TAYLOR BAR</button></td>
<td><button id="Captain Cook" onclick="markButtonClicked('Captain Cook')">CAPTAIN COOK</button></td>
</tr>
<tr>
<td><button id="Waverider" onclick="markButtonClicked('Waverider')">WAVERIDER</button></td>
</tr>
</table>
</div>
<dialog id="setMarks" class="dialog">
<button id="setTopMark" class="enabled" style="position:absolute; width:45%; left:2.5%; height:30%; top:2.5%"
onclick="document.getElementById('setMarks').close(); setMarkClicked('Top Mark')">SET TOP MARK</button>
<button id="cancelTopMark" class="disabled" style="position:absolute; width:45%; left:52.5%; height:30%; top:2.5%"
onclick="document.getElementById('setMarks').close(); cancelMarkClicked('Top Mark')">CLEAR TOP MARK</button>
<button id="setBottomMark" class="enabled" style="position:absolute; width:45%; left:2.5%; height:30%; top:40%"
onclick="document.getElementById('setMarks').close(); setMarkClicked('Bottom Mark')">SET BOTTOM MARK</button>
<button id="cancelBottomMark" class="disabled" style="position:absolute; width:45%; left:52.5%; height:30%; top:40%"
onclick="document.getElementById('setMarks').close(); cancelMarkClicked('Bottom Mark')">CLEAR BOTTOM MARK</button>
<button id="setMarksCancel" style="position:absolute; width:60%; left:20%; height:15%; top:80%"
onclick="document.getElementById('setMarks').close()">Cancel</button>
</dialog>
</body>
<script src="./location.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.7.3/localforage.min.js"></script>
<script src="./app.js"></script>
</html>