-
Notifications
You must be signed in to change notification settings - Fork 4
/
home.html
306 lines (270 loc) · 10.9 KB
/
home.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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="Bootstrap-ecommerce by Vosidiy">
<title>Home</title>
<link rel="shortcut icon" type="image/x-icon" href="images/icons/burger-icon2.jpg">
<!-- jQuery -->
<script src="js/jquery-2.0.0.min.js" type="text/javascript"></script>
<!-- Bootstrap4 files-->
<script src="js/bootstrap.bundle.min.js" type="text/javascript"></script>
<link href="css/bootstrap-custom.css" rel="stylesheet" type="text/css" />
<!-- Font awesome 5 -->
<link href="fonts/fontawesome/css/fontawesome-all.min.css" type="text/css" rel="stylesheet">
<!-- plugin: fancybox -->
<script src="plugins/fancybox/fancybox.min.js" type="text/javascript"></script>
<link href="plugins/fancybox/fancybox.min.css" type="text/css" rel="stylesheet">
<!-- plugin: owl carousel -->
<link href="plugins/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
<link href="plugins/owlcarousel/assets/owl.theme.default.css" rel="stylesheet">
<script src="plugins/owlcarousel/owl.carousel.min.js"></script>
<!-- custom style -->
<link href="css/uikit.css" rel="stylesheet" type="text/css" />
<link href="css/responsive.css" rel="stylesheet" media="only screen and (max-width: 1200px)" />
<!-- custom javascript -->
<script src="js/script.js" type="text/javascript"></script>
<!-- PWA Manifest -->
<link rel="manifest" href="manifest.json">
<script type="text/javascript">
var product;
$(document).ready(function () {
$.getJSON("product.json", function (json) {
product = json
});
// Update navigation bar based on whether user logged in
var login_user = sessionStorage.getItem("login_user")
if (!login_user)
$(".need-login").addClass("d-none")
else
$(".no-login").addClass("d-none")
// Update cart number
var cart = JSON.parse(sessionStorage.getItem("cart"))
var cart_num = 0
if (cart)
cart_num = cart.length
$("#cartCounter").text(cart_num)
});
function productPage(i) {
event.preventDefault()
console.log(product[i])
sessionStorage.setItem("selectedProduct", JSON.stringify(product[i]))
window.location.href = "/product.html"
}
// jquery end
</script>
</head>
<body>
<header class="section-header">
<nav class="navbar navbar-top navbar-expand-lg navbar-dark bg-secondary">
<div class="container">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="home.html">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item no-login">
<a class="nav-link" href="login.html">Login <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item no-login">
<a class="nav-link" href="sign_up.html">Register <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown need-login">
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"> My account </a>
<ul class="dropdown-menu">
<li> <a class="dropdown-item" href="view_order.html"> My Orders </a></li>
<li> <a class="dropdown-item" href="checkout.html"> My Shopping Cart </a></li>
<li> <a class="dropdown-item" href="#" onclick="logOut()"> Log out </a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="about_us.html">About Us <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact_us.html">Contact Us<span
class="sr-only">(current)</span></a>
</li>
<li class="nav-item" id="installBanner">
<a id="installBtn" class="nav-link" href="#">Install app<span
class="sr-only">(current)</span></a>
</li>
</ul>
</div>
</div> <!-- container // -->
</nav>
<section class="header-main shadow-sm">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-3 col-sm-4">
<a href="home.html" class="brand-wrap">
<img class="logo" src="images/icons/burger-icon2.jpg">
<h2 class="logo-text">IT Burger</h2>
</a> <!-- brand-wrap.// -->
</div>
<div class="col-lg-9 col-sm-8 need-login">
<div class="widgets-wrap float-right">
<a href="/checkout.html" class="widget-header mr-3">
<div class="icontext">
<div class="icon-wrap"><i class="icon-sm round border fa fa-shopping-cart"></i>
</div>
<div class="text-wrap">
<span id="cartCounter" class="small badge badge-danger"></span>
<div>Cart</div>
</div>
</div>
</a>
</div>
</div>
</div> <!-- container.// -->
</section> <!-- header-main .// -->
</header> <!-- section-header.// -->
<!-- ========================= SECTION MAIN ========================= -->
<section class="section-main bg padding-top-sm">
<div class="container">
<div class="row row-sm">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="card">
<div class="card-body">
<!-- ================= main slide ================= -->
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="images/banners/burger1.jpg" alt="First slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="images/banners/burger2.jpg" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="images/banners/burger3.jpg" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button"
data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button"
data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!-- ============== main slidesow .end // ============= -->
</div> <!-- card-body .// -->
</div> <!-- card.// -->
</div> <!-- col.// -->
<div class="col-md-1"></div>
</div>
</div> <!-- container .// -->
</section>
<!-- ========================= SECTION MAIN END// ========================= -->
<!-- ========================= SECTION CONTENT ========================= -->
<section class="section-content padding-y bg">
<div class="container">
<div class="card mb-3">
<div class="card-body">
<header class="section-heading">
<h4>Product</h4>
</header>
<!-- ============== owl slide items ============= -->
<div class="owl-carousel owl-init slide-items" data-items="5" data-margin="20" data-dots="true"
data-nav="true" id="product">
<div class="item-slide">
<figure class="card card-product">
<div class="img-wrap"> <img src="images/items/double-beef.jpg"> </div>
<figcaption class="info-wrap text-center">
<h6 class="title text-truncate"><a href="#" onclick="productPage(0)">Double Beef
Burger</a></h6>
<p>RM 14.90</p>
</figcaption>
</figure>
</div>
<div class="item-slide">
<figure class="card card-product">
<div class="img-wrap"> <img src="images/items/bacon-cheese.jpg"> </div>
<figcaption class="info-wrap text-center">
<h6 class="title text-truncate"><a href="#" onclick="productPage(1)">Bacon Cheese
Burger</a></h6>
<p>RM 10.50</p>
</figcaption>
</figure> <!-- card // -->
</div>
<div class="item-slide">
<figure class="card card-product">
<div class="img-wrap"> <img src="images/items/classic-chicken-burger.jpg"> </div>
<figcaption class="info-wrap text-center">
<h6 class="title text-truncate"><a href="#" onclick="productPage(2)">Classic Chicken
Burger</a></h6>
<p>RM 8.90</p>
</figcaption>
</figure> <!-- card // -->
</div>
<div class="item-slide">
<figure class="card card-product">
<div class="img-wrap"> <img src="images/items/cheese-burger.jpg"> </div>
<figcaption class="info-wrap text-center">
<h6 class="title text-truncate"><a href="#" onclick="productPage(3)">Cheese
Burger</a></h6>
<p>RM 11.90</p>
</figcaption>
</figure> <!-- card // -->
</div>
<div class="item-slide">
<figure class="card card-product">
<div class="img-wrap"> <img src="images/items/french-fries.jpg"> </div>
<figcaption class="info-wrap text-center">
<h6 class="title text-truncate"><a href="#" onclick="productPage(4)">French
Fries</a></h6>
<p>RM 3.00</p>
</figcaption>
</figure> <!-- card // -->
</div>
</div>
</div> <!-- card-body .// -->
</div> <!-- card.// -->
</div> <!-- container .// -->
</section>
<!-- ========================= SECTION CONTENT END// ========================= -->
<!-- ========================= FOOTER ========================= -->
<footer class="section-footer bg-secondary">
<div class="container">
<section class="footer-bottom row border-top-white">
<div class="col-sm-6">
<p class="text-white-50"> IT Burger</p>
</div>
<div class="col-sm-6 text-right">
<p class="text-sm-right text-white-50">
Copyright © 2018 <br>
<a href="http://bootstrap-ecommerce.com" class="text-white-50">Bootstrap-ecommerce UI kit</a>
</p>
</div>
</section> <!-- //footer-top -->
</div><!-- //container -->
</footer>
<!-- ========================= FOOTER END // ========================= -->
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API = Tawk_API || {}, Tawk_LoadStart = new Date();
(function () {
var s1 = document.createElement("script"), s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src = 'https://embed.tawk.to/5f59c9eaf0e7167d000f00d4/default';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
</script>
<!--End of Tawk.to Script-->
</body>
</html>