forked from udacity/mws-restaurant-stage-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrestaurant.html
152 lines (137 loc) · 5.17 KB
/
restaurant.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Normalize.css for better cross-browser consistency -->
<link rel="stylesheet" src="//normalize-css.googlecode.com/svn/trunk/normalize.css" />
<link rel="preload" href="dest/styles.css" as="style">
<link rel="stylesheet" href="dest/styles.css" type="text/css">
<link rel="preload" href="dest/restaurant_info.js" as="script">
<title>Restaurant Info</title>
</head>
<body class="inside">
<!-- Beginning header -->
<header>
<!-- Beginning nav -->
<nav>
<h1><a href="/">Restaurant Reviews</a></h1>
</nav>
<!-- Beginning breadcrumb -->
<ul id="breadcrumb" >
<li><a id="breadcrumbref" href="/">Home</a></li>
</ul>
<!-- End breadcrumb -->
<!-- End nav -->
</header>
<!-- End header -->
<!-- Beginning main -->
<main id="maincontent" role="main">
<!-- Beginning map -->
<section id="map-container">
<div id="map" role="application" aria-label="google map" tabindex="-1" aria-hidden="true"></div>
</section>
<!-- End map -->
<div>
<h2 id="restaurant-name"></h2>
</div>
<!-- Beginning restaurant -->
<div id="restaurant-contents">
<section id="restaurant-container">
<img id="restaurant-img">
<p id="restaurant-cuisine"></p>
<p id="restaurant-address"></p>
<table id="restaurant-hours"></table>
</section>
<!-- end restaurant -->
<!-- Beginning reviews -->
<section id="reviews-container">
<ul id="reviews-list"></ul>
</section>
</div>
<!-- End reviews -->
</main>
<!-- End main -->
<!-- Beginning footer -->
<footer id="footer">
Copyright (c) 2018 <a id="footerref" href="/"><strong>Restaurant Reviews</strong></a> All Rights Reserved.
</footer>
<!-- End footer -->
<div id="reviewform" role="form" aria-label="review form" aria-hidden="true">
<div id="popupReview">
<img id="close-img" src="icons/close.png" onclick="div_hide()" role="button" aria-label="close button" tabindex="0">
<form action="#" id="form" method="post" name="form">
<h2>Write Review</h2>
<div class="form-group">
<input id="name" name="name" placeholder="Name" type="text" tabindex="0">
<div class="fav-checkbox form-control-inline">
<label for="favorite">Favorite?</label>
<input id="favorite" name="favorite" type="checkbox" tabindex="0">
</div>
</div>
<input id="rating" name="rating" placeholder="Rating (1-6)" type="text" tabindex="0">
<textarea id="msg" name="review" placeholder="Review" tabindex="0"></textarea>
<a href="javascript:%20check_empty()" id="submit" role="button" aria-label="submit button" tabindex="0">Send</a>
</form>
</div>
</div>
<!-- Beginning scripts -->
<!-- Main javascript file -->
<script type="text/javascript" src="dest/restaurant_info.js"></script>
<!-- Google Maps -->
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAq5NHLNEo4kP8bRAwMQe_VnOJb6eZxnkM&libraries=places&callback=initMap"></script>
<script>
var prevfocus = document.querySelector('#breadcrumbref');
var nextFocus = document.querySelector('#restaurant-name');
prevfocus.onkeydown = function(event) {
if (event.keyCode == 9 && !event.shiftKey) { // TAB
event.preventDefault();
nextFocus.focus();
return false;
}
return true;
};
nextFocus.onkeydown = function(event) {
if (event.keyCode == 9 && event.shiftKey) { // Shift+TAB
event.preventDefault();
prevfocus.focus();
return false;
}
return true;
};
var prevfocusDialog = document.querySelector('#submit');
var nextFocusDialog = document.querySelector('#close-img');
prevfocusDialog.onkeydown = function(event) {
if (event.keyCode == 9 && !event.shiftKey) { // TAB
event.preventDefault();
nextFocusDialog.focus();
return false;
}
return true;
};
nextFocusDialog.onkeydown = function(event) {
if (event.keyCode == 9 && event.shiftKey) { // Shift+TAB
event.preventDefault();
prevfocusDialog.focus();
return false;
}
return true;
};
document.onkeydown = function(event) {
if (event.keyCode == 27) { // escape key maps to keycode `27`
event.preventDefault();
document.getElementById('reviewform').style.display = "none";
return false;
}
return true;
};
if ('serviceWorker' in navigator) {
// Recommended to register onLoad
window.addEventListener('load', function() {
navigator.serviceWorker.register('./sw.min.js', {scope: './'});
});
}
</script>
<!-- End scripts -->
</body>
</html>