-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
428 lines (383 loc) · 20.8 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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- SEO Meta Tags -->
<meta name="description" content="Meal information provider for Avon Old Farms School.">
<meta name="author" content="Team Avo">
<!-- OG Meta Tags to improve the way the post looks when you share the page on LinkedIn, Facebook, Google+ -->
<meta property="og:site_name" content="Avo Food - Avon Old Farms School" /> <!-- website name -->
<meta property="og:site" content="https://github.com/TeamAvo/Avo-Food" /> <!-- website link -->
<meta property="og:title" content="Avo Food - Avon Old Farms School"/> <!-- title shown in the actual shared post -->
<meta property="og:description" content="Meal information provider for Avon Old Farms School." /> <!-- description shown in the actual shared post -->
<meta property="og:image" content="" /> <!-- image link, make sure it's jpg -->
<meta property="og:url" content="" /> <!-- where do you want your post to link to -->
<meta property="og:type" content="article" />
<!-- Website Title -->
<title>Avo Food - Avon Old Farms School</title>
<!-- Styles -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:500,700&display=swap&subset=latin-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600&display=swap&subset=latin-ext" rel="stylesheet">
<link id="pagebootstrap" href="css/bootstrap.css" rel="stylesheet">
<link href="css/fontawesome-all.css" rel="stylesheet">
<link href="css/swiper.css" rel="stylesheet">
<link href="css/magnific-popup.css" rel="stylesheet">
<link id="pagestyle" href="css/styles.css" rel="stylesheet">
<link rel="stylesheet" href="//code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" />
<script src="js/jquery.min.js"></script> <!-- jQuery for Bootstrap's JavaScript plugins -->
<script src="//code.jquery.com/ui/1.8.18/jquery-ui.min.js"></script>
<script>
$(function() {
$("#datePick").datepicker({
dateFormat: 'yy-mm-dd',
onSelect:function(dateText, inst) {
console.log(dateText);
console.log(inst);
}
});
});
</script>
<!-- Dark Mode Support -->
<script>
var dark = false;
function swapStyleSheet(){
if (dark) {
document.getElementById('pagebootstrap').setAttribute('href', "css/bootstrap.css");
document.getElementById('pagestyle').setAttribute('href', "css/styles.css");
dark = false;
} else {
document.getElementById('pagebootstrap').setAttribute('href', "css/bootstrap-dark.css");
document.getElementById('pagestyle').setAttribute('href', "css/styles-dark.css");
dark = true;
}
}
</script>
<!-- Google Login -->
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="340618285609-r6colaj22eh4tn822j4723t8bolhsobb.apps.googleusercontent.com">
<script>
var currentBreakfast, currentLunch, currentDinner;
var periodBreakfast, periodLunch, periodDinner;
function startup() {
var date = new Date();
document.getElementById("loginInfo").innerHTML = "Hi there! Please Sign in with Avon Old Farms school account to vote on your favorite menu!";
document.getElementById("datePick").value = (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear();
currentBreakfast = requestCallback("breakfast", date);
currentLunch = requestCallback("lunch", date);
currentDinner = requestCallback("dinner", date);
//data = requestCallback("breakfast", new Date("2020-02-01"));
}
function periodCallback () {
}
async function requestCallback(type, date) {
var time = "/" + date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
var url = "https://avonoldfarms.flikisdining.com/menu/api/weeks/school/avon-old-farms/menu-type/" + type + time + "?format=json-p";
var returnData;
await $.ajax({
url: url,
dataType: 'jsonp',
success: function (data, status) {
console.log("Meal information callback successful.")
returnData = data;
},
error: function(XHR, textStatus, errorThrown) {
console.log("error: " + textStatus);
console.log("error: " + errorThrown);
returnData = false;
}
});
return returnData;
}
function onSuccess(googleUser) {
if (googleUser.isSignedIn()){
var profile = googleUser.getBasicProfile();
if (!profile.getEmail().endsWith('@avonoldfarms.com')) {
alert('You\'re not logged in with Avon Old Farms account.\nPlease login with @avonoldfarms.com account.\n(This is necessary to prevent duplicate voting.)');
document.getElementById("loginInfo").innerHTML = "To prevent duplicate voting, you should be logged in with the Avon Old Farms account.";
signOut(); // Sign out
} else {
document.getElementById("loginInfo").innerHTML = "Hi, " + profile.getName() + "!";
//console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
//console.log('Name: ' + profile.getName());
//console.log('Image URL: ' + profile.getImageUrl());
//console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
}
}
function testfun() {
var auth2 = gapi.auth2.getAuthInstance();
var user = auth2.currentUser.get();
var profile = user.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
}
function onFailure(error) {
console.log(error);
}
function renderButton() {
gapi.signin2.render('my-signin2', {
'scope': 'profile email',
'width': 240,
'height': 50,
'longtitle': true,
'theme': 'dark',
'onsuccess': onSuccess,
'onfailure': onFailure
});
}
jQuery.browser = {};
(function () {
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
jQuery.browser.msie = true;
jQuery.browser.version = RegExp.$1;
}
})();
</script>
<!-- Favicon -->
<link rel="icon" href="images/AVO_Blue.svg">
</head>
<body data-spy="scroll" data-target=".fixed-top">
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark navbar-custom fixed-top">
<!-- Image Logo -->
<a class="navbar-brand logo-image" href="index.html"><img src="images/AVO_White.svg" alt="alternative"></a>
<!-- Dark Mode Toggle Button -->
<a class="navbar-nav ml-auto">
<span class="fas fa-moon fa-2x" onclick="swapStyleSheet()">
</a>
</nav> <!-- end of navbar -->
<!-- end of navbar -->
<!-- Header -->
<header id="header" class="header">
<div class="header-content">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="text-container">
<h1>Avo Food</h1>
<p class="p-heading p-large">We provide meal information at Avon Old Farms School.</p>
</div>
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of header-content -->
</header> <!-- end of header -->
<!-- end of header -->
<!-- Intro -->
<div id="intro" class="basic-1">
<div class="container">
<div class="row">
<div class="text-container">
<div class="section-title">Avo Food</div>
<h2>Welcome to Avon Old Farms Refectory!</h2>
</div> <!-- end of text-container -->
</div> <!-- end of row -->
<!-- Details 2 -->
<div class="tabs">
<div class="basic-1">
<div class="container">
<!-- Tabs Links -->
<ul class="nav nav-tabs" id="ariaTabs" role="tablist">
<li class="nav-item">
<a class="nav-link" id="nav-tab-1" data-toggle="tab" href="#tab-1" role="tab" aria-controls="tab-1" aria-selected="false"><i class="fas fa-th"></i> Selected Period </a>
</li>
<li class="nav-item">
<a class="nav-link active" id="nav-tab-2" data-toggle="tab" href="#tab-2" role="tab" aria-controls="tab-2" aria-selected="true"><i class="fas fa-th"></i> This Week </a>
</li>
<li class="nav-item">
<a class="nav-link" id="nav-tab-3" data-toggle="tab" href="#tab-3" role="tab" aria-controls="tab-3" aria-selected="false"><i class="fas fa-th"></i> Vote </a>
</li>
</ul>
<!-- end of tabs links -->
<!-- Tabs Content -->
<div class="tab-content" id="ariaTabsContent">
<!-- Tab -->
<div class="tab-pane fade" id="tab-1" role="tabpanel" aria-labelledby="tab-1">
<h2>This section is not supported yet.</h2>
<input type="text" id="datePick" name="datePick" value="10/24/1984"/>
<!-- LastWeekDropDown -->
</div> <!-- end of tab-pane -->
<!-- end of tab -->
<!-- Tab -->
<div class="tab-pane fade active show" id="tab-2" role="tabpanel" aria-labelledby="tab-2">
<!-- ThisWeekDropDown -->
</div> <!-- end of tab-pane -->
<!-- end of tab -->
<!-- Tab -->
<div class="tab-pane fade" id="tab-3" role="tabpanel" aria-labelledby="tab-3">
<h2>Vote</h2>
<h4 id="loginInfo">It seems like your web browser does not support JavaScript.</h4>
<p>Vote on your favorite! Tell us which was good! Share your idea!</p>
<div id="my-signin2"></div>
<a class="btn-solid-lg page-scroll" href="javascript:testfun">Vote Results for Yesterday</a>
<a class="btn-solid-lg page-scroll" href="#intro">View All History</a>
<input type="button" class="btn-solid-lg page-scroll" onclick="testfun();" value="test">
<input type="button" class="btn-solid-lg page-scroll" onclick="signOut();" value="sign out">
</div> <!-- end of tab-pane -->
<!-- end of tab -->
</div> <!-- end of tab-content -->
<!-- end of tabs content -->
</div> <!-- end of tabs-container -->
</div><!-- end of area-1 on same line and no space between comments to eliminate margin white space -->
</div> <!-- end of tabs -->
<!-- end of details 2 -->
</div> <!-- end of container -->
</div> <!-- end of basic-1 -->
<!-- end of intro -->
<!-- Team -->
<div class="basic-2">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>Contributors</h2>
<p class="p-heading">It was impossible without the contribution of these people.</p>
</div> <!-- end of col -->
</div> <!-- end of row -->
<div class="row">
<div class="col-lg-12">
<!-- Team Member -->
<div class="team-member">
<div class="image-wrapper">
<img class="img-fluid" src="images/HectorVazquez.png" alt="alternative">
</div> <!-- end of image-wrapper -->
<p class="p-large">Hector Vazquez</p>
<p class="job-title">Executive Chef at Avon Old Farms School</p>
<span class="social-icons">
<span class="fa-stack">
<a href="mailto:vazquezh@avonoldfarms.com">
<span class="hexagon"></span>
<i class="fas fa-envelope fa-stack-1x"></i>
</a>
</span>
</span>
</div> <!-- end of team-member -->
<!-- end of team member -->
<!-- Team Member -->
<div class="team-member">
<div class="image-wrapper">
<img class="img-fluid" src="images/SpencerLi.png" alt="alternative">
</div> <!-- end of image wrapper -->
<p class="p-large">Spencer Li</p>
<p class="job-title">Backend / Frontend Developer</p>
<span class="social-icons">
<span class="fa-stack">
<a href="mailto:lis@avonoldfarms.com">
<span class="hexagon"></span>
<i class="fas fa-envelope fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://github.com/MovoLovo">
<span class="hexagon"></span>
<i class="fab fa-github fa-stack-1x"></i>
</a>
</span>
</span>
</div> <!-- end of team-member -->
<!-- end of team member -->
<!-- Team Member -->
<div class="team-member">
<div class="image-wrapper">
<img class="img-fluid" src="images/JunPark.png" alt="alternative">
</div> <!-- end of image wrapper -->
<p class="p-large">Jun Park</p>
<p class="job-title">Backend / Frontend Developer</p>
<span class="social-icons">
<span class="fa-stack">
<a href="mailto:junpark0207@gmail.com">
<span class="hexagon"></span>
<i class="fas fa-envelope fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://github.com/Nitro1231">
<span class="hexagon"></span>
<i class="fab fa-github fa-stack-1x"></i>
</a>
</span>
</span>
</div> <!-- end of team-member -->
<!-- end of team member -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-2 -->
<!-- end of team -->
<!-- Contact -->
<div id="contact" class="form-2">
<div class="container">
<div class="row">
<div class="col-lg-6">
<div class="text-container">
<div class="section-title">INFO</div>
<h2>About Avo</h2>
<p>We are the separated and independent student community development team. We consider the student's inconvenience and develop a product that can solve the problem.</p>
<ul class="list-unstyled li-space-lg">
<li class="address"><i class="fas fa-map-marker-alt"></i>500 Old Farms Rd, Avon, CT 06001, United States</li>
<li><i class="fab fa-discord"></i><a href="">Spencillian#6315</a></li>
<li><i class="fab fa-discord"></i><a href="">Nitro#1781</a></li>
</br>
<li><i class="fas fa-envelope"></i><a href="mailto:lis@avonoldfarms.com">lis@avonoldfarms.com</a></li>
<li><i class="fas fa-envelope"></i><a href="mailto:junpark0207@gmail.com">junpark0207@gmail.com</a></li>
</ul>
<h3>More information about team Avo</h3>
<span class="fa-stack">
<a href="https://github.com/TeamAvo">
<span class="hexagon"></span>
<i class="fab fa-github fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://teamavo.github.io">
<span class="hexagon"></span>
<i class="far fa-paper-plane fa-stack-1x"></i>
</a>
</span>
</div> <!-- end of text-container -->
</div> <!-- end of col -->
<div class="col-lg-6">
<div class="image-container">
<img class="img-fluid" src="images/2016boys_waiter_with_mascot.jpg" alt="alternative">
</div> <!-- end of image-container -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of form-2 -->
<!-- end of contact -->
<!-- Copyright -->
<div class="copyright">
<div class="container">
<div class="row">
<div class="col-lg-12">
<p class="p-small">Copyright © 2020 <a href="https://inovatik.com">Template by Inovatik</a></p>
<p class="p-small">Copyright © 2020 Avo</p>
</div> <!-- end of col -->
</div> <!-- enf of row -->
</div> <!-- end of container -->
</div> <!-- end of copyright -->
<!-- end of copyright -->
<!-- Scripts -->
<script src="js/popper.min.js"></script> <!-- Popper tooltip library for Bootstrap -->
<script src="js/bootstrap.min.js"></script> <!-- Bootstrap framework -->
<script src="js/jquery.easing.min.js"></script> <!-- jQuery Easing for smooth scrolling between anchors -->
<script src="js/swiper.min.js"></script> <!-- Swiper for image and text sliders -->
<script src="js/jquery.magnific-popup.js"></script> <!-- Magnific Popup for lightboxes -->
<script src="js/morphext.min.js"></script> <!-- Morphtext rotating text in the header -->
<script src="js/isotope.pkgd.min.js"></script> <!-- Isotope for filter -->
<script src="js/validator.min.js"></script> <!-- Validator.js - Bootstrap plugin that validates forms -->
<script src="js/scripts.js"></script> <!-- Custom scripts -->
<script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script> <!-- Google sign in button custom -->
<script>window.onload = startup();</script>
</body>
</html>