forked from GGC-SD/ggcmaps3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
226 lines (217 loc) · 8.85 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="favicon.ico?" type="image/x-icon">
<meta charset="utf-8">
<meta name="theme-color" content="#00704a">
<title>GGCMaps</title>
<link rel="manifest" href="manifest.json">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/styles.css">
<script src="js/svg-pan-zoom.min.js"></script>
<script src="js/hammer.min.js"></script>
<script src="js/script.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Yantramanav:300" rel="stylesheet">
<!-- Script is run in the head so that there's no jump (partial load then redirect) for Incompatible Browser users -->
<!-- Allows for the first paint to be the support page if agreement has not been accepted in current session -->
<script>
// Detect the user's browser... nasty, I know. A necessary evil :'(
// If the detected browser is Internet Explorer or Edge
if (window.navigator.userAgent.indexOf("Trident") > -1 || window.navigator.userAgent.indexOf("Edge") > -1) {
// if the function eatCookie() returns that cookie is not empty (user
// has accepted previously in this session) do nothing.
// else if it is null, redirect user to support page
if (eatCookie("agreement") == "accept") {
// Do nothing, they've accepted previously
} else {
// Redirect to support page
window.location.replace("support.html");
}
}
</script>
<script>
firstLegend();
</script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('sw.js', {scope: './'}).then(function(registration) {
// Registration was successful
caches.keys().then(function(keyList) {
for(var i = 0; i < keyList.length; i++) {
if(keyList[i] != 'GGCMaps-cache-v1.5.3') {
caches.delete(keyList[i]);
}
}
});
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-98075346-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div onclick="toggleTab(event, 'helpbox'); toggleTab(event, 'campusEvents');" class="content">
<div class="search-menu">
<div class="popup-group">
<img id="menu" src="images/bars.svg" onclick="openMenu()" alt="Menu Button">
<div class="popup" id="menu-popup">
<h3>Menu</h3>
</div> <!-- menu-popup -->
</div> <!-- popup-group -->
<input input="text" list="rooms" id="roomSearch" placeholder="Search (Ex: B 1200, Help Desk)" onkeypress="searchFromBar(event)" oninput="searchSuggest(event)">
<input type="text" id="arrayStore" style="display:none">
<datalist id= "rooms"></datalist>
<div class="popup-group">
<img id="search" src="images/search.svg" onclick="searchRoomNumber()" alt="Search Icon">
<div class="popup" id="search-popup">
<h3>Search</h3>
</div> <!-- search-popup -->
</div> <!-- popup-group -->
<span class="divider"></span>
<div class="popup-group">
<h2 id="building"></h2>
<div id="building-popup" class="popup">
<h3>Building</h3>
</div> <!-- building-popup -->
</div> <!-- popup-group -->
<div class="popup-group">
<h2 id="floor" onclick="dropdown('floors', 'floors-active')"></h2>
<div class="popup" id="floor-popup">
<h3>Floor</h3>
</div> <!-- floor-popup -->
</div> <!-- popup-group -->
<div class="dropdown">
<img src="images/caret-down.svg" onclick="dropdown('floors', 'floors-active')" alt="Dropdown button">
<div class="floors"></div> <!-- floors -->
</div> <!-- dropdown -->
</div> <!-- search-menu -->
<div class="campus-info"> <!-- Important div. do not delete or comment out -->
<!-- Content Below can be deleted or commented out -->
<div id="pLegend">
<script>
if(eatCookie('legend') === 'hide') {
document.getElementById('pLegend').style.display = "none";
}
</script>
<h4>Parking Legend</h4>
<div class="menu-section"></div>
<section>
<div class="parking-key">
<div id="reserved-parking" class="color-label"></div>
<p>Reserved</p>
</div>
<div class="parking-key">
<div id="resident-parking" class="color-label"></div>
<p>Residents</p>
</div>
<div class="parking-key">
<div id="student-parking" class="color-label"></div>
<p>Students</p>
</div>
<div class="parking-key">
<div id="visitor-parking" class="color-label"></div>
<p>Visitors</p>
</div>
</section>
</div> <!-- pLegend div -->
</div> <!-- campus-info -->
<div class="tab" id="helpbox"></div>
<div class="tab" id="campusEvents"></div>
<div id="svg-holder" class="svg-holder">
</div> <!-- svg-holder -->
<div class="content-disable" onclick="closeMenu()"></div>
</div>
<div class="nav">
<h1 onclick="changeFloor('Campus')">GGCMaps</h1>
<img src="images/arrow-left.svg" onclick="closeMenu()" alt="Close Menu Button">
<div class="menu-section"></div>
<ul>
<li onclick="changeFloor('Campus')"><a>Campus</a></li>
<li onclick="changeFloor('A')"><a>Building A</a></li>
<li onclick="changeFloor('B', '1')"><a>Building B</a></li>
<li onclick="changeFloor('C', '1');"><a>Building C</a></li>
<li onclick="changeFloor('C3', 'G');"><a>Building C3</a></li>
<li onclick="changeFloor('D', '1');"><a>Building D / Admissions</a></li>
<li onclick="changeFloor('E', '1')"><a>Building E / Student Center</a></li>
<li onclick="changeFloor('F', '1')"><a>Building F / Fitness Center</a></li>
<li onclick="changeFloor('H', '1');"><a>Building H</a></li>
<li onclick="changeFloor('I', '1')"><a>Building I</a></li>
<li onclick="changeFloor('L', '1');"><a>Building L / Library</a></li>
<li onclick="changeFloor('3', '1');"><a>Building 3000</a></li>
</ul>
<div class="menu-section"></div>
<ul>
<li onclick="sortEvents();"><a>Campus Events</a></li>
</ul>
<div class="menu-section"></div>
<ul>
<li onclick="searchFromMenu('cg360')"><a>AEC</a></li>
<li onclick="searchFromMenu('bookstore')"><a>Book Store</a></li>
<li onclick="searchFromMenu('c1260')"><a>Cisco Auditorium</a></li>
<li onclick="subMenu('dining');"><a>Dining Services</a></li>
<ul class="dining">
<li onclick="searchFromMenu('chick-fil-a')"><a>Chick-fil-A</a></li>
<li onclick="searchFromMenu('dining-hall')"><a>Dining Hall</a></li>
<li onclick="searchFromMenu('einstein-bros-bagels')"><a>Einstein Bros Bagels</a></li>
<li onclick="searchFromMenu('moes')"><a>Moe's Southwest Grill</a></li>
<li onclick="searchFromMenu('panda-express')"><a>Panda Express</a></li>
<li onclick="searchFromMenu('a1825')"><a>P.O.D. Market</a></li>
<li onclick="searchFromMenu('l1102')"><a>Starbucks</a></li>
</ul>
<li onclick="searchFromMenu('game-room')"><a>Game Room</a></li>
<li onclick="searchFromMenu('lvis')"><a>LVIS</a></li>
<li onclick="subMenu('help-desk');"><a>Tech Help Desks</a></li>
<ul class="help-desk">
<li onclick="searchFromMenu('A1040')"><a>A Building</a></li>
<li onclick="searchFromMenu('G309')"><a>C Building</a></li>
</ul>
<li onclick="searchFromMenu('d1125')"><a>Parking Services</a></li>
<li onclick="searchFromMenu('d1301')"><a>Testing Services</a></li>
<li onclick="searchFromMenu('a1510')"><a>The Den</a></li>
</ul>
<div class="menu-section"></div>
<ul>
<li onclick="openTab('helpbox')"><a>Help</a></li>
<li><a href="https://github.com/ggcmaps/ggcmaps.github.io/graphs/contributors" target="_blank">Contributors</a></li>
</ul>
<div class="menu-section"></div>
<h1>Options</h1>
<ul>
<!-- <li>
<a>Show Safety Legend
<div class="switchmenucontainer">
<label class="switch">
<input type="checkbox" onclick="safetyMode()" id="safetySwitch">
<div class="slider round"></div>
</label>
</div>
</a>
</li> -->
<li>
<a>Show Parking Legend
<div class="switchmenucontainer">
<label class="switch">
<input type="checkbox" onclick="cookieLegend(); changeFloor('Campus');" id="legendSwitch">
<div class="slider round"></div>
</label>
</div>
</a>
</li>
</ul>
</div> <!-- nav -->
<!-- <script src="https://localhost:35729/livereload.js"></script> -->
<script>visitCheck();</script>
</body>
</html>