-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
338 lines (324 loc) · 13.5 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
<!DOCTYPE html>
<!-- Copyright (c) 2021 Ruofan Chen, Samm Du, Nada Eldin, Shalev Lifshitz
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:
http://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" dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AutoDirect</title>
<!--[if IE
]><link rel="shortcut icon" href="assets/icons/favicon.ico"
/><![endif]-->
<link rel="apple-touch-icon" href="assets/icons/favicon_180.png" />
<link rel="icon" href="assets/icons/favicon_196.png" />
<meta name="theme-color" content="#36cf9b" />
<!-- Stylesheets -->
<link rel="stylesheet" href="css/minireset.min.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/index.css" />
<!-- Scripts -->
<script
type="text/javascript"
src="js/mustache-4.2.0.min.js"
defer
></script>
<script type="text/javascript" src="js/main.js" defer></script>
<script type="text/javascript" src="js/api.js" defer></script>
<script type="text/javascript" src="js/discover.js" defer></script>
</head>
<body>
<main>
<aside>
<section class="card border-thin sec-inputs">
<header>
<img
src="assets/icons/senso_logo_text_dark-min.svg"
alt="Senso.AI logo"
/>
<h1><a href="/">AutoDirect</a></h1>
</header>
<article id="side-agreement">
<div class="inset-content">
<h3>You will be able to:</h3>
<ul>
<li>Browse cars that you can afford</li>
<li>
Get exclusive loan offers at competitive
rates tailored for you
</li>
</ul>
<h3>You need to:</h3>
<ul>
<li>
Agree to share your credit profile with us
</li>
<li>Agree to our terms of service</li>
</ul>
<button
type="button"
name="login"
class="btn-red"
onclick="userLogin();"
>
Agree & continue
</button>
</div>
</article>
<article id="side-params" style="display: none">
<form
id="form-finanicals"
onsubmit="submitSearch(); return false;"
>
<div class="inset-content">
<label for="budget_mo"
><h3>Monthly budget:</h3></label
>
<input
class="round-empty-pill"
type="number"
name="budget_mo"
placeholder="300.00"
/>
<label for="down_payment"
><h3>Down payment:</h3></label
>
<input
class="round-empty-pill"
type="number"
name="down_payment"
placeholder="1000.00"
/>
</div>
<button
type="submit"
name="updateFinancials"
class="btn-green rounded-bottom"
>
Find your car
</button>
</form>
</article>
</section>
<section
class="card border-thin sec-claimed-offers"
id="claimedOffersWidget"
style="display: none"
>
<header class="region-dark">
<img
src="./assets/icons/heart-filled-red-min.svg"
alt="Heart icon"
/>
<h3>Your loan offers</h3>
</header>
<ul class="loan-offers" id="loanOffersContainer"></ul>
<a
id="offersDetailsLink"
class="round-empty-pill"
href="./details.html"
style="visibility: hidden"
>
See all offer details
</a>
</section>
</aside>
<section>
<nav class="search-bar card region-dark">
<span class="sort-combo">
<button
type="button"
name="sortOrder"
id="sortOrder"
onclick="toggleSortOrder();"
>
<img
id="sortIcon"
src="assets/icons/sort-top-down-min.svg"
alt="Sort order toggle"
/>
</button>
<select
name="sortBy"
id="sortBy"
onchange="setSortByFromElement();"
>
<option value="price" selected>Retail price</option>
</select>
</span>
</nav>
<div
class="cars-container"
id="carsContainer"
onload="demoAddDummyCars();"
></div>
</section>
</main>
<footer class="region-dark">
<div class="footer-spacer"></div>
<section class="license">
<article>
<p>
<b>
Copyright © 2021 Ruofan Chen, Samm Du, Nada
Eldin, Shalev Lifshitz
</b>
</p>
<p>
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:
</p>
<p class="indented">
<a
href="https://www.apache.org/licenses/LICENSE-2.0"
target="_blank"
class="link-light"
rel="noopener"
>
https://www.apache.org/licenses/LICENSE-2.0
</a>
</p>
<p>
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.
</p>
</article>
</section>
<aside class="attrib">
<div class="attrib-child">
<h3>Source code at:</h3>
<a
href="https://github.com/TLI-Group-1"
target="_blank"
rel="noopener"
>
<img
src="assets/icons/github_button-min.svg"
alt="GitHub logo"
class="btn-shifty"
/>
</a>
</div>
<div class="attrib-child">
<h3>Powered by:</h3>
<a href="https://senso.ai/" target="_blank" rel="noopener">
<img
src="assets/icons/senso_logo_text_light-min.svg"
alt="Senso.AI logo"
class="btn-shifty"
/>
</a>
</div>
</aside>
<div class="footer-spacer"></div>
</footer>
<!-- Mustache templates below; rendered in JavaScript -->
<script type="text/html" id="tmpl_SortOptions">
<option value="interest_rate">Interest rate</option>
<option value="payment_mo">Monthly payment</option>
<option value="total_sum">Total cost</option>
<option value="term_mo">Loan term length</option>
</script>
<script type="text/html" id="tmpl_CarOffer">
<div class="car-offer card border-thin">
<img src="assets/img/car-1.jpg" alt="Placeholder car image" />
<article>{{&car_info}} {{&loan_info}}</article>
{{&button}}
</div>
</script>
<script type="text/html" id="tmpl_CarOfferCarInfo">
<div class="car-info-pair">
<h5>Make:</h5>
<span>{{make}}</span>
</div>
<div class="car-info-pair">
<h5>Model:</h5>
<span>{{model}}</span>
</div>
<div class="car-info-pair">
<h5>Year:</h5>
<span>{{year}}</span>
</div>
<div class="car-info-pair">
<h5>Usage:</h5>
<span>{{kms}} km</span>
</div>
<div class="car-info-pair">
<h5>Retail price:</h5>
<span>${{price}}</span>
</div>
<div class="car-info-pair" style="visibility: hidden;"></div>
</script>
<script type="text/html" id="tmpl_CarOfferLoanInfo">
<div class="car-info-pair">
<h5>Interest rate:</h5>
<span class="green-text">{{interest_rate}}%</span>
</div>
<div class="car-info-pair">
<h5>You pay:</h5>
<span class="green-text">${{payment_mo}}/mo</span>
</div>
<div class="car-info-pair">
<h5>Loan term:</h5>
<span class="green-text">{{loan_term}} months</span>
</div>
<div class="car-info-pair">
<h5>Total cost:</h5>
<span class="green-text">${{total_sum}}</span>
</div>
</script>
<script type="text/html" id="tmpl_CarOfferBtnUnavailable">
<button
type="button"
class="region-gray rounded-bottom claim-unavailable"
>
Agree to view offers
</button>
</script>
<script type="text/html" id="tmpl_CarOfferBtnAvailable">
<button
type="button"
class="claim-btn rounded-bottom"
name="{{id}}"
onclick="toggleClaimOffer(this.name);"
>
<span class="btn-dark-blue claim-text">Claim this offer</span>
<span class="btn-red bg-heart-empty claim-heart"></span>
</button>
</script>
<script type="text/html" id="tmpl_LoanOffer">
<li class="loan-offer-entry">
<a
href="./details.html?user_id={{user_id}}&offerSelected={{offer_id}}"
>
<img
src="./assets/img/car-1.jpg"
alt="Placeholder car image"
/>
<div class="loan-offer-summary">
<span class="offer-car-info"
>{{make}} {{model}} {{year}}</span
>
<span class="offer-loan-info"
>${{payment_mo}}/mo · {{loan_term}} months
· {{interest_rate}}%</span
>
</div>
</a>
</li>
</script>
</body>
</html>