-
Notifications
You must be signed in to change notification settings - Fork 0
/
products.html
247 lines (237 loc) · 11.4 KB
/
products.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>DAR Electronics - Products</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" type="image/png" href="imgs/d-logo.png">
<!--Bootstrap-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
<!--Bootstrap-->
<!-- custom-->
<link rel="stylesheet" href="main.css" />
<!-- custom-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-md navbar-light bg-light sticky-top">
<div class="container-fluid nav">
<a href="index.html" class="no_style navbar-brand">
<h1 class="logo"><span class="prim_blue">Dar</span>Electronics</h1>
</a>
<button class="navbar-toggler" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav mr-auto" id="nav_links">
<li class="nav-item"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link" href="cart.html">Cart</a></li>
<li class="nav-item active"><a class="nav-link" href="products.html">Products</a></li>
<li class="nav-item"><a class="nav-link" href="about.html">About</a></li>
<li class="nav-item"><a class="nav-link" href="faq.html">FAQ</a></li>
<li class="nav-item" id="contactBtn"><a class="nav-link"><i class="fa fa-phone orient"></i></a></li>
</ul>
<form class="form-inline mt-2 mt-md-0">
<input id="searchInput" class="form-control mr-sm-2" type="text" placeholder="Search"
aria-label="Search" readonly>
<button id="searchbtn" class="btn btn-outline-success my-2 my-sm-0 prim_blue_bg" type="button"><i
class="fa fa-search"></i></button>
</form>
</div>
</div>
</nav>
<!-- End Navigation -->
<div class="container-fluid padding banner">
<div class="row padding text-center prim_blue_bg text-white">
<div class="col-12">
<h1 class="text-center banner">Products</h1>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2 text-center catcolour">
<!-- The sidebar -->
<div class="sidebar">
<h4>Categories</h4>
<a href="#" class="active" name="all">All<span class="badge">40</span></a>
<a href="#" name="laptops">Laptops<span class="badge">20</span></a>
<a href="#" name="phones">Phones<span class="badge">5</span></a>
<a href="#" name="tvs">TVs<span class="badge">1</span></a>
<a href="#" name="tablets">Tablets<span class="badge">5</span></a>
<a href="#" name="headphones">Headphones<span class="badge">3</span></a>
<a href="#" name="cables">Cables<span class="badge">1</span></a>
<a href="#" name="misc">Misc.<span class="badge">5</span></a>
</div>
</div>
<div class="col-md-10 padtop" id="results">
<div id="sort">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-primary dropdown-toggle ml-5 mt-3" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Sort
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">By Price</a>
<a class="dropdown-item" href="#">By Category</a>
<a class="dropdown-item" href="#">By Avaliablity</a>
</div>
</div>
</div>
<div class="row text-center pr-4">
<div class="col pl-md-5" style="max-height: 1px;">
<div class="card product_item">
<img src="imgs/laptop.png" class="card-img-top" alt="...">
<div class="card-body">
<a href="#">
<h4>DAR GTX x360 Gaming Laptop</h4>
</a>
<h5>$1400.00</h5>
<p class="alert-success">AVAILABLE</p>
</div>
</div>
</div>
<div class="col pl-md-5">
<div class="card product_item">
<img src="imgs/hphones.jpg" class="card-img-top" alt="...">
<div class="card-body">
<a href="#">
<h4>Beats Wireless Headphones </h4>
</a>
<h5>$250.00</h5>
<p class="alert-danger">UNAVAILABLE</p>
</div>
</div>
</div>
<div class="col pl-md-5">
<div class="card product_item">
<img src="imgs/tvprod.jpg" class="card-img-top" alt="...">
<div class="card-body">
<a href="#">
<h4>Insignia 32-inch Smart HD TV</h4>
</a>
<h5>$2500.00</h5>
<p class="alert-success">AVAILABLE</p>
</div>
</div>
</div>
</div>
<nav aria-label="Page navigation example" id="pagination">
<ul class="pagination product_pagination">
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
<li class="page-item active"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Next</a></li>
</ul>
</nav>
</div>
</div>
<div class="newscol rowheight newsletter_container">
<div class="row">
<div class="col-md-8 px-5">
<h1 class="subscribe">subscribe to our newsletter</h1>
<p>Sign up with your email address to receive exclusive discounts, exciting announcements and new
product sneak previews.</p>
</div>
<div class="col-md-4 newsletter_form">
<div class="row pb-3">
<input type="email" class="form-control" placeholder="Enter your email" name="email" class ="newsinput" readonly>
</div>
<div class="row">
<button class="btn btn-primary btn-block" type="submit">SUBMIT</button>
</div>
</div>
</div>
</div>
<footer>
<div class="container-fluid padding text-white">
<div class="row text-center">
<div class="col-md-4">
<hr class="light">
<h5>Contact Us</h5>
<hr class="light">
<p>246-494-4993</p>
<p>[email protected]</p>
<p>Bridgetown, Barbados</p>
</div>
<div class="col-md-4">
<hr class="light">
<h5>Opening Hours</h5>
<hr class="light">
<p>Monday - Friday: 8am - 5pm</p>
<p>Saturday: Closed</p>
<p>Sunday: Closed</p>
</div>
<div class="col-md-4">
<hr class="light">
<h5>Locations</h5>
<hr class="light">
<p>Sheraton Mall</p>
<p>Sky Mall</p>
<p>Limegrove</p>
</div>
<div class="col-12">
<hr class="light">
<h5>© DarElectronics 2021</h5>
</div>
</div>
</div>
</footer>
<!--- End Footer -->
<div id="contactModal" class="modal">
<div class="modalContent">
<header class="modal_header prim_blue_bg">
<div class="modal_title">contact us today</div>
<div id="closeBtn">×</span>
</header>
<form>
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="name" aria-describedby="emailHelp"
placeholder="Enter your name" readonly />
</div>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" iname="email" aria-describedby="emailHelp"
placeholder="Enter email" readonly>
</div>
<div class="form-group">
<label for="name">Number</label>
<input type="tel" class="form-control" name="name" aria-describedby="emailHelp"
placeholder="Enter your number" readonly />
</div>
<div class="form-group">
<label for="exampleFormControlTextarea1">Question</label>
<textarea class="form-control" name="message" rows="3" readonly></textarea>
</div>
<button type="submit" class="btn btn-primary prim_blue_bg">Submit</button>
</form>
<footer class="prim_blue_bg modal_footer"></footer>
</div>
</div>
<script src="js/script.js"></script>
<script src="js/products.js"></script>
<script src="js/productsControl.js"></script>
<script>
Array.from(document.querySelectorAll("div.sidebar a")).forEach(link => {
link.addEventListener("click", (e) => {
e.preventDefault();
Array.from(document.querySelectorAll("div.sidebar a")).forEach(a => a.classList.remove("active"));
if (link.name != "all")
displayCat(link.name);
else displayRandomAll();
link.classList.add("active");
});
});
let cat = localStorage.getItem("category");
if (cat) {
document.querySelectorAll("div.sidebar a[name=" + cat + "]")[0].click();
localStorage.removeItem("category");
} else displayRandomAll();
</script>
</body>
</html>