forked from firebase/friendlyeats-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
363 lines (333 loc) · 13.9 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
<!doctype html>
<!--
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Learn how to use the Firebase platform on the Web">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FriendlyEats</title>
<!-- Disable tap highlight on IE -->
<meta name="msapplication-tap-highlight" content="no">
<link rel="icon" href="images/favicon.ico">
<!-- Web Application Manifest -->
<link rel="manifest" href="manifest.json">
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="FriendlyEats">
<meta name="theme-color" content="#4285F4">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="FriendlyEats">
<meta name="apple-mobile-web-app-status-bar-style" content="#4285F4">
<!-- Tile icon for Win8 -->
<!-- <meta name="msapplication-TileColor" content="#3372DF">
<meta name="msapplication-navbutton-color" content="#303F9F"> -->
<!-- Material Design Components -->
<link rel="stylesheet"
href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.js"></script>
<!-- App Styling -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="/styles/main.css">
</head>
<body>
<div>
<div class="header"></div>
<main></main>
<div class="dialogs"></div>
<div hidden class="template" id="header-base">
<header id="site-header" class="mdc-toolbar mdc-toolbar--fixed">
<div id="title" class="mdc-toolbar__row mdc-layout-grid">
<section class="mdc-toolbar__section mdc-toolbar__section--align-start">
<span class="material-icons mdc-toolbar__icon--menu">restaurant</span>
<span class="mdc-toolbar__title">FriendlyEats</span>
</section>
</div>
<div id="section-header" data-fir-if="hasSectionHeader"></div>
</header>
</div>
<div hidden class="template" id="main-adjusted">
<div id="message-cards-container" class="mdc-layout-grid mdc-toolbar-fixed-adjust">
<div id="cards" class="mdc-layout-grid__inner"></div>
</div>
</div>
<div hidden class="template" id="main">
<div id="message-cards-container" class="mdc-layout-grid">
<div id="cards" class="mdc-layout-grid__inner"></div>
</div>
</div>
<div hidden class="template" id="no-restaurants">
<div id="guy-container" class="mdc-toolbar-fixed-adjust">
<img class="guy" src="/images/guy_fireats.png" />
<div class="text">
This app is connected to the Firebase project "<b data-fir-content="projectId"></b>".<br />
<br />
Your Cloud Firestore has no documents in <b>/restaurants/</b>.
</div>
<br />
<a class="mdc-button" id="add_mock_data">
Add mock data
</a>
</div>
</div>
<div hidden class="template" id="no-ratings">
<div id="guy-container" class="mdc-toolbar-fixed-adjust">
<img class="guy" src="/images/guy_fireats.png" />
<div class="text">
This restaurant has no ratings.<br />
</div>
<br />
<a class="mdc-button" data-fir-click="add_mock_data">
Add mock ratings
</a>
</div>
</div>
<div hidden class="template" id="no-results">
<div id="guy-container" class="mdc-toolbar-fixed-adjust">
<img class="guy" src="/images/guy_fireats.png" />
<div class="text">
There are no results for your those filters!
</div>
</div>
</div>
<div hidden class="template" id="filter-display">
<div id="filter" class="mdc-toolbar mdc-layout-grid">
<div id="show-filters" >
<div id="active-filters">
<i class="material-icons">filter_list</i>
You're seeing <b data-fir-content="filter_description"></b>
</div>
</div>
</div>
</div>
<div hidden class="template" id="restaurant-header">
<header class="mdc-layout__header mdc-layout__header--transparent" data-fir-style="backgroundImage:photo">
<div class="mdc-layout-grid" style="width: 100%;">
<div class="mdc-layout-grid__inner">
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
<a href="/" data-navigo class="material-icons" id="close">close</a>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12 info">
<div class="max_width_600">
<h2 data-fir-content="name"></h2>
<span class="price"></span>
<div class="rating"></div>
<div class="details">
<span class="rating"></span>
<span data-fir-content="category"></span>
<span class="light">●</span>
<span data-fir-content="city"></span>
</div>
<button id="show-add-review" data-fir-click="show_add_review" class="mdc-button fab">
<i class="material-icons">add</i>
</button>
</div>
</div>
</div>
</div>
</header>
</div>
<div hidden class="template" id="rating"></div>
<span hidden class="template" id="price"></span>
<div hidden class="template mdc-layout-grid__cell--span-12" id="review-card">
<div class="review max_width_600">
<div class="header">
<div class="author">
<span class="light" data-fir-content="userName"></span>
</div>
<div class="rating"></div>
</div>
<div data-fir-content="text"></div>
</div>
</div>
<div hidden class="template mdc-layout-grid__cell mdc-layout-grid__cell--span-4" id="restaurant-card">
<div class="location-card mdc-card mdc-shadow--2dp" data-fir-click="go_to_restaurant">
<div class="mdc-card__title" data-fir-style="backgroundImage:photo"></div>
<div class="mdc-card__supporting-text">
<h2 data-fir-content="name">...</h2>
<span class="info price"></span>
<div class="details">
<div class="rating"></div>
</div>
<div class="details">
<span class="info" data-fir-content="category"></span>
<span class="light">●</span>
<span class="info" data-fir-content="city"></span>
</div>
</div>
</div>
</div>
<i hidden class="template material-icons" id="star-border-icon">star_border</i>
<i hidden class="template material-icons" id="star-icon">star</i>
<ul hidden class="template mdc-list" id="item-list">
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple" data-fir-foreach="items" data-fir-content="~"></li>
</ul>
<ul hidden class="template mdc-list" id="all-filters-list">
<li id="show-page-category" class="mdc-list-item" data-mdc-auto-init="MDCRipple">
<i class="material-icons">fastfood</i>
<span data-fir-if-not="category">Any Category</span>
<b data-fir-content="category"></b>
</li>
<li id="show-page-city" class="mdc-list-item" data-mdc-auto-init="MDCRipple">
<i class="material-icons">location_on</i>
<span data-fir-if-not="city">Any Location</span>
<b data-fir-content="city"></b>
</li>
<li id="show-page-price" class="mdc-list-item" data-mdc-auto-init="MDCRipple">
<i class="material-icons">monetization_on</i>
<span data-fir-if-not="price">Any Price</span>
<b data-fir-content="price"></b>
</li>
<li id="show-page-sort" class="mdc-list-item" data-mdc-auto-init="MDCRipple">
<i class="material-icons">sort</i>
<b data-fir-content="sort"></b>
</li>
</ul>
<aside id="dialog-filter-all" class="mdc-dialog">
<div class="mdc-dialog__surface">
<div class="page" id="page-all">
<header class="mdc-dialog__header">
<i class="material-icons">filter_list</i>
<h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
Filter
</h2>
</header>
<section class="mdc-dialog__body mdc-dialog__body--scrollable">
<div id="all-filters-list"></div>
</section>
<footer class="mdc-dialog__footer">
<button type="button" class="mdc-button mdc-dialog__footer__button mdc-dialog__footer__button--accept">Accept</button>
</footer>
</div>
<div class="page" id="page-category">
<header class="mdc-dialog__header">
<i class="material-icons">fastfood</i>
<h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
Category
</h2>
</header>
<section class="mdc-dialog__body mdc-dialog__body--scrollable">
<div id="category-list"></div>
</section>
<footer class="mdc-dialog__footer">
<button type="button" class="mdc-button mdc-dialog__footer__button back">Back</button>
</footer>
</div>
<div class="page" id="page-city">
<header class="mdc-dialog__header">
<i class="material-icons">location_on</i>
<h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
Location
</h2>
</header>
<section class="mdc-dialog__body mdc-dialog__body--scrollable">
<div id="city-list"></div>
</section>
<footer class="mdc-dialog__footer">
<button type="button" class="mdc-button mdc-dialog__footer__button back">Back</button>
</footer>
</div>
<div class="page" id="page-price">
<header class="mdc-dialog__header">
<i class="material-icons">monetization_on</i>
<h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
Price
</h2>
</header>
<section class="mdc-dialog__body mdc-dialog__body--scrollable">
<ul class="mdc-list">
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
Any
</li>
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
$
</li>
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
$$
</li>
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
$$$
</li>
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
$$$$
</li>
</ul>
</section>
<footer class="mdc-dialog__footer">
<button type="button" class="mdc-button mdc-dialog__footer__button back">Back</button>
</footer>
</div>
<div class="page" id="page-sort">
<header class="mdc-dialog__header">
<i class="material-icons">sort</i>
<h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
Sort By
</h2>
</header>
<section class="mdc-dialog__body mdc-dialog__body--scrollable">
<ul class="mdc-list">
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
Rating
</li>
<li class="mdc-list-item" data-mdc-auto-init="MDCRipple">
Reviews
</li>
</ul>
</section>
<footer class="mdc-dialog__footer">
<button type="button" class="mdc-button mdc-dialog__footer__button back">Back</button>
</footer>
</div>
</div>
<div class="mdc-dialog__backdrop"></div>
</aside>
<aside id="dialog-add-review"
class="mdc-dialog">
<div class="mdc-dialog__surface">
<header class="mdc-dialog__header">
<h2 id="my-mdc-dialog-label" class="mdc-dialog__header__title">
Add a Review
</h2>
</header>
<section class="mdc-dialog__body">
<div class="star-input">
<i class="material-icons">star_border</i>
<i class="material-icons">star_border</i>
<i class="material-icons">star_border</i>
<i class="material-icons">star_border</i>
<i class="material-icons">star_border</i>
</div>
<textarea id="text"></textarea>
</section>
<footer class="mdc-dialog__footer">
<button type="button" class="mdc-button mdc-dialog__footer__button mdc-dialog__footer__button--cancel">Cancel</button>
<button type="button" class="mdc-button mdc-dialog__footer__button mdc-dialog__footer__button--accept">Save</button>
</footer>
</div>
<div class="mdc-dialog__backdrop"></div>
</aside>
</div>
<script src="/__/firebase/4.6.0/firebase.js"></script>
<script src="/__/firebase/4.6.0/firebase-firestore.js"></script>
<script src="/__/firebase/init.js"></script>
<script src="//unpkg.com/navigo@6"></script>
<script src="/scripts/FriendlyEats.js"></script>
<script src="/scripts/FriendlyEats.View.js"></script>
<script src="/scripts/FriendlyEats.Mock.js"></script>
<script src="/scripts/FriendlyEats.Data.js"></script>
</body>
</html>